Changed to install message, other changes are only random var changes (due to automation)

This commit is contained in:
Llewellyn van der Merwe 2015-12-01 01:45:26 +02:00
parent f74b562ba4
commit 602a57f894
80 changed files with 2510 additions and 2500 deletions

View File

@ -34,14 +34,14 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
> (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*: **45139**
+ *Line count*: **45149**
+ *File count*: **347**
+ *Folder count*: **79**
**83 Hours** or **10 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @31hours** = codingtime / 4;
> **debugging @32hours** = codingtime / 4;
> **planning @18hours** = codingtime / 7;
> **mapping @13hours** = codingtime / 10;
> **office @21hours** = codingtime / 6;)

File diff suppressed because it is too large Load Diff

View File

@ -55,13 +55,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9285] Access check.
// [9311] Access check.
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9296] In the absense of better information, revert to the component permissions.
// [9322] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('help_document.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9439] get user object.
// [9465] get user object.
$user = JFactory::getUser();
// [9441] get record id.
// [9467] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9448] Access check.
// [9474] Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
if ($recordId)
{
// [9457] The record has been set. Check the record permissions.
// [9483] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor.help_document.' . $recordId))
{
// [9479] Now test the owner is the user.
// [9505] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9483] Need to do a lookup from the model.
// [9509] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
$ownerId = $record->created_by;
}
// [9491] If the owner matches 'me' then allow.
// [9517] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false;
}
}
// [9513] Since there is no permission, revert to the component permissions.
// [9539] Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option);
}

View File

@ -43,29 +43,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function exportData()
{
// [7235] Check for request forgeries
// [7261] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7237] check if export is allowed for this user.
// [7263] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7241] Get the input
// [7267] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7244] Sanitize the input
// [7270] Sanitize the input
JArrayHelper::toInteger($pks);
// [7246] Get the model
// [7272] Get the model
$model = $this->getModel('Help_documents');
// [7248] get the data to export
// [7274] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7252] now set the data to the spreadsheet
// [7278] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
}
}
// [7257] Redirect to the list screen with error.
// [7283] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData()
{
// [7266] Check for request forgeries
// [7292] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7268] check if import is allowed for this user.
// [7294] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7272] Get the import model
// [7298] Get the import model
$model = $this->getModel('Help_documents');
// [7274] get the headers to import
// [7300] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7278] Load headers to session.
// [7304] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
// [7284] Redirect to import view.
// [7310] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7296] Redirect to the list screen with error.
// [7322] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return;

View File

@ -55,13 +55,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9285] Access check.
// [9311] Access check.
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9296] In the absense of better information, revert to the component permissions.
// [9322] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('preacher.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerPreacher extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9439] get user object.
// [9465] get user object.
$user = JFactory::getUser();
// [9441] get record id.
// [9467] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9448] Access check.
// [9474] Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerPreacher extends JControllerForm
if ($recordId)
{
// [9457] The record has been set. Check the record permissions.
// [9483] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor.preacher.' . $recordId))
{
// [9479] Now test the owner is the user.
// [9505] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9483] Need to do a lookup from the model.
// [9509] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerPreacher extends JControllerForm
$ownerId = $record->created_by;
}
// [9491] If the owner matches 'me' then allow.
// [9517] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerPreacher extends JControllerForm
return false;
}
}
// [9513] Since there is no permission, revert to the component permissions.
// [9539] Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option);
}

View File

@ -43,29 +43,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function exportData()
{
// [7235] Check for request forgeries
// [7261] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7237] check if export is allowed for this user.
// [7263] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7241] Get the input
// [7267] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7244] Sanitize the input
// [7270] Sanitize the input
JArrayHelper::toInteger($pks);
// [7246] Get the model
// [7272] Get the model
$model = $this->getModel('Preachers');
// [7248] get the data to export
// [7274] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7252] now set the data to the spreadsheet
// [7278] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
}
}
// [7257] Redirect to the list screen with error.
// [7283] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData()
{
// [7266] Check for request forgeries
// [7292] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7268] check if import is allowed for this user.
// [7294] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7272] Get the import model
// [7298] Get the import model
$model = $this->getModel('Preachers');
// [7274] get the headers to import
// [7300] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7278] Load headers to session.
// [7304] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('preacher_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'preachers');
$session->set('dataType_VDM_IMPORTINTO', 'preacher');
// [7284] Redirect to import view.
// [7310] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7296] Redirect to the list screen with error.
// [7322] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return;

View File

@ -55,13 +55,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9285] Access check.
// [9311] Access check.
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9296] In the absense of better information, revert to the component permissions.
// [9322] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('series.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerSeries extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9439] get user object.
// [9465] get user object.
$user = JFactory::getUser();
// [9441] get record id.
// [9467] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9448] Access check.
// [9474] Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerSeries extends JControllerForm
if ($recordId)
{
// [9457] The record has been set. Check the record permissions.
// [9483] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('series.edit.own', 'com_sermondistributor.series.' . $recordId))
{
// [9479] Now test the owner is the user.
// [9505] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9483] Need to do a lookup from the model.
// [9509] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerSeries extends JControllerForm
$ownerId = $record->created_by;
}
// [9491] If the owner matches 'me' then allow.
// [9517] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerSeries extends JControllerForm
return false;
}
}
// [9513] Since there is no permission, revert to the component permissions.
// [9539] Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option);
}

View File

@ -43,29 +43,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function exportData()
{
// [7235] Check for request forgeries
// [7261] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7237] check if export is allowed for this user.
// [7263] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7241] Get the input
// [7267] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7244] Sanitize the input
// [7270] Sanitize the input
JArrayHelper::toInteger($pks);
// [7246] Get the model
// [7272] Get the model
$model = $this->getModel('Series_list');
// [7248] get the data to export
// [7274] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7252] now set the data to the spreadsheet
// [7278] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
}
}
// [7257] Redirect to the list screen with error.
// [7283] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData()
{
// [7266] Check for request forgeries
// [7292] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7268] check if import is allowed for this user.
// [7294] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7272] Get the import model
// [7298] Get the import model
$model = $this->getModel('Series_list');
// [7274] get the headers to import
// [7300] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7278] Load headers to session.
// [7304] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('series_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'series_list');
$session->set('dataType_VDM_IMPORTINTO', 'series');
// [7284] Redirect to import view.
// [7310] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7296] Redirect to the list screen with error.
// [7322] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return;

View File

@ -55,10 +55,10 @@ class SermondistributorControllerSermon extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9240] get the user object
// [9266] get the user object
$user = JFactory::getUser();
// [9245] Access check.
// [9271] Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
{
@ -69,13 +69,13 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [9256] If the category has been passed in the URL check it.
// [9282] If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
}
if ($allow === null)
{
// [9265] In the absense of better information, revert to the component permissions.
// [9291] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option);
}
else
@ -95,13 +95,13 @@ class SermondistributorControllerSermon extends JControllerForm
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{ // [9343] get user object.
{ // [9369] get user object.
$user = JFactory::getUser();
// [9345] get record id.
// [9371] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9352] Access check.
// [9378] Access check.
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
if (!$access)
{
@ -110,17 +110,17 @@ class SermondistributorControllerSermon extends JControllerForm
if ($recordId)
{
// [9361] The record has been set. Check the record permissions.
// [9387] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor.sermon.' . $recordId))
{
// [9383] Fallback on edit.own. Now test the owner is the user.
// [9409] Fallback on edit.own. Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9387] Need to do a lookup from the model.
// [9413] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -130,7 +130,7 @@ class SermondistributorControllerSermon extends JControllerForm
$ownerId = $record->created_by;
}
// [9395] If the owner matches 'me' then do the test.
// [9421] If the owner matches 'me' then do the test.
if ($ownerId == $user->id)
{
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
@ -146,7 +146,7 @@ class SermondistributorControllerSermon extends JControllerForm
if ($categoryId)
{
// [9417] The category has been set. Check the category permissions.
// [9443] The category has been set. Check the category permissions.
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
if (!$catpermission && !is_null($catpermission))
{
@ -154,7 +154,7 @@ class SermondistributorControllerSermon extends JControllerForm
}
}
}
// [9427] Since there is no permission, revert to the component permissions.
// [9453] Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option);
}

View File

@ -43,29 +43,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function exportData()
{
// [7235] Check for request forgeries
// [7261] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7237] check if export is allowed for this user.
// [7263] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7241] Get the input
// [7267] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7244] Sanitize the input
// [7270] Sanitize the input
JArrayHelper::toInteger($pks);
// [7246] Get the model
// [7272] Get the model
$model = $this->getModel('Sermons');
// [7248] get the data to export
// [7274] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7252] now set the data to the spreadsheet
// [7278] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
}
}
// [7257] Redirect to the list screen with error.
// [7283] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData()
{
// [7266] Check for request forgeries
// [7292] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7268] check if import is allowed for this user.
// [7294] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7272] Get the import model
// [7298] Get the import model
$model = $this->getModel('Sermons');
// [7274] get the headers to import
// [7300] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7278] Load headers to session.
// [7304] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('sermon_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'sermons');
$session->set('dataType_VDM_IMPORTINTO', 'sermon');
// [7284] Redirect to import view.
// [7310] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7296] Redirect to the list screen with error.
// [7322] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return;

View File

@ -55,13 +55,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowAdd($data = array())
{
// [9285] Access check.
// [9311] Access check.
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
{
return false;
}
// [9296] In the absense of better information, revert to the component permissions.
// [9322] In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('statistic.create', $this->option);
}
@ -77,13 +77,13 @@ class SermondistributorControllerStatistic extends JControllerForm
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9439] get user object.
// [9465] get user object.
$user = JFactory::getUser();
// [9441] get record id.
// [9467] get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// [9448] Access check.
// [9474] Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access)
{
@ -92,17 +92,17 @@ class SermondistributorControllerStatistic extends JControllerForm
if ($recordId)
{
// [9457] The record has been set. Check the record permissions.
// [9483] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor.statistic.' . $recordId))
{
// [9479] Now test the owner is the user.
// [9505] Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// [9483] Need to do a lookup from the model.
// [9509] Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
@ -112,7 +112,7 @@ class SermondistributorControllerStatistic extends JControllerForm
$ownerId = $record->created_by;
}
// [9491] If the owner matches 'me' then allow.
// [9517] If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
@ -124,7 +124,7 @@ class SermondistributorControllerStatistic extends JControllerForm
return false;
}
}
// [9513] Since there is no permission, revert to the component permissions.
// [9539] Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option);
}

View File

@ -43,29 +43,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function exportData()
{
// [7235] Check for request forgeries
// [7261] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7237] check if export is allowed for this user.
// [7263] check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// [7241] Get the input
// [7267] Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// [7244] Sanitize the input
// [7270] Sanitize the input
JArrayHelper::toInteger($pks);
// [7246] Get the model
// [7272] Get the model
$model = $this->getModel('Statistics');
// [7248] get the data to export
// [7274] get the data to export
$data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data))
{
// [7252] now set the data to the spreadsheet
// [7278] now set the data to the spreadsheet
$date = JFactory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
}
}
// [7257] Redirect to the list screen with error.
// [7283] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;
@ -74,31 +74,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData()
{
// [7266] Check for request forgeries
// [7292] Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// [7268] check if import is allowed for this user.
// [7294] check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// [7272] Get the import model
// [7298] Get the import model
$model = $this->getModel('Statistics');
// [7274] get the headers to import
// [7300] get the headers to import
$headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
// [7278] Load headers to session.
// [7304] Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('statistic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'statistics');
$session->set('dataType_VDM_IMPORTINTO', 'statistic');
// [7284] Redirect to import view.
// [7310] Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message);
return;
}
}
// [7296] Redirect to the list screen with error.
// [7322] Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return;

View File

@ -548,23 +548,23 @@ abstract class SermondistributorHelper
$targetgroups = json_decode($help->groups, true);
if (!array_intersect($targetgroups, $groups))
{
// [1380] if user not in those target groups then remove the item
// [1383] if user not in those target groups then remove the item
unset($helps[$nr]);
continue;
}
}
// [1385] set the return type
// [1388] set the return type
switch ($help->type)
{
// [1388] set joomla article
// [1391] set joomla article
case 1:
return self::loadArticleLink($help->article);
break;
// [1392] set help text
// [1395] set help text
case 2:
return self::loadHelpTextLink($help->id);
break;
// [1396] set Link
// [1399] set Link
case 3:
return $help->url;
break;
@ -683,7 +683,7 @@ abstract class SermondistributorHelper
{
if (strpos($content,'class="uk-') !== false)
{
// [2594] reset
// [2597] reset
$temp = array();
foreach (self::$uk_components as $looking => $add)
{
@ -692,15 +692,15 @@ abstract class SermondistributorHelper
$temp[] = $looking;
}
}
// [2603] make sure uikit is loaded to config
// [2606] make sure uikit is loaded to config
if (strpos($content,'class="uk-') !== false)
{
self::$uikit = true;
}
// [2608] sorter
// [2611] sorter
if (self::checkArray($temp))
{
// [2611] merger
// [2614] merger
if (self::checkArray($classes))
{
$newTemp = array_merge($temp,$classes);
@ -721,37 +721,37 @@ abstract class SermondistributorHelper
*/
public static function xls($rows,$fileName = null,$title = null,$subjectTab = null,$creator = 'Vast Development Method',$description = null,$category = null,$keywords = null,$modified = null)
{
// [1435] set the user
// [1438] set the user
$user = JFactory::getUser();
// [1438] set fieldname if not set
// [1441] set fieldname if not set
if (!$fileName)
{
$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');
}
// [1443] set modiefied if not set
// [1446] set modiefied if not set
if (!$modified)
{
$modified = $user->name;
}
// [1448] set title if not set
// [1451] set title if not set
if (!$title)
{
$title = 'Book1';
}
// [1453] set tab name if not set
// [1456] set tab name if not set
if (!$subjectTab)
{
$subjectTab = 'Sheet1';
}
// [1459] make sure the file is loaded
// [1462] make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// [1462] Create new PHPExcel object
// [1465] Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// [1465] Set document properties
// [1468] Set document properties
$objPHPExcel->getProperties()->setCreator($creator)
->setCompany('Vast Development Method')
->setLastModifiedBy($modified)
@ -770,7 +770,7 @@ abstract class SermondistributorHelper
$objPHPExcel->getProperties()->setCategory($category);
}
// [1484] Some styles
// [1487] Some styles
$headerStyles = array(
'font' => array(
'bold' => true,
@ -792,7 +792,7 @@ abstract class SermondistributorHelper
'name' => 'Verdana'
));
// [1506] Add some data
// [1509] Add some data
if (self::checkArray($rows))
{
$i = 1;
@ -819,20 +819,20 @@ abstract class SermondistributorHelper
return false;
}
// [1533] Rename worksheet
// [1536] Rename worksheet
$objPHPExcel->getActiveSheet()->setTitle($subjectTab);
// [1536] Set active sheet index to the first sheet, so Excel opens this as the first sheet
// [1539] Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);
// [1539] Redirect output to a client's web browser (Excel5)
// [1542] Redirect output to a client's web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
header('Cache-Control: max-age=0');
// [1543] If you're serving to IE 9, then the following may be needed
// [1546] If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');
// [1546] If you're serving to IE over SSL, then the following may be needed
// [1549] If you're serving to IE over SSL, then the following may be needed
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
@ -848,13 +848,13 @@ abstract class SermondistributorHelper
*/
public static function getFileHeaders($dataType)
{
// [1562] make sure the file is loaded
// [1565] make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// [1564] get session object
// [1567] get session object
$session = JFactory::getSession();
$package = $session->get('package', null);
$package = json_decode($package, true);
// [1568] set the headers
// [1571] set the headers
if(isset($package['dir']))
{
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);

View File

@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->slqsermons;
$items = $displayData->xhfsermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->grqsermons;
$items = $displayData->hspsermons;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";

View File

@ -23,7 +23,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->uaqstastics;
$items = $displayData->bagstastics;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";

View File

@ -38,7 +38,7 @@ class SermondistributorModelAjax extends JModelList
}
// [8882] Used in sermon
// [8908] Used in sermon
/**
* Check and Set Dropbox local listing
**/

View File

@ -45,36 +45,36 @@ class JFormFieldArticles extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create article
// [7691] only add if user allowed to create article
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -45,36 +45,36 @@ class JFormFieldDropboxfiles extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create
// [7691] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -45,36 +45,36 @@ class JFormFieldLocalfiles extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create
// [7691] only add if user allowed to create
if ($user->authorise('core.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -45,36 +45,36 @@ class JFormFieldPreachers extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create preacher
// [7691] only add if user allowed to create preacher
if ($user->authorise('preacher.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=preacher&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -45,36 +45,36 @@ class JFormFieldSeries extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create series
// [7691] only add if user allowed to create series
if ($user->authorise('series.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=series&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -45,36 +45,36 @@ class JFormFieldSermon extends JFormFieldList
*/
protected function getInput()
{
// [7657] see if we should add buttons
// [7683] see if we should add buttons
$setButton = $this->getAttribute('button');
// [7659] get html
// [7685] get html
$html = parent::getInput();
// [7661] if true set button
// [7687] if true set button
if ($setButton === 'true')
{
$user = JFactory::getUser();
// [7665] only add if user allowed to create sermon
// [7691] only add if user allowed to create sermon
if ($user->authorise('sermon.create', 'com_sermondistributor'))
{
// [7683] get the input from url
// [7709] get the input from url
$jinput = JFactory::getApplication()->input;
// [7685] get the view name & id
// [7711] get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// [7690] check if new item
// [7716] check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// [7694] only load referal if not new item.
// [7720] only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// [7697] build the button
// [7723] build the button
$button = '<a class="btn btn-small btn-success"
href="index.php?option=com_sermondistributor&amp;view=sermon&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
// [7701] return the button attached to input field
// [7727] return the button attached to input field
return $html . $button;
}
}

View File

@ -18,38 +18,38 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_dXNGPABnBk_required = false;
jform_lUjJAvVFIk_required = false;
jform_ILzlnJWAHY_required = false;
jform_wQUmqIUYUo_required = false;
jform_jfXdjKEkcj_required = false;
jform_neiBLaklKG_required = false;
jform_SWAPKmPZHb_required = false;
jform_dOgbQmLwDI_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_fpmeWpw = jQuery("#jform_location input[type='radio']:checked").val();
fpmeWpw(location_fpmeWpw);
var location_HJpAkRW = jQuery("#jform_location input[type='radio']:checked").val();
HJpAkRW(location_HJpAkRW);
var location_ynMoYbd = jQuery("#jform_location input[type='radio']:checked").val();
ynMoYbd(location_ynMoYbd);
var location_MTapnld = jQuery("#jform_location input[type='radio']:checked").val();
MTapnld(location_MTapnld);
var type_dXNGPAB = jQuery("#jform_type").val();
dXNGPAB(type_dXNGPAB);
var type_jfXdjKE = jQuery("#jform_type").val();
jfXdjKE(type_jfXdjKE);
var type_lUjJAvV = jQuery("#jform_type").val();
lUjJAvV(type_lUjJAvV);
var type_neiBLak = jQuery("#jform_type").val();
neiBLak(type_neiBLak);
var type_ILzlnJW = jQuery("#jform_type").val();
ILzlnJW(type_ILzlnJW);
var type_SWAPKmP = jQuery("#jform_type").val();
SWAPKmP(type_SWAPKmP);
var target_wQUmqIU = jQuery("#jform_target input[type='radio']:checked").val();
wQUmqIU(target_wQUmqIU);
var target_dOgbQmL = jQuery("#jform_target input[type='radio']:checked").val();
dOgbQmL(target_dOgbQmL);
});
// the fpmeWpw function
function fpmeWpw(location_fpmeWpw)
// the HJpAkRW function
function HJpAkRW(location_HJpAkRW)
{
// [7974] set the function logic
if (location_fpmeWpw == 1)
// [8000] set the function logic
if (location_HJpAkRW == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
@ -59,11 +59,11 @@ function fpmeWpw(location_fpmeWpw)
}
}
// the ynMoYbd function
function ynMoYbd(location_ynMoYbd)
// the MTapnld function
function MTapnld(location_MTapnld)
{
// [7974] set the function logic
if (location_ynMoYbd == 2)
// [8000] set the function logic
if (location_MTapnld == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
@ -73,198 +73,198 @@ function ynMoYbd(location_ynMoYbd)
}
}
// the dXNGPAB function
function dXNGPAB(type_dXNGPAB)
// the jfXdjKE function
function jfXdjKE(type_jfXdjKE)
{
if (isSet(type_dXNGPAB) && type_dXNGPAB.constructor !== Array)
if (isSet(type_jfXdjKE) && type_jfXdjKE.constructor !== Array)
{
var temp_dXNGPAB = type_dXNGPAB;
var type_dXNGPAB = [];
type_dXNGPAB.push(temp_dXNGPAB);
var temp_jfXdjKE = type_jfXdjKE;
var type_jfXdjKE = [];
type_jfXdjKE.push(temp_jfXdjKE);
}
else if (!isSet(type_dXNGPAB))
else if (!isSet(type_jfXdjKE))
{
var type_dXNGPAB = [];
var type_jfXdjKE = [];
}
var type = type_dXNGPAB.some(type_dXNGPAB_SomeFunc);
var type = type_jfXdjKE.some(type_jfXdjKE_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_dXNGPABnBk_required)
if (jform_jfXdjKEkcj_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_dXNGPABnBk_required = false;
jform_jfXdjKEkcj_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_dXNGPABnBk_required)
if (!jform_jfXdjKEkcj_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_dXNGPABnBk_required = true;
jform_jfXdjKEkcj_required = true;
}
}
}
// the dXNGPAB Some function
function type_dXNGPAB_SomeFunc(type_dXNGPAB)
// the jfXdjKE Some function
function type_jfXdjKE_SomeFunc(type_jfXdjKE)
{
// [7939] set the function logic
if (type_dXNGPAB == 3)
// [7965] set the function logic
if (type_jfXdjKE == 3)
{
return true;
}
return false;
}
// the lUjJAvV function
function lUjJAvV(type_lUjJAvV)
// the neiBLak function
function neiBLak(type_neiBLak)
{
if (isSet(type_lUjJAvV) && type_lUjJAvV.constructor !== Array)
if (isSet(type_neiBLak) && type_neiBLak.constructor !== Array)
{
var temp_lUjJAvV = type_lUjJAvV;
var type_lUjJAvV = [];
type_lUjJAvV.push(temp_lUjJAvV);
var temp_neiBLak = type_neiBLak;
var type_neiBLak = [];
type_neiBLak.push(temp_neiBLak);
}
else if (!isSet(type_lUjJAvV))
else if (!isSet(type_neiBLak))
{
var type_lUjJAvV = [];
var type_neiBLak = [];
}
var type = type_lUjJAvV.some(type_lUjJAvV_SomeFunc);
var type = type_neiBLak.some(type_neiBLak_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_lUjJAvVFIk_required)
if (jform_neiBLaklKG_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_lUjJAvVFIk_required = false;
jform_neiBLaklKG_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_lUjJAvVFIk_required)
if (!jform_neiBLaklKG_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_lUjJAvVFIk_required = true;
jform_neiBLaklKG_required = true;
}
}
}
// the lUjJAvV Some function
function type_lUjJAvV_SomeFunc(type_lUjJAvV)
// the neiBLak Some function
function type_neiBLak_SomeFunc(type_neiBLak)
{
// [7939] set the function logic
if (type_lUjJAvV == 1)
// [7965] set the function logic
if (type_neiBLak == 1)
{
return true;
}
return false;
}
// the ILzlnJW function
function ILzlnJW(type_ILzlnJW)
// the SWAPKmP function
function SWAPKmP(type_SWAPKmP)
{
if (isSet(type_ILzlnJW) && type_ILzlnJW.constructor !== Array)
if (isSet(type_SWAPKmP) && type_SWAPKmP.constructor !== Array)
{
var temp_ILzlnJW = type_ILzlnJW;
var type_ILzlnJW = [];
type_ILzlnJW.push(temp_ILzlnJW);
var temp_SWAPKmP = type_SWAPKmP;
var type_SWAPKmP = [];
type_SWAPKmP.push(temp_SWAPKmP);
}
else if (!isSet(type_ILzlnJW))
else if (!isSet(type_SWAPKmP))
{
var type_ILzlnJW = [];
var type_SWAPKmP = [];
}
var type = type_ILzlnJW.some(type_ILzlnJW_SomeFunc);
var type = type_SWAPKmP.some(type_SWAPKmP_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_ILzlnJWAHY_required)
if (jform_SWAPKmPZHb_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_ILzlnJWAHY_required = false;
jform_SWAPKmPZHb_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_ILzlnJWAHY_required)
if (!jform_SWAPKmPZHb_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_ILzlnJWAHY_required = true;
jform_SWAPKmPZHb_required = true;
}
}
}
// the ILzlnJW Some function
function type_ILzlnJW_SomeFunc(type_ILzlnJW)
// the SWAPKmP Some function
function type_SWAPKmP_SomeFunc(type_SWAPKmP)
{
// [7939] set the function logic
if (type_ILzlnJW == 2)
// [7965] set the function logic
if (type_SWAPKmP == 2)
{
return true;
}
return false;
}
// the wQUmqIU function
function wQUmqIU(target_wQUmqIU)
// the dOgbQmL function
function dOgbQmL(target_dOgbQmL)
{
// [7974] set the function logic
if (target_wQUmqIU == 1)
// [8000] set the function logic
if (target_dOgbQmL == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_wQUmqIUYUo_required)
if (jform_dOgbQmLwDI_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_wQUmqIUYUo_required = false;
jform_dOgbQmLwDI_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_wQUmqIUYUo_required)
if (!jform_dOgbQmLwDI_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_wQUmqIUYUo_required = true;
jform_dOgbQmLwDI_required = true;
}
}
}

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [10985] Default Fields. -->
<!-- [10986] Id Field. Type: Text (joomla) -->
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [10993] Date Created Field. Type: Calendar (joomla) -->
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11004] User Created Field. Type: User (joomla) -->
<!-- [11030] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_CREATED_BY_DESC"
/>
<!-- [11012] Published Field. Type: List (joomla) -->
<!-- [11038] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11027] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11031] User Modified Field. Type: User (joomla) -->
<!-- [11057] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11041] Access Field. Type: Accesslevel (joomla) -->
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11051] Ordering Field. Type: Numbers (joomla) -->
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11063] Version Field. Type: Text (joomla) -->
<!-- [11089] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11077] Metakey Field. Type: Textarea (joomla) -->
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11086] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11096] Dynamic Fields. -->
<!-- [11332] Title Field. Type: Text. (joomla) -->
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Title Field. Type: Text. (joomla) -->
<field
type="text"
name="title"
@ -118,7 +118,7 @@
message="Error! Please add title here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TITLE_HINT"
/>
<!-- [11246] Type Field. Type: List. (joomla) -->
<!-- [11272] Type Field. Type: List. (joomla) -->
<field
type="list"
name="type"
@ -127,7 +127,7 @@
class="list_class"
multiple="false"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION</option>
<option value="1">
@ -137,7 +137,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL</option>
</field>
<!-- [11332] Groups Field. Type: Usergroup. (joomla) -->
<!-- [11358] Groups Field. Type: Usergroup. (joomla) -->
<field
type="usergroup"
name="groups"
@ -146,7 +146,7 @@
required="true"
multiple="true"
/>
<!-- [11246] Location Field. Type: Radio. (joomla) -->
<!-- [11272] Location Field. Type: Radio. (joomla) -->
<field
type="radio"
name="location"
@ -154,13 +154,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_DESCRIPTION"
class="btn-group"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
</field>
<!-- [11332] Admin_view Field. Type: Folderlist. (joomla) -->
<!-- [11358] Admin_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="admin_view"
@ -170,7 +170,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [11332] Site_view Field. Type: Folderlist. (joomla) -->
<!-- [11358] Site_view Field. Type: Folderlist. (joomla) -->
<field
type="folderlist"
name="site_view"
@ -180,7 +180,7 @@
hide_none="true"
hide_default="true"
/>
<!-- [11246] Target Field. Type: Radio. (joomla) -->
<!-- [11272] Target Field. Type: Radio. (joomla) -->
<field
type="radio"
name="target"
@ -188,13 +188,13 @@
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TARGET_DESCRIPTION"
class="btn-group"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option>
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option>
</field>
<!-- [11332] Content Field. Type: Editor. (joomla) -->
<!-- [11358] Content Field. Type: Editor. (joomla) -->
<field
type="editor"
name="content"
@ -205,7 +205,7 @@
filter="safehtml"
required="true"
/>
<!-- [11332] Alias Field. Type: Text. (joomla) -->
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -214,7 +214,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT"
/>
<!-- [11453] Article Field. Type: Articles. (custom) -->
<!-- [11479] Article Field. Type: Articles. (custom) -->
<field
type="articles"
name="article"
@ -224,7 +224,7 @@
default="0"
required="true"
/>
<!-- [11332] Url Field. Type: Url. (joomla) -->
<!-- [11358] Url Field. Type: Url. (joomla) -->
<field
type="url"
name="url"
@ -239,7 +239,7 @@
message="Error! Please add url here."
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL_HINT"
/>
<!-- [11332] Not_required Field. Type: Hidden. (joomla) -->
<!-- [11358] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
@ -247,11 +247,11 @@
/>
</fieldset>
<!-- [11115] Metadata Fields. -->
<!-- [11141] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11119] Robots Field. Type: List (joomla) -->
<!-- [11145] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -262,13 +262,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11130] Author Field. Type: Text (joomla) -->
<!-- [11156] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11136] Rights Field. Type: Textarea (joomla) -->
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -276,15 +276,15 @@
</fieldset>
</fields>
<!-- [10019] Access Control Fields. -->
<!-- [10045] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10021] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10027] Rules Field. Type: Rules (joomla) -->
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [10985] Default Fields. -->
<!-- [10986] Id Field. Type: Text (joomla) -->
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [10993] Date Created Field. Type: Calendar (joomla) -->
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11004] User Created Field. Type: User (joomla) -->
<!-- [11030] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_PREACHER_CREATED_BY_DESC"
/>
<!-- [11012] Published Field. Type: List (joomla) -->
<!-- [11038] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11027] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11031] User Modified Field. Type: User (joomla) -->
<!-- [11057] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11041] Access Field. Type: Accesslevel (joomla) -->
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11051] Ordering Field. Type: Numbers (joomla) -->
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11063] Version Field. Type: Text (joomla) -->
<!-- [11089] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11077] Metakey Field. Type: Textarea (joomla) -->
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11086] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11096] Dynamic Fields. -->
<!-- [11332] Name Field. Type: Text. (joomla) -->
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_NAME_HINT"
/>
<!-- [11332] Description Field. Type: Editor. (joomla) -->
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [11332] Alias Field. Type: Text. (joomla) -->
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT"
/>
<!-- [11332] Email Field. Type: Text. (joomla) -->
<!-- [11358] Email Field. Type: Text. (joomla) -->
<field
type="text"
name="email"
@ -154,7 +154,7 @@
message="Error! Please add email address here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_EMAIL_HINT"
/>
<!-- [11332] Website Field. Type: Url. (joomla) -->
<!-- [11358] Website Field. Type: Url. (joomla) -->
<field
type="url"
name="website"
@ -168,7 +168,7 @@
message="Error! Please add website here."
hint="COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT"
/>
<!-- [11332] Icon Field. Type: Media. (joomla) -->
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -178,11 +178,11 @@
/>
</fieldset>
<!-- [11115] Metadata Fields. -->
<!-- [11141] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11119] Robots Field. Type: List (joomla) -->
<!-- [11145] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -193,13 +193,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11130] Author Field. Type: Text (joomla) -->
<!-- [11156] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11136] Rights Field. Type: Textarea (joomla) -->
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -207,15 +207,15 @@
</fieldset>
</fields>
<!-- [10019] Access Control Fields. -->
<!-- [10045] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10021] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10027] Rules Field. Type: Rules (joomla) -->
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [10985] Default Fields. -->
<!-- [10986] Id Field. Type: Text (joomla) -->
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [10993] Date Created Field. Type: Calendar (joomla) -->
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11004] User Created Field. Type: User (joomla) -->
<!-- [11030] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERIES_CREATED_BY_DESC"
/>
<!-- [11012] Published Field. Type: List (joomla) -->
<!-- [11038] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11027] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11031] User Modified Field. Type: User (joomla) -->
<!-- [11057] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11041] Access Field. Type: Accesslevel (joomla) -->
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11051] Ordering Field. Type: Numbers (joomla) -->
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11063] Version Field. Type: Text (joomla) -->
<!-- [11089] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11077] Metakey Field. Type: Textarea (joomla) -->
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11086] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11096] Dynamic Fields. -->
<!-- [11332] Name Field. Type: Text. (joomla) -->
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERIES_NAME_HINT"
/>
<!-- [11332] Description Field. Type: Editor. (joomla) -->
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -130,7 +130,7 @@
buttons="false"
filter="safehtml"
/>
<!-- [11332] Alias Field. Type: Text. (joomla) -->
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -139,7 +139,7 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT"
/>
<!-- [11332] Icon Field. Type: Media. (joomla) -->
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -147,7 +147,7 @@
description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION"
directory=""
/>
<!-- [11332] Scripture Field. Type: Text. (joomla) -->
<!-- [11358] Scripture Field. Type: Text. (joomla) -->
<field
type="text"
name="scripture"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11115] Metadata Fields. -->
<!-- [11141] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11119] Robots Field. Type: List (joomla) -->
<!-- [11145] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +180,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11130] Author Field. Type: Text (joomla) -->
<!-- [11156] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11136] Rights Field. Type: Textarea (joomla) -->
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [10019] Access Control Fields. -->
<!-- [10045] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10021] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10027] Rules Field. Type: Rules (joomla) -->
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -18,127 +18,127 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_rftyiTCGUp_required = false;
jform_jAMSvXiJcA_required = false;
jform_hkBIRwXeyD_required = false;
jform_cyLHBtpmUy_required = false;
jform_XcZLWuJdiL_required = false;
jform_xbZtXWzeFM_required = false;
jform_WZwWpgDJhv_required = false;
jform_hdyAkcsOFV_required = false;
jform_MkfKpczQEa_required = false;
jform_VHZADuEZeK_required = false;
// Initial Script
jQuery(document).ready(function()
{
var source_rftyiTC = jQuery("#jform_source").val();
rftyiTC(source_rftyiTC);
var source_xbZtXWz = jQuery("#jform_source").val();
xbZtXWz(source_xbZtXWz);
var source_liGWajx = jQuery("#jform_source").val();
var build_liGWajx = jQuery("#jform_build input[type='radio']:checked").val();
liGWajx(source_liGWajx,build_liGWajx);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
var source_jAMSvXi = jQuery("#jform_source").val();
var build_jAMSvXi = jQuery("#jform_build input[type='radio']:checked").val();
jAMSvXi(source_jAMSvXi,build_jAMSvXi);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
var build_hkBIRwX = jQuery("#jform_build input[type='radio']:checked").val();
var source_hkBIRwX = jQuery("#jform_source").val();
hkBIRwX(build_hkBIRwX,source_hkBIRwX);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
var source_cyLHBtp = jQuery("#jform_source").val();
cyLHBtp(source_cyLHBtp);
var source_MkfKpcz = jQuery("#jform_source").val();
MkfKpcz(source_MkfKpcz);
var source_XcZLWuJ = jQuery("#jform_source").val();
XcZLWuJ(source_XcZLWuJ);
var source_VHZADuE = jQuery("#jform_source").val();
VHZADuE(source_VHZADuE);
var link_type_LnTfUMv = jQuery("#jform_link_type input[type='radio']:checked").val();
LnTfUMv(link_type_LnTfUMv);
var link_type_BlITSTV = jQuery("#jform_link_type input[type='radio']:checked").val();
BlITSTV(link_type_BlITSTV);
var link_type_SPbxTGc = jQuery("#jform_link_type input[type='radio']:checked").val();
SPbxTGc(link_type_SPbxTGc);
var link_type_fGuayEg = jQuery("#jform_link_type input[type='radio']:checked").val();
fGuayEg(link_type_fGuayEg);
});
// the rftyiTC function
function rftyiTC(source_rftyiTC)
// the xbZtXWz function
function xbZtXWz(source_xbZtXWz)
{
if (isSet(source_rftyiTC) && source_rftyiTC.constructor !== Array)
if (isSet(source_xbZtXWz) && source_xbZtXWz.constructor !== Array)
{
var temp_rftyiTC = source_rftyiTC;
var source_rftyiTC = [];
source_rftyiTC.push(temp_rftyiTC);
var temp_xbZtXWz = source_xbZtXWz;
var source_xbZtXWz = [];
source_xbZtXWz.push(temp_xbZtXWz);
}
else if (!isSet(source_rftyiTC))
else if (!isSet(source_xbZtXWz))
{
var source_rftyiTC = [];
var source_xbZtXWz = [];
}
var source = source_rftyiTC.some(source_rftyiTC_SomeFunc);
var source = source_xbZtXWz.some(source_xbZtXWz_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (source)
{
jQuery('#jform_build').closest('.control-group').show();
if (jform_rftyiTCGUp_required)
if (jform_xbZtXWzeFM_required)
{
updateFieldRequired('build',0);
jQuery('#jform_build').prop('required','required');
jQuery('#jform_build').attr('aria-required',true);
jQuery('#jform_build').addClass('required');
jform_rftyiTCGUp_required = false;
jform_xbZtXWzeFM_required = false;
}
}
else
{
jQuery('#jform_build').closest('.control-group').hide();
if (!jform_rftyiTCGUp_required)
if (!jform_xbZtXWzeFM_required)
{
updateFieldRequired('build',1);
jQuery('#jform_build').removeAttr('required');
jQuery('#jform_build').removeAttr('aria-required');
jQuery('#jform_build').removeClass('required');
jform_rftyiTCGUp_required = true;
jform_xbZtXWzeFM_required = true;
}
}
}
// the rftyiTC Some function
function source_rftyiTC_SomeFunc(source_rftyiTC)
// the xbZtXWz Some function
function source_xbZtXWz_SomeFunc(source_xbZtXWz)
{
// [7939] set the function logic
if (source_rftyiTC == 2)
// [7965] set the function logic
if (source_xbZtXWz == 2)
{
return true;
}
return false;
}
// the liGWajx function
function liGWajx(source_liGWajx,build_liGWajx)
// the CDIVEjW function
function CDIVEjW(source_CDIVEjW,build_CDIVEjW)
{
if (isSet(source_liGWajx) && source_liGWajx.constructor !== Array)
if (isSet(source_CDIVEjW) && source_CDIVEjW.constructor !== Array)
{
var temp_liGWajx = source_liGWajx;
var source_liGWajx = [];
source_liGWajx.push(temp_liGWajx);
var temp_CDIVEjW = source_CDIVEjW;
var source_CDIVEjW = [];
source_CDIVEjW.push(temp_CDIVEjW);
}
else if (!isSet(source_liGWajx))
else if (!isSet(source_CDIVEjW))
{
var source_liGWajx = [];
var source_CDIVEjW = [];
}
var source = source_liGWajx.some(source_liGWajx_SomeFunc);
var source = source_CDIVEjW.some(source_CDIVEjW_SomeFunc);
if (isSet(build_liGWajx) && build_liGWajx.constructor !== Array)
if (isSet(build_CDIVEjW) && build_CDIVEjW.constructor !== Array)
{
var temp_liGWajx = build_liGWajx;
var build_liGWajx = [];
build_liGWajx.push(temp_liGWajx);
var temp_CDIVEjW = build_CDIVEjW;
var build_CDIVEjW = [];
build_CDIVEjW.push(temp_CDIVEjW);
}
else if (!isSet(build_liGWajx))
else if (!isSet(build_CDIVEjW))
{
var build_liGWajx = [];
var build_CDIVEjW = [];
}
var build = build_liGWajx.some(build_liGWajx_SomeFunc);
var build = build_CDIVEjW.some(build_CDIVEjW_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (source && build)
{
jQuery('.note_auto_dropbox').closest('.control-group').show();
@ -149,67 +149,67 @@ function liGWajx(source_liGWajx,build_liGWajx)
}
}
// the liGWajx Some function
function source_liGWajx_SomeFunc(source_liGWajx)
// the CDIVEjW Some function
function source_CDIVEjW_SomeFunc(source_CDIVEjW)
{
// [7939] set the function logic
if (source_liGWajx == 2)
// [7965] set the function logic
if (source_CDIVEjW == 2)
{
return true;
}
return false;
}
// the liGWajx Some function
function build_liGWajx_SomeFunc(build_liGWajx)
// the CDIVEjW Some function
function build_CDIVEjW_SomeFunc(build_CDIVEjW)
{
// [7939] set the function logic
if (build_liGWajx == 2)
// [7965] set the function logic
if (build_CDIVEjW == 2)
{
return true;
}
return false;
}
// the jAMSvXi function
function jAMSvXi(source_jAMSvXi,build_jAMSvXi)
// the WZwWpgD function
function WZwWpgD(source_WZwWpgD,build_WZwWpgD)
{
if (isSet(source_jAMSvXi) && source_jAMSvXi.constructor !== Array)
if (isSet(source_WZwWpgD) && source_WZwWpgD.constructor !== Array)
{
var temp_jAMSvXi = source_jAMSvXi;
var source_jAMSvXi = [];
source_jAMSvXi.push(temp_jAMSvXi);
var temp_WZwWpgD = source_WZwWpgD;
var source_WZwWpgD = [];
source_WZwWpgD.push(temp_WZwWpgD);
}
else if (!isSet(source_jAMSvXi))
else if (!isSet(source_WZwWpgD))
{
var source_jAMSvXi = [];
var source_WZwWpgD = [];
}
var source = source_jAMSvXi.some(source_jAMSvXi_SomeFunc);
var source = source_WZwWpgD.some(source_WZwWpgD_SomeFunc);
if (isSet(build_jAMSvXi) && build_jAMSvXi.constructor !== Array)
if (isSet(build_WZwWpgD) && build_WZwWpgD.constructor !== Array)
{
var temp_jAMSvXi = build_jAMSvXi;
var build_jAMSvXi = [];
build_jAMSvXi.push(temp_jAMSvXi);
var temp_WZwWpgD = build_WZwWpgD;
var build_WZwWpgD = [];
build_WZwWpgD.push(temp_WZwWpgD);
}
else if (!isSet(build_jAMSvXi))
else if (!isSet(build_WZwWpgD))
{
var build_jAMSvXi = [];
var build_WZwWpgD = [];
}
var build = build_jAMSvXi.some(build_jAMSvXi_SomeFunc);
var build = build_WZwWpgD.some(build_WZwWpgD_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (source && build)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_jAMSvXiJcA_required)
if (jform_WZwWpgDJhv_required)
{
updateFieldRequired('manual_files',0);
jQuery('#jform_manual_files').prop('required','required');
jQuery('#jform_manual_files').attr('aria-required',true);
jQuery('#jform_manual_files').addClass('required');
jform_jAMSvXiJcA_required = false;
jform_WZwWpgDJhv_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -217,79 +217,79 @@ function jAMSvXi(source_jAMSvXi,build_jAMSvXi)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_jAMSvXiJcA_required)
if (!jform_WZwWpgDJhv_required)
{
updateFieldRequired('manual_files',1);
jQuery('#jform_manual_files').removeAttr('required');
jQuery('#jform_manual_files').removeAttr('aria-required');
jQuery('#jform_manual_files').removeClass('required');
jform_jAMSvXiJcA_required = true;
jform_WZwWpgDJhv_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the jAMSvXi Some function
function source_jAMSvXi_SomeFunc(source_jAMSvXi)
// the WZwWpgD Some function
function source_WZwWpgD_SomeFunc(source_WZwWpgD)
{
// [7939] set the function logic
if (source_jAMSvXi == 2)
// [7965] set the function logic
if (source_WZwWpgD == 2)
{
return true;
}
return false;
}
// the jAMSvXi Some function
function build_jAMSvXi_SomeFunc(build_jAMSvXi)
// the WZwWpgD Some function
function build_WZwWpgD_SomeFunc(build_WZwWpgD)
{
// [7939] set the function logic
if (build_jAMSvXi == 1)
// [7965] set the function logic
if (build_WZwWpgD == 1)
{
return true;
}
return false;
}
// the hkBIRwX function
function hkBIRwX(build_hkBIRwX,source_hkBIRwX)
// the hdyAkcs function
function hdyAkcs(build_hdyAkcs,source_hdyAkcs)
{
if (isSet(build_hkBIRwX) && build_hkBIRwX.constructor !== Array)
if (isSet(build_hdyAkcs) && build_hdyAkcs.constructor !== Array)
{
var temp_hkBIRwX = build_hkBIRwX;
var build_hkBIRwX = [];
build_hkBIRwX.push(temp_hkBIRwX);
var temp_hdyAkcs = build_hdyAkcs;
var build_hdyAkcs = [];
build_hdyAkcs.push(temp_hdyAkcs);
}
else if (!isSet(build_hkBIRwX))
else if (!isSet(build_hdyAkcs))
{
var build_hkBIRwX = [];
var build_hdyAkcs = [];
}
var build = build_hkBIRwX.some(build_hkBIRwX_SomeFunc);
var build = build_hdyAkcs.some(build_hdyAkcs_SomeFunc);
if (isSet(source_hkBIRwX) && source_hkBIRwX.constructor !== Array)
if (isSet(source_hdyAkcs) && source_hdyAkcs.constructor !== Array)
{
var temp_hkBIRwX = source_hkBIRwX;
var source_hkBIRwX = [];
source_hkBIRwX.push(temp_hkBIRwX);
var temp_hdyAkcs = source_hdyAkcs;
var source_hdyAkcs = [];
source_hdyAkcs.push(temp_hdyAkcs);
}
else if (!isSet(source_hkBIRwX))
else if (!isSet(source_hdyAkcs))
{
var source_hkBIRwX = [];
var source_hdyAkcs = [];
}
var source = source_hkBIRwX.some(source_hkBIRwX_SomeFunc);
var source = source_hdyAkcs.some(source_hdyAkcs_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (build && source)
{
jQuery('#jform_manual_files').closest('.control-group').show();
if (jform_hkBIRwXeyD_required)
if (jform_hdyAkcsOFV_required)
{
updateFieldRequired('manual_files',0);
jQuery('#jform_manual_files').prop('required','required');
jQuery('#jform_manual_files').attr('aria-required',true);
jQuery('#jform_manual_files').addClass('required');
jform_hkBIRwXeyD_required = false;
jform_hdyAkcsOFV_required = false;
}
jQuery('.note_manual_dropbox').closest('.control-group').show();
@ -297,155 +297,155 @@ function hkBIRwX(build_hkBIRwX,source_hkBIRwX)
else
{
jQuery('#jform_manual_files').closest('.control-group').hide();
if (!jform_hkBIRwXeyD_required)
if (!jform_hdyAkcsOFV_required)
{
updateFieldRequired('manual_files',1);
jQuery('#jform_manual_files').removeAttr('required');
jQuery('#jform_manual_files').removeAttr('aria-required');
jQuery('#jform_manual_files').removeClass('required');
jform_hkBIRwXeyD_required = true;
jform_hdyAkcsOFV_required = true;
}
jQuery('.note_manual_dropbox').closest('.control-group').hide();
}
}
// the hkBIRwX Some function
function build_hkBIRwX_SomeFunc(build_hkBIRwX)
// the hdyAkcs Some function
function build_hdyAkcs_SomeFunc(build_hdyAkcs)
{
// [7939] set the function logic
if (build_hkBIRwX == 1)
// [7965] set the function logic
if (build_hdyAkcs == 1)
{
return true;
}
return false;
}
// the hkBIRwX Some function
function source_hkBIRwX_SomeFunc(source_hkBIRwX)
// the hdyAkcs Some function
function source_hdyAkcs_SomeFunc(source_hdyAkcs)
{
// [7939] set the function logic
if (source_hkBIRwX == 2)
// [7965] set the function logic
if (source_hdyAkcs == 2)
{
return true;
}
return false;
}
// the cyLHBtp function
function cyLHBtp(source_cyLHBtp)
// the MkfKpcz function
function MkfKpcz(source_MkfKpcz)
{
if (isSet(source_cyLHBtp) && source_cyLHBtp.constructor !== Array)
if (isSet(source_MkfKpcz) && source_MkfKpcz.constructor !== Array)
{
var temp_cyLHBtp = source_cyLHBtp;
var source_cyLHBtp = [];
source_cyLHBtp.push(temp_cyLHBtp);
var temp_MkfKpcz = source_MkfKpcz;
var source_MkfKpcz = [];
source_MkfKpcz.push(temp_MkfKpcz);
}
else if (!isSet(source_cyLHBtp))
else if (!isSet(source_MkfKpcz))
{
var source_cyLHBtp = [];
var source_MkfKpcz = [];
}
var source = source_cyLHBtp.some(source_cyLHBtp_SomeFunc);
var source = source_MkfKpcz.some(source_MkfKpcz_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (source)
{
jQuery('#jform_local_files').closest('.control-group').show();
if (jform_cyLHBtpmUy_required)
if (jform_MkfKpczQEa_required)
{
updateFieldRequired('local_files',0);
jQuery('#jform_local_files').prop('required','required');
jQuery('#jform_local_files').attr('aria-required',true);
jQuery('#jform_local_files').addClass('required');
jform_cyLHBtpmUy_required = false;
jform_MkfKpczQEa_required = false;
}
}
else
{
jQuery('#jform_local_files').closest('.control-group').hide();
if (!jform_cyLHBtpmUy_required)
if (!jform_MkfKpczQEa_required)
{
updateFieldRequired('local_files',1);
jQuery('#jform_local_files').removeAttr('required');
jQuery('#jform_local_files').removeAttr('aria-required');
jQuery('#jform_local_files').removeClass('required');
jform_cyLHBtpmUy_required = true;
jform_MkfKpczQEa_required = true;
}
}
}
// the cyLHBtp Some function
function source_cyLHBtp_SomeFunc(source_cyLHBtp)
// the MkfKpcz Some function
function source_MkfKpcz_SomeFunc(source_MkfKpcz)
{
// [7939] set the function logic
if (source_cyLHBtp == 1)
// [7965] set the function logic
if (source_MkfKpcz == 1)
{
return true;
}
return false;
}
// the XcZLWuJ function
function XcZLWuJ(source_XcZLWuJ)
// the VHZADuE function
function VHZADuE(source_VHZADuE)
{
if (isSet(source_XcZLWuJ) && source_XcZLWuJ.constructor !== Array)
if (isSet(source_VHZADuE) && source_VHZADuE.constructor !== Array)
{
var temp_XcZLWuJ = source_XcZLWuJ;
var source_XcZLWuJ = [];
source_XcZLWuJ.push(temp_XcZLWuJ);
var temp_VHZADuE = source_VHZADuE;
var source_VHZADuE = [];
source_VHZADuE.push(temp_VHZADuE);
}
else if (!isSet(source_XcZLWuJ))
else if (!isSet(source_VHZADuE))
{
var source_XcZLWuJ = [];
var source_VHZADuE = [];
}
var source = source_XcZLWuJ.some(source_XcZLWuJ_SomeFunc);
var source = source_VHZADuE.some(source_VHZADuE_SomeFunc);
// [7952] set this function logic
// [7978] set this function logic
if (source)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_XcZLWuJdiL_required)
if (jform_VHZADuEZeK_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_XcZLWuJdiL_required = false;
jform_VHZADuEZeK_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_XcZLWuJdiL_required)
if (!jform_VHZADuEZeK_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_XcZLWuJdiL_required = true;
jform_VHZADuEZeK_required = true;
}
}
}
// the XcZLWuJ Some function
function source_XcZLWuJ_SomeFunc(source_XcZLWuJ)
// the VHZADuE Some function
function source_VHZADuE_SomeFunc(source_VHZADuE)
{
// [7939] set the function logic
if (source_XcZLWuJ == 3)
// [7965] set the function logic
if (source_VHZADuE == 3)
{
return true;
}
return false;
}
// the LnTfUMv function
function LnTfUMv(link_type_LnTfUMv)
// the BlITSTV function
function BlITSTV(link_type_BlITSTV)
{
// [7974] set the function logic
if (link_type_LnTfUMv == 2)
// [8000] set the function logic
if (link_type_BlITSTV == 2)
{
jQuery('.note_link_directed').closest('.control-group').show();
}
@ -455,11 +455,11 @@ function LnTfUMv(link_type_LnTfUMv)
}
}
// the SPbxTGc function
function SPbxTGc(link_type_SPbxTGc)
// the fGuayEg function
function fGuayEg(link_type_fGuayEg)
{
// [7974] set the function logic
if (link_type_SPbxTGc == 1)
// [8000] set the function logic
if (link_type_fGuayEg == 1)
{
jQuery('.note_link_encrypted').closest('.control-group').show();
}

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [10985] Default Fields. -->
<!-- [10986] Id Field. Type: Text (joomla) -->
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [10993] Date Created Field. Type: Calendar (joomla) -->
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11004] User Created Field. Type: User (joomla) -->
<!-- [11030] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_SERMON_CREATED_BY_DESC"
/>
<!-- [11012] Published Field. Type: List (joomla) -->
<!-- [11038] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11027] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11031] User Modified Field. Type: User (joomla) -->
<!-- [11057] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11041] Access Field. Type: Accesslevel (joomla) -->
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11051] Ordering Field. Type: Numbers (joomla) -->
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11063] Version Field. Type: Text (joomla) -->
<!-- [11089] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11077] Metakey Field. Type: Textarea (joomla) -->
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11086] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11096] Dynamic Fields. -->
<!-- [11332] Name Field. Type: Text. (joomla) -->
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
@ -118,7 +118,7 @@
message="Error! Please add name here."
hint="COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT"
/>
<!-- [11453] Preacher Field. Type: Preachers. (custom) -->
<!-- [11479] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -129,7 +129,7 @@
default="0"
button="true"
/>
<!-- [11453] Series Field. Type: Series. (custom) -->
<!-- [11479] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -140,7 +140,7 @@
default="0"
button="true"
/>
<!-- [11332] Short_description Field. Type: Text. (joomla) -->
<!-- [11358] Short_description Field. Type: Text. (joomla) -->
<field
type="text"
name="short_description"
@ -154,7 +154,7 @@
message="Error! Please add some short description here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_HINT"
/>
<!-- [11332] Catid Field. Type: Category. (joomla) -->
<!-- [11358] Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
@ -164,7 +164,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- [11246] Link_type Field. Type: Radio. (joomla) -->
<!-- [11272] Link_type Field. Type: Radio. (joomla) -->
<field
type="radio"
name="link_type"
@ -173,13 +173,13 @@
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option>
</field>
<!-- [11246] Source Field. Type: List. (joomla) -->
<!-- [11272] Source Field. Type: List. (joomla) -->
<field
type="list"
name="source"
@ -189,7 +189,7 @@
multiple="false"
filter="INT"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE</option>
<option value="1">
@ -199,7 +199,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_SERMON_URL</option>
</field>
<!-- [11332] Icon Field. Type: Media. (joomla) -->
<!-- [11358] Icon Field. Type: Media. (joomla) -->
<field
type="media"
name="icon"
@ -207,7 +207,7 @@
description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION"
directory=""
/>
<!-- [11332] Tags Field. Type: Tag. (joomla) -->
<!-- [11358] Tags Field. Type: Tag. (joomla) -->
<field
type="tag"
name="tags"
@ -218,7 +218,7 @@
published="true"
multiple="true"
/>
<!-- [11453] Local_files Field. Type: Localfiles. (custom) -->
<!-- [11479] Local_files Field. Type: Localfiles. (custom) -->
<field
type="localfiles"
name="local_files"
@ -230,7 +230,7 @@
required="true"
button="false"
/>
<!-- [11332] Description Field. Type: Editor. (joomla) -->
<!-- [11358] Description Field. Type: Editor. (joomla) -->
<field
type="editor"
name="description"
@ -242,9 +242,9 @@
buttons="false"
filter="safehtml"
/>
<!-- [11346] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11372] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_auto_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_auto_dropbox" />
<!-- [11332] Alias Field. Type: Text. (joomla) -->
<!-- [11358] Alias Field. Type: Text. (joomla) -->
<field
type="text"
name="alias"
@ -253,19 +253,19 @@
filter="STRING"
hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT"
/>
<!-- [11332] Not_required Field. Type: Hidden. (joomla) -->
<!-- [11358] Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- [11346] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11372] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_directed" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_directed" close="true" />
<!-- [11346] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11372] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_manual_dropbox" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION" heading="h4" class="alert alert-info note_manual_dropbox" />
<!-- [11346] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<!-- [11372] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_link_encrypted" label="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_LABEL" description="COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_DESCRIPTION" heading="h4" class="alert alert-info note_link_encrypted" close="true" />
<!-- [11453] Manual_files Field. Type: Dropboxfiles. (custom) -->
<!-- [11479] Manual_files Field. Type: Dropboxfiles. (custom) -->
<field
type="dropboxfiles"
name="manual_files"
@ -277,7 +277,7 @@
required="true"
button="false"
/>
<!-- [11332] Scripture Field. Type: Text. (joomla) -->
<!-- [11358] Scripture Field. Type: Text. (joomla) -->
<field
type="text"
name="scripture"
@ -293,7 +293,7 @@
message="Error! Please add some scripture reference here."
hint="COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_HINT"
/>
<!-- [11332] Url Field. Type: Url. (joomla) -->
<!-- [11358] Url Field. Type: Url. (joomla) -->
<field
type="url"
name="url"
@ -308,7 +308,7 @@
message="Error! Please add sermon url here."
hint="COM_SERMONDISTRIBUTOR_SERMON_URL_HINT"
/>
<!-- [11246] Build Field. Type: Radio. (joomla) -->
<!-- [11272] Build Field. Type: Radio. (joomla) -->
<field
type="radio"
name="build"
@ -317,13 +317,13 @@
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- [11318] Option Set. -->
<!-- [11344] Option Set. -->
<option value="1">
COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option>
<option value="2">
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option>
</field>
<!-- [11332] Auto_sermons Field. Type: Hidden. (joomla) -->
<!-- [11358] Auto_sermons Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="auto_sermons"
@ -331,11 +331,11 @@
/>
</fieldset>
<!-- [11115] Metadata Fields. -->
<!-- [11141] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11119] Robots Field. Type: List (joomla) -->
<!-- [11145] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -346,13 +346,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11130] Author Field. Type: Text (joomla) -->
<!-- [11156] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11136] Rights Field. Type: Textarea (joomla) -->
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -360,15 +360,15 @@
</fieldset>
</fields>
<!-- [10019] Access Control Fields. -->
<!-- [10045] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10021] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10027] Rules Field. Type: Rules (joomla) -->
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -4,15 +4,15 @@
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
>
<fieldset name="details">
<!-- [10985] Default Fields. -->
<!-- [10986] Id Field. Type: Text (joomla) -->
<!-- [11011] Default Fields. -->
<!-- [11012] Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- [10993] Date Created Field. Type: Calendar (joomla) -->
<!-- [11019] Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
@ -22,14 +22,14 @@
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- [11004] User Created Field. Type: User (joomla) -->
<!-- [11030] User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_LABEL"
description="COM_SERMONDISTRIBUTOR_STATISTIC_CREATED_BY_DESC"
/>
<!-- [11012] Published Field. Type: List (joomla) -->
<!-- [11038] Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
@ -42,18 +42,18 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- [11027] Date Modified Field. Type: Calendar (joomla) -->
<!-- [11053] Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- [11031] User Modified Field. Type: User (joomla) -->
<!-- [11057] User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- [11041] Access Field. Type: Accesslevel (joomla) -->
<!-- [11067] Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
@ -61,7 +61,7 @@
default="1"
required="false"
/>
<!-- [11051] Ordering Field. Type: Numbers (joomla) -->
<!-- [11077] Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
@ -72,7 +72,7 @@
size="6"
required="false"
/>
<!-- [11063] Version Field. Type: Text (joomla) -->
<!-- [11089] Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
@ -83,7 +83,7 @@
readonly="true"
filter="unset"
/>
<!-- [11077] Metakey Field. Type: Textarea (joomla) -->
<!-- [11103] Metakey Field. Type: Textarea (joomla) -->
<field
name="metakey"
type="textarea"
@ -92,7 +92,7 @@
rows="3"
cols="30"
/>
<!-- [11086] Metadesc Field. Type: Textarea (joomla) -->
<!-- [11112] Metadesc Field. Type: Textarea (joomla) -->
<field
name="metadesc"
type="textarea"
@ -101,8 +101,8 @@
rows="3"
cols="30"
/>
<!-- [11096] Dynamic Fields. -->
<!-- [11332] Filename Field. Type: Text. (joomla) -->
<!-- [11122] Dynamic Fields. -->
<!-- [11358] Filename Field. Type: Text. (joomla) -->
<field
type="text"
name="filename"
@ -116,7 +116,7 @@
message="Error! Please add file name here."
hint="COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_HINT"
/>
<!-- [11453] Sermon Field. Type: Sermon. (custom) -->
<!-- [11479] Sermon Field. Type: Sermon. (custom) -->
<field
type="sermon"
name="sermon"
@ -127,7 +127,7 @@
required="true"
button="true"
/>
<!-- [11453] Preacher Field. Type: Preachers. (custom) -->
<!-- [11479] Preacher Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="preacher"
@ -138,7 +138,7 @@
default="0"
button="true"
/>
<!-- [11453] Series Field. Type: Series. (custom) -->
<!-- [11479] Series Field. Type: Series. (custom) -->
<field
type="series"
name="series"
@ -149,7 +149,7 @@
default="0"
button="true"
/>
<!-- [11332] Counter Field. Type: Text. (joomla) -->
<!-- [11358] Counter Field. Type: Text. (joomla) -->
<field
type="text"
name="counter"
@ -165,11 +165,11 @@
/>
</fieldset>
<!-- [11115] Metadata Fields. -->
<!-- [11141] Metadata Fields. -->
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="vdmmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<!-- [11119] Robots Field. Type: List (joomla) -->
<!-- [11145] Robots Field. Type: List (joomla) -->
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
@ -180,13 +180,13 @@
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<!-- [11130] Author Field. Type: Text (joomla) -->
<!-- [11156] Author Field. Type: Text (joomla) -->
<field name="author"
type="text"
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
size="20"
/>
<!-- [11136] Rights Field. Type: Textarea (joomla) -->
<!-- [11162] Rights Field. Type: Textarea (joomla) -->
<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"
cols="30" rows="2"
@ -194,15 +194,15 @@
</fieldset>
</fields>
<!-- [10019] Access Control Fields. -->
<!-- [10045] Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- [10021] Asset Id Field. Type: Hidden (joomla) -->
<!-- [10047] Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- [10027] Rules Field. Type: Rules (joomla) -->
<!-- [10053] Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"

View File

@ -92,7 +92,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
if (!empty($item->groups))
{
// [3986] JSON Decode groups.
// [3989] JSON Decode groups.
$item->groups = json_decode($item->groups,true);
}
@ -117,7 +117,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9532] Get the form.
{ // [9558] Get the form.
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -127,12 +127,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9617] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9622] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -140,34 +140,34 @@ class SermondistributorModelHelp_document extends JModelAdmin
$user = JFactory::getUser();
// [9628] Check for existing item.
// [9629] Modify the form based on Edit State access controls.
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $id))
|| ($id == 0 && !$user->authorise('help_document.edit.state', 'com_sermondistributor')))
{
// [9642] Disable fields for display.
// [9668] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9645] Disable fields while saving.
// [9671] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9650] Modify the form based on Edit Creaded By access controls.
// [9676] Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
{
// [9662] Disable fields for display.
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9664] Disable fields for display.
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9666] Disable fields while saving.
// [9692] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9669] Modify the form based on Edit Creaded Date access controls.
// [9695] Modify the form based on Edit Creaded Date access controls.
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
{
// [9681] Disable fields for display.
// [9707] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9683] Disable fields while saving.
// [9709] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -203,7 +203,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
$user = JFactory::getUser();
// [9833] The record has been set. Check the record permissions.
// [9859] The record has been set. Check the record permissions.
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
}
return false;
@ -225,14 +225,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
if ($recordId)
{
// [9920] The record has been set. Check the record permissions.
// [9946] The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit.state', 'com_sermondistributor.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9937] In the absense of better information, revert to the component permissions.
// [9963] In the absense of better information, revert to the component permissions.
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
}
@ -247,7 +247,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9745] Check specific edit permission then general edit permission.
// [9771] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('help_document.edit', 'com_sermondistributor.help_document.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('help_document.edit', 'com_sermondistributor');
@ -346,20 +346,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [8736] check if the not_required field is set
// [8762] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// [8741] now change the required field attributes value
// [8767] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [8744] make sure there is a string value
// [8770] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [8747] change to false
// [8773] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [8749] also clear the data set
// [8775] also clear the data set
$data[$requiredField] = '';
}
}
@ -490,7 +490,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4898] Set some needed variables.
// [4924] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -504,12 +504,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4918] get list of uniqe fields
// [4944] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4920] remove move_copy from array
// [4946] remove move_copy from array
unset($values['move_copy']);
// [4923] make sure published is set
// [4949] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -521,21 +521,21 @@ class SermondistributorModelHelp_document extends JModelAdmin
$newIds = array();
// [4960] Parent exists so let's proceed
// [4986] Parent exists so let's proceed
while (!empty($pks))
{
// [4963] Pop the first ID off the stack
// [4989] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4968] only allow copy if user may edit this item.
// [4994] only allow copy if user may edit this item.
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
// [4978] Not fatal error
// [5004] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -543,19 +543,19 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [4983] Check that the row actually exists
// [5009] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4988] Fatal error
// [5014] Fatal error
$this->setError($error);
return false;
}
else
{
// [4995] Not fatal error
// [5021] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -563,7 +563,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
// [5031] insert all set values
// [5057] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -575,7 +575,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5043] update all uniqe fields
// [5069] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -584,13 +584,13 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5052] Reset the ID because we are making a copy
// [5078] Reset the ID because we are making a copy
$this->table->id = 0;
// [5055] TODO: Deal with ordering?
// [5056] $this->table->ordering = 1;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5058] Check the row.
// [5084] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -603,7 +603,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5071] Store the row.
// [5097] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -611,14 +611,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [5079] Get the new item ID
// [5105] Get the new item ID
$newId = $this->table->get('id');
// [5082] Add the new ID to the array
// [5108] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5086] Clean the cache
// [5112] Clean the cache
$this->cleanCache();
return $newIds;
@ -639,7 +639,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4700] Set some needed variables.
// [4726] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -654,15 +654,15 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4722] make sure published only updates if user has the permission.
// [4748] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
{
unset($values['published']);
}
// [4735] remove move_copy from array
// [4761] remove move_copy from array
unset($values['move_copy']);
// [4756] Parent exists so we proceed
// [4782] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
@ -672,30 +672,30 @@ class SermondistributorModelHelp_document extends JModelAdmin
return false;
}
// [4773] Check that the row actually exists
// [4799] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4778] Fatal error
// [4804] Fatal error
$this->setError($error);
return false;
}
else
{
// [4785] Not fatal error
// [4811] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4791] insert all set values.
// [4817] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4796] Do special action for access.
// [4822] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -708,7 +708,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
// [4808] Check the row.
// [4834] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -721,7 +721,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4821] Store the row.
// [4847] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -730,7 +730,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [4830] Clean the cache
// [4856] Clean the cache
$this->cleanCache();
return true;
@ -760,7 +760,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// [4096] Set the groups string to JSON string.
// [4099] Set the groups string to JSON string.
if (isset($data['groups']))
{
$data['groups'] = (string) json_encode($data['groups']);
@ -774,7 +774,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['params'] = (string) $params;
}
// [5112] Alter the title for save as copy
// [5138] Alter the title for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -797,7 +797,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
$data['published'] = 0;
}
// [5139] Automatic handling of alias for empty fields
// [5165] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -828,10 +828,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
}
}
// [5178] Alter the uniqe field for save as copy
// [5204] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5181] Automatic handling of other uniqe fields
// [5207] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -885,7 +885,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5212] Alter the title & alias
// [5238] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -108,16 +108,16 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
// [10502] check in items
// [10528] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -128,7 +128,7 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [10648] decode groups
// [10674] decode groups
$groupsArray = json_decode($item->groups, true);
if (SermondistributorHelper::checkArray($groupsArray))
{
@ -151,14 +151,14 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [10843] set selection value to a translatable value
// [10869] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10850] convert type
// [10876] convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// [10850] convert location
// [10876] convert location
$item->location = $this->selectionTranslation($item->location, 'location');
}
}
@ -175,7 +175,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [10876] Array of type language strings
// [10902] Array of type language strings
if ($name == 'type')
{
$typeArray = array(
@ -184,20 +184,20 @@ class SermondistributorModelHelp_documents extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// [10876] Array of location language strings
// [10902] Array of location language strings
if ($name == 'location')
{
$locationArray = array(
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
{
return $locationArray[$value];
@ -213,19 +213,19 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getListQuery()
{
// [7363] Get the user object.
// [7389] Get the user object.
$user = JFactory::getUser();
// [7365] Create a new query object.
// [7391] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7368] Select some fields
// [7394] Select some fields
$query->select('a.*');
// [7375] From the sermondistributor_item table
// [7401] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
// [7389] Filter by published state
// [7415] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -236,21 +236,21 @@ class SermondistributorModelHelp_documents extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7401] Join over the asset groups.
// [7427] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7404] Filter by access level.
// [7430] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7409] Implement View Level Access
// [7435] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7486] Filter by search.
// [7512] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -265,28 +265,28 @@ class SermondistributorModelHelp_documents extends JModelList
}
}
// [7729] Filter by Type.
// [7755] Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
}
// [7729] Filter by Location.
// [7755] Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
}
// [7729] Filter by Admin_view.
// [7755] Filter by Admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
}
// [7729] Filter by Site_view.
// [7755] Filter by Site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
}
// [7445] Add the list ordering clause.
// [7471] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -304,42 +304,42 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExportData($pks)
{
// [7153] setup the query
// [7179] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7156] Get the user object.
// [7182] Get the user object.
$user = JFactory::getUser();
// [7158] Create a new query object.
// [7184] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7161] Select some fields
// [7187] Select some fields
$query->select('a.*');
// [7163] From the sermondistributor_help_document table
// [7189] From the sermondistributor_help_document table
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7173] Implement View Level Access
// [7199] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7180] Order the results by ordering
// [7206] Order the results by ordering
$query->order('a.ordering ASC');
// [7182] Load the items
// [7208] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -350,13 +350,13 @@ class SermondistributorModelHelp_documents extends JModelList
continue;
}
// [10790] unset the values we don't want exported.
// [10816] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10799] Add headers to items array.
// [10825] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -375,13 +375,13 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getExImPortHeaders()
{
// [7202] Get a db connection.
// [7228] Get a db connection.
$db = JFactory::getDbo();
// [7204] get the columns
// [7230] get the columns
$columns = $db->getTableColumns("#__sermondistributor_help_document");
if (SermondistributorHelper::checkArray($columns))
{
// [7208] remove the headers you don't import/export.
// [7234] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -403,7 +403,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function getStoreId($id = '')
{
// [10125] Compile the store id.
// [10151] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -427,15 +427,15 @@ class SermondistributorModelHelp_documents extends JModelList
*/
protected function checkInNow()
{
// [10518] Get set check in time
// [10544] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10523] Get a db connection.
// [10549] Get a db connection.
$db = JFactory::getDbo();
// [10525] reset query
// [10551] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document'));
@ -443,24 +443,24 @@ class SermondistributorModelHelp_documents extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10533] Get Yesterdays date
// [10559] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10535] reset query
// [10561] reset query
$query = $db->getQuery(true);
// [10537] Fields to update.
// [10563] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10542] Conditions for which records should be updated.
// [10568] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10547] Check table
// [10573] Check table
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -96,7 +96,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.preacher');
}
}
$this->preacherghlu = $item->id;
$this->preacherepnh = $item->id;
return $item;
}
@ -106,74 +106,74 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getSlqsermons()
public function getXhfsermons()
{
// [6911] Get the user object.
// [6937] Get the user object.
$user = JFactory::getUser();
// [6913] Create a new query object.
// [6939] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6916] Select some fields
// [6942] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [6923] From the sermondistributor_sermon table
// [6949] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7516] From the sermondistributor_preacher table.
// [7542] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7516] From the sermondistributor_series table.
// [7542] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [6939] Filter by preacherghlu global.
$preacherghlu = $this->preacherghlu;
if (is_numeric($preacherghlu ))
// [6965] Filter by preacherepnh global.
$preacherepnh = $this->preacherepnh;
if (is_numeric($preacherepnh ))
{
$query->where('a.preacher = ' . (int) $preacherghlu );
$query->where('a.preacher = ' . (int) $preacherepnh );
}
elseif (is_string($preacherghlu))
elseif (is_string($preacherepnh))
{
$query->where('a.preacher = ' . $db->quote($preacherghlu));
$query->where('a.preacher = ' . $db->quote($preacherepnh));
}
else
{
$query->where('a.preacher = -5');
}
// [6956] Join over the asset groups.
// [6982] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6959] Filter by access level.
// [6985] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6964] Implement View Level Access
// [6990] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6971] Order the results by ordering
// [6997] Order the results by ordering
$query->order('a.ordering ASC');
// [6973] Load the items
// [6999] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -187,15 +187,15 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [10843] set selection value to a translatable value
// [10869] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10850] convert link_type
$item->link_type = $this->selectionTranslationSlqsermons($item->link_type, 'link_type');
// [10850] convert source
$item->source = $this->selectionTranslationSlqsermons($item->source, 'source');
// [10876] convert link_type
$item->link_type = $this->selectionTranslationXhfsermons($item->link_type, 'link_type');
// [10876] convert source
$item->source = $this->selectionTranslationXhfsermons($item->source, 'source');
}
}
@ -209,22 +209,22 @@ class SermondistributorModelPreacher extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationSlqsermons($value,$name)
public function selectionTranslationXhfsermons($value,$name)
{
// [10876] Array of link_type language strings
// [10902] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10876] Array of source language strings
// [10902] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -233,7 +233,7 @@ class SermondistributorModelPreacher extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -253,7 +253,7 @@ class SermondistributorModelPreacher extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9532] Get the form.
{ // [9558] Get the form.
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -263,12 +263,12 @@ class SermondistributorModelPreacher extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9617] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9622] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -276,36 +276,36 @@ class SermondistributorModelPreacher extends JModelAdmin
$user = JFactory::getUser();
// [9628] Check for existing item.
// [9629] Modify the form based on Edit State access controls.
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.state', 'com_sermondistributor')))
{
// [9642] Disable fields for display.
// [9668] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9645] Disable fields while saving.
// [9671] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9650] Modify the form based on Edit Creaded By access controls.
// [9676] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created_by', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created_by', 'com_sermondistributor')))
{
// [9662] Disable fields for display.
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9664] Disable fields for display.
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9666] Disable fields while saving.
// [9692] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9669] Modify the form based on Edit Creaded Date access controls.
// [9695] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('preacher.edit.created', 'com_sermondistributor.preacher.' . (int) $id))
|| ($id == 0 && !$user->authorise('preacher.edit.created', 'com_sermondistributor')))
{
// [9681] Disable fields for display.
// [9707] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9683] Disable fields while saving.
// [9709] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -341,7 +341,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
$user = JFactory::getUser();
// [9833] The record has been set. Check the record permissions.
// [9859] The record has been set. Check the record permissions.
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
}
return false;
@ -363,14 +363,14 @@ class SermondistributorModelPreacher extends JModelAdmin
if ($recordId)
{
// [9920] The record has been set. Check the record permissions.
// [9946] The record has been set. Check the record permissions.
$permission = $user->authorise('preacher.edit.state', 'com_sermondistributor.preacher.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9937] In the absense of better information, revert to the component permissions.
// [9963] In the absense of better information, revert to the component permissions.
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
}
@ -385,7 +385,7 @@ class SermondistributorModelPreacher extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9745] Check specific edit permission then general edit permission.
// [9771] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('preacher.edit', 'com_sermondistributor.preacher.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('preacher.edit', 'com_sermondistributor');
@ -592,7 +592,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4898] Set some needed variables.
// [4924] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -606,12 +606,12 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4918] get list of uniqe fields
// [4944] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4920] remove move_copy from array
// [4946] remove move_copy from array
unset($values['move_copy']);
// [4923] make sure published is set
// [4949] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -623,21 +623,21 @@ class SermondistributorModelPreacher extends JModelAdmin
$newIds = array();
// [4960] Parent exists so let's proceed
// [4986] Parent exists so let's proceed
while (!empty($pks))
{
// [4963] Pop the first ID off the stack
// [4989] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4968] only allow copy if user may edit this item.
// [4994] only allow copy if user may edit this item.
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
{
// [4978] Not fatal error
// [5004] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -645,19 +645,19 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [4983] Check that the row actually exists
// [5009] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4988] Fatal error
// [5014] Fatal error
$this->setError($error);
return false;
}
else
{
// [4995] Not fatal error
// [5021] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -665,7 +665,7 @@ class SermondistributorModelPreacher extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5031] insert all set values
// [5057] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -677,7 +677,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5043] update all uniqe fields
// [5069] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -686,13 +686,13 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5052] Reset the ID because we are making a copy
// [5078] Reset the ID because we are making a copy
$this->table->id = 0;
// [5055] TODO: Deal with ordering?
// [5056] $this->table->ordering = 1;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5058] Check the row.
// [5084] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -705,7 +705,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5071] Store the row.
// [5097] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -713,14 +713,14 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [5079] Get the new item ID
// [5105] Get the new item ID
$newId = $this->table->get('id');
// [5082] Add the new ID to the array
// [5108] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5086] Clean the cache
// [5112] Clean the cache
$this->cleanCache();
return $newIds;
@ -741,7 +741,7 @@ class SermondistributorModelPreacher extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4700] Set some needed variables.
// [4726] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -756,15 +756,15 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4722] make sure published only updates if user has the permission.
// [4748] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('preacher.edit.state'))
{
unset($values['published']);
}
// [4735] remove move_copy from array
// [4761] remove move_copy from array
unset($values['move_copy']);
// [4756] Parent exists so we proceed
// [4782] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
@ -774,30 +774,30 @@ class SermondistributorModelPreacher extends JModelAdmin
return false;
}
// [4773] Check that the row actually exists
// [4799] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4778] Fatal error
// [4804] Fatal error
$this->setError($error);
return false;
}
else
{
// [4785] Not fatal error
// [4811] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4791] insert all set values.
// [4817] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4796] Do special action for access.
// [4822] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -810,7 +810,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
// [4808] Check the row.
// [4834] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -823,7 +823,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4821] Store the row.
// [4847] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -832,7 +832,7 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [4830] Clean the cache
// [4856] Clean the cache
$this->cleanCache();
return true;
@ -870,7 +870,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['params'] = (string) $params;
}
// [5112] Alter the name for save as copy
// [5138] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -893,7 +893,7 @@ class SermondistributorModelPreacher extends JModelAdmin
$data['published'] = 0;
}
// [5139] Automatic handling of alias for empty fields
// [5165] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -924,10 +924,10 @@ class SermondistributorModelPreacher extends JModelAdmin
}
}
// [5178] Alter the uniqe field for save as copy
// [5204] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5181] Automatic handling of other uniqe fields
// [5207] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -981,7 +981,7 @@ class SermondistributorModelPreacher extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5212] Alter the title & alias
// [5238] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -96,16 +96,16 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
// [10502] check in items
// [10528] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -130,19 +130,19 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getListQuery()
{
// [7363] Get the user object.
// [7389] Get the user object.
$user = JFactory::getUser();
// [7365] Create a new query object.
// [7391] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7368] Select some fields
// [7394] Select some fields
$query->select('a.*');
// [7375] From the sermondistributor_item table
// [7401] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
// [7389] Filter by published state
// [7415] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -153,21 +153,21 @@ class SermondistributorModelPreachers extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7401] Join over the asset groups.
// [7427] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7404] Filter by access level.
// [7430] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7409] Implement View Level Access
// [7435] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7486] Filter by search.
// [7512] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -183,7 +183,7 @@ class SermondistributorModelPreachers extends JModelList
}
// [7445] Add the list ordering clause.
// [7471] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -201,42 +201,42 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExportData($pks)
{
// [7153] setup the query
// [7179] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7156] Get the user object.
// [7182] Get the user object.
$user = JFactory::getUser();
// [7158] Create a new query object.
// [7184] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7161] Select some fields
// [7187] Select some fields
$query->select('a.*');
// [7163] From the sermondistributor_preacher table
// [7189] From the sermondistributor_preacher table
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7173] Implement View Level Access
// [7199] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7180] Order the results by ordering
// [7206] Order the results by ordering
$query->order('a.ordering ASC');
// [7182] Load the items
// [7208] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -247,13 +247,13 @@ class SermondistributorModelPreachers extends JModelList
continue;
}
// [10790] unset the values we don't want exported.
// [10816] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10799] Add headers to items array.
// [10825] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -272,13 +272,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getExImPortHeaders()
{
// [7202] Get a db connection.
// [7228] Get a db connection.
$db = JFactory::getDbo();
// [7204] get the columns
// [7230] get the columns
$columns = $db->getTableColumns("#__sermondistributor_preacher");
if (SermondistributorHelper::checkArray($columns))
{
// [7208] remove the headers you don't import/export.
// [7234] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -300,7 +300,7 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function getStoreId($id = '')
{
// [10125] Compile the store id.
// [10151] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -321,15 +321,15 @@ class SermondistributorModelPreachers extends JModelList
*/
protected function checkInNow()
{
// [10518] Get set check in time
// [10544] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10523] Get a db connection.
// [10549] Get a db connection.
$db = JFactory::getDbo();
// [10525] reset query
// [10551] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher'));
@ -337,24 +337,24 @@ class SermondistributorModelPreachers extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10533] Get Yesterdays date
// [10559] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10535] reset query
// [10561] reset query
$query = $db->getQuery(true);
// [10537] Fields to update.
// [10563] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10542] Conditions for which records should be updated.
// [10568] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10547] Check table
// [10573] Check table
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -96,7 +96,7 @@ class SermondistributorModelSeries extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.series');
}
}
$this->seriesdytn = $item->id;
$this->seriesiueg = $item->id;
return $item;
}
@ -106,74 +106,74 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getGrqsermons()
public function getHspsermons()
{
// [6911] Get the user object.
// [6937] Get the user object.
$user = JFactory::getUser();
// [6913] Create a new query object.
// [6939] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6916] Select some fields
// [6942] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [6923] From the sermondistributor_sermon table
// [6949] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7516] From the sermondistributor_preacher table.
// [7542] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7516] From the sermondistributor_series table.
// [7542] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [6939] Filter by seriesdytn global.
$seriesdytn = $this->seriesdytn;
if (is_numeric($seriesdytn ))
// [6965] Filter by seriesiueg global.
$seriesiueg = $this->seriesiueg;
if (is_numeric($seriesiueg ))
{
$query->where('a.series = ' . (int) $seriesdytn );
$query->where('a.series = ' . (int) $seriesiueg );
}
elseif (is_string($seriesdytn))
elseif (is_string($seriesiueg))
{
$query->where('a.series = ' . $db->quote($seriesdytn));
$query->where('a.series = ' . $db->quote($seriesiueg));
}
else
{
$query->where('a.series = -5');
}
// [6956] Join over the asset groups.
// [6982] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6959] Filter by access level.
// [6985] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6964] Implement View Level Access
// [6990] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6971] Order the results by ordering
// [6997] Order the results by ordering
$query->order('a.ordering ASC');
// [6973] Load the items
// [6999] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -187,15 +187,15 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [10843] set selection value to a translatable value
// [10869] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10850] convert link_type
$item->link_type = $this->selectionTranslationGrqsermons($item->link_type, 'link_type');
// [10850] convert source
$item->source = $this->selectionTranslationGrqsermons($item->source, 'source');
// [10876] convert link_type
$item->link_type = $this->selectionTranslationHspsermons($item->link_type, 'link_type');
// [10876] convert source
$item->source = $this->selectionTranslationHspsermons($item->source, 'source');
}
}
@ -209,22 +209,22 @@ class SermondistributorModelSeries extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationGrqsermons($value,$name)
public function selectionTranslationHspsermons($value,$name)
{
// [10876] Array of link_type language strings
// [10902] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10876] Array of source language strings
// [10902] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -233,7 +233,7 @@ class SermondistributorModelSeries extends JModelAdmin
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -253,7 +253,7 @@ class SermondistributorModelSeries extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9532] Get the form.
{ // [9558] Get the form.
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -263,12 +263,12 @@ class SermondistributorModelSeries extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9617] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9622] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -276,36 +276,36 @@ class SermondistributorModelSeries extends JModelAdmin
$user = JFactory::getUser();
// [9628] Check for existing item.
// [9629] Modify the form based on Edit State access controls.
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.state', 'com_sermondistributor')))
{
// [9642] Disable fields for display.
// [9668] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9645] Disable fields while saving.
// [9671] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9650] Modify the form based on Edit Creaded By access controls.
// [9676] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('series.edit.created_by', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created_by', 'com_sermondistributor')))
{
// [9662] Disable fields for display.
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9664] Disable fields for display.
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9666] Disable fields while saving.
// [9692] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9669] Modify the form based on Edit Creaded Date access controls.
// [9695] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('series.edit.created', 'com_sermondistributor.series.' . (int) $id))
|| ($id == 0 && !$user->authorise('series.edit.created', 'com_sermondistributor')))
{
// [9681] Disable fields for display.
// [9707] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9683] Disable fields while saving.
// [9709] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -341,7 +341,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
$user = JFactory::getUser();
// [9833] The record has been set. Check the record permissions.
// [9859] The record has been set. Check the record permissions.
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
}
return false;
@ -363,14 +363,14 @@ class SermondistributorModelSeries extends JModelAdmin
if ($recordId)
{
// [9920] The record has been set. Check the record permissions.
// [9946] The record has been set. Check the record permissions.
$permission = $user->authorise('series.edit.state', 'com_sermondistributor.series.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9937] In the absense of better information, revert to the component permissions.
// [9963] In the absense of better information, revert to the component permissions.
return $user->authorise('series.edit.state', 'com_sermondistributor');
}
@ -385,7 +385,7 @@ class SermondistributorModelSeries extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9745] Check specific edit permission then general edit permission.
// [9771] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('series.edit', 'com_sermondistributor.series.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('series.edit', 'com_sermondistributor');
@ -592,7 +592,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4898] Set some needed variables.
// [4924] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -606,12 +606,12 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4918] get list of uniqe fields
// [4944] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4920] remove move_copy from array
// [4946] remove move_copy from array
unset($values['move_copy']);
// [4923] make sure published is set
// [4949] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -623,21 +623,21 @@ class SermondistributorModelSeries extends JModelAdmin
$newIds = array();
// [4960] Parent exists so let's proceed
// [4986] Parent exists so let's proceed
while (!empty($pks))
{
// [4963] Pop the first ID off the stack
// [4989] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4968] only allow copy if user may edit this item.
// [4994] only allow copy if user may edit this item.
if (!$this->user->authorise('series.edit', $contexts[$pk]))
{
// [4978] Not fatal error
// [5004] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -645,19 +645,19 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [4983] Check that the row actually exists
// [5009] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4988] Fatal error
// [5014] Fatal error
$this->setError($error);
return false;
}
else
{
// [4995] Not fatal error
// [5021] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -665,7 +665,7 @@ class SermondistributorModelSeries extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// [5031] insert all set values
// [5057] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -677,7 +677,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5043] update all uniqe fields
// [5069] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -686,13 +686,13 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5052] Reset the ID because we are making a copy
// [5078] Reset the ID because we are making a copy
$this->table->id = 0;
// [5055] TODO: Deal with ordering?
// [5056] $this->table->ordering = 1;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5058] Check the row.
// [5084] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -705,7 +705,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5071] Store the row.
// [5097] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -713,14 +713,14 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [5079] Get the new item ID
// [5105] Get the new item ID
$newId = $this->table->get('id');
// [5082] Add the new ID to the array
// [5108] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5086] Clean the cache
// [5112] Clean the cache
$this->cleanCache();
return $newIds;
@ -741,7 +741,7 @@ class SermondistributorModelSeries extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4700] Set some needed variables.
// [4726] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -756,15 +756,15 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4722] make sure published only updates if user has the permission.
// [4748] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('series.edit.state'))
{
unset($values['published']);
}
// [4735] remove move_copy from array
// [4761] remove move_copy from array
unset($values['move_copy']);
// [4756] Parent exists so we proceed
// [4782] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('series.edit', $contexts[$pk]))
@ -774,30 +774,30 @@ class SermondistributorModelSeries extends JModelAdmin
return false;
}
// [4773] Check that the row actually exists
// [4799] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4778] Fatal error
// [4804] Fatal error
$this->setError($error);
return false;
}
else
{
// [4785] Not fatal error
// [4811] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4791] insert all set values.
// [4817] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4796] Do special action for access.
// [4822] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -810,7 +810,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
// [4808] Check the row.
// [4834] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -823,7 +823,7 @@ class SermondistributorModelSeries extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4821] Store the row.
// [4847] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -832,7 +832,7 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [4830] Clean the cache
// [4856] Clean the cache
$this->cleanCache();
return true;
@ -870,7 +870,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['params'] = (string) $params;
}
// [5112] Alter the name for save as copy
// [5138] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -893,7 +893,7 @@ class SermondistributorModelSeries extends JModelAdmin
$data['published'] = 0;
}
// [5139] Automatic handling of alias for empty fields
// [5165] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -924,10 +924,10 @@ class SermondistributorModelSeries extends JModelAdmin
}
}
// [5178] Alter the uniqe field for save as copy
// [5204] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5181] Automatic handling of other uniqe fields
// [5207] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -981,7 +981,7 @@ class SermondistributorModelSeries extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5212] Alter the title & alias
// [5238] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -92,16 +92,16 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
// [10502] check in items
// [10528] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -126,19 +126,19 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getListQuery()
{
// [7363] Get the user object.
// [7389] Get the user object.
$user = JFactory::getUser();
// [7365] Create a new query object.
// [7391] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7368] Select some fields
// [7394] Select some fields
$query->select('a.*');
// [7375] From the sermondistributor_item table
// [7401] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
// [7389] Filter by published state
// [7415] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -149,21 +149,21 @@ class SermondistributorModelSeries_list extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7401] Join over the asset groups.
// [7427] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7404] Filter by access level.
// [7430] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7409] Implement View Level Access
// [7435] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7486] Filter by search.
// [7512] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -179,7 +179,7 @@ class SermondistributorModelSeries_list extends JModelList
}
// [7445] Add the list ordering clause.
// [7471] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -197,42 +197,42 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExportData($pks)
{
// [7153] setup the query
// [7179] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7156] Get the user object.
// [7182] Get the user object.
$user = JFactory::getUser();
// [7158] Create a new query object.
// [7184] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7161] Select some fields
// [7187] Select some fields
$query->select('a.*');
// [7163] From the sermondistributor_series table
// [7189] From the sermondistributor_series table
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7173] Implement View Level Access
// [7199] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7180] Order the results by ordering
// [7206] Order the results by ordering
$query->order('a.ordering ASC');
// [7182] Load the items
// [7208] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -243,13 +243,13 @@ class SermondistributorModelSeries_list extends JModelList
continue;
}
// [10790] unset the values we don't want exported.
// [10816] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10799] Add headers to items array.
// [10825] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -268,13 +268,13 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getExImPortHeaders()
{
// [7202] Get a db connection.
// [7228] Get a db connection.
$db = JFactory::getDbo();
// [7204] get the columns
// [7230] get the columns
$columns = $db->getTableColumns("#__sermondistributor_series");
if (SermondistributorHelper::checkArray($columns))
{
// [7208] remove the headers you don't import/export.
// [7234] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -296,7 +296,7 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function getStoreId($id = '')
{
// [10125] Compile the store id.
// [10151] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -316,15 +316,15 @@ class SermondistributorModelSeries_list extends JModelList
*/
protected function checkInNow()
{
// [10518] Get set check in time
// [10544] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10523] Get a db connection.
// [10549] Get a db connection.
$db = JFactory::getDbo();
// [10525] reset query
// [10551] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_series'));
@ -332,24 +332,24 @@ class SermondistributorModelSeries_list extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10533] Get Yesterdays date
// [10559] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10535] reset query
// [10561] reset query
$query = $db->getQuery(true);
// [10537] Fields to update.
// [10563] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10542] Conditions for which records should be updated.
// [10568] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10547] Check table
// [10573] Check table
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -92,13 +92,13 @@ class SermondistributorModelSermon extends JModelAdmin
if (!empty($item->local_files))
{
// [3986] JSON Decode local_files.
// [3989] JSON Decode local_files.
$item->local_files = json_decode($item->local_files);
}
if (!empty($item->manual_files))
{
// [3986] JSON Decode manual_files.
// [3989] JSON Decode manual_files.
$item->manual_files = json_decode($item->manual_files);
}
@ -108,7 +108,7 @@ class SermondistributorModelSermon extends JModelAdmin
$item->tags->getTagIds($item->id, 'com_sermondistributor.sermon');
}
}
$this->sermonnrql = $item->id;
$this->sermonqbhv = $item->id;
return $item;
}
@ -118,76 +118,76 @@ class SermondistributorModelSermon extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getUaqstastics()
public function getBagstastics()
{
// [6911] Get the user object.
// [6937] Get the user object.
$user = JFactory::getUser();
// [6913] Create a new query object.
// [6939] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [6916] Select some fields
// [6942] Select some fields
$query->select('a.*');
// [6923] From the sermondistributor_statistic table
// [6949] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [7516] From the sermondistributor_sermon table.
// [7542] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [7516] From the sermondistributor_preacher table.
// [7542] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [7516] From the sermondistributor_series table.
// [7542] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [6939] Filter by sermonnrql global.
$sermonnrql = $this->sermonnrql;
if (is_numeric($sermonnrql ))
// [6965] Filter by sermonqbhv global.
$sermonqbhv = $this->sermonqbhv;
if (is_numeric($sermonqbhv ))
{
$query->where('a.sermon = ' . (int) $sermonnrql );
$query->where('a.sermon = ' . (int) $sermonqbhv );
}
elseif (is_string($sermonnrql))
elseif (is_string($sermonqbhv))
{
$query->where('a.sermon = ' . $db->quote($sermonnrql));
$query->where('a.sermon = ' . $db->quote($sermonqbhv));
}
else
{
$query->where('a.sermon = -5');
}
// [6956] Join over the asset groups.
// [6982] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [6959] Filter by access level.
// [6985] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [6964] Implement View Level Access
// [6990] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [6971] Order the results by ordering
// [6997] Order the results by ordering
$query->order('a.ordering ASC');
// [6973] Load the items
// [6999] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -216,7 +216,7 @@ class SermondistributorModelSermon extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9532] Get the form.
{ // [9558] Get the form.
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -226,17 +226,17 @@ class SermondistributorModelSermon extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9559] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9585] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9564] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9590] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
// [9569] Determine correct permissions to check.
// [9595] Determine correct permissions to check.
if ($this->getState('sermon.id'))
{
$id = $this->getState('sermon.id');
@ -244,56 +244,56 @@ class SermondistributorModelSermon extends JModelAdmin
$catid = 0;
if (isset($this->getItem($id)->catid))
{
// [9576] set catagory id
// [9602] set catagory id
$catid = $this->getItem($id)->catid;
// [9578] Existing record. Can only edit in selected categories.
// [9604] Existing record. Can only edit in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit');
// [9580] Existing record. Can only edit own items in selected categories.
// [9606] Existing record. Can only edit own items in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
}
}
else
{
// [9586] New record. Can only create in selected categories.
// [9612] New record. Can only create in selected categories.
$form->setFieldAttribute('catid', 'action', 'core.create');
}
$user = JFactory::getUser();
// [9590] Check for existing item.
// [9591] Modify the form based on Edit State access controls.
// [9616] Check for existing item.
// [9617] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $id))
|| (isset($catid) && $catid != 0 && !$user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $catid))
|| ($id == 0 && !$user->authorise('sermon.edit.state', 'com_sermondistributor')))
{
// [9606] Disable fields for display.
// [9632] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9609] Disable fields while saving.
// [9635] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9650] Modify the form based on Edit Creaded By access controls.
// [9676] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created_by', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created_by', 'com_sermondistributor')))
{
// [9662] Disable fields for display.
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9664] Disable fields for display.
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9666] Disable fields while saving.
// [9692] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9669] Modify the form based on Edit Creaded Date access controls.
// [9695] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('sermon.edit.created', 'com_sermondistributor.sermon.' . (int) $id))
|| ($id == 0 && !$user->authorise('sermon.edit.created', 'com_sermondistributor')))
{
// [9681] Disable fields for display.
// [9707] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9683] Disable fields while saving.
// [9709] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -333,7 +333,7 @@ class SermondistributorModelSermon extends JModelAdmin
if ($allow)
{
// [9804] The record has been set. Check the record permissions.
// [9830] The record has been set. Check the record permissions.
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
}
return $allow;
@ -357,14 +357,14 @@ class SermondistributorModelSermon extends JModelAdmin
if ($recordId)
{
// [9877] The record has been set. Check the record permissions.
// [9903] The record has been set. Check the record permissions.
$permission = $user->authorise('sermon.edit.state', 'com_sermondistributor.sermon.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9893] Check against the category.
// [9919] Check against the category.
if (!empty($record->catid))
{
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
@ -373,7 +373,7 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
}
// [9904] In the absense of better information, revert to the component permissions.
// [9930] In the absense of better information, revert to the component permissions.
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
}
@ -388,7 +388,7 @@ class SermondistributorModelSermon extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9745] Check specific edit permission then general edit permission.
// [9771] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('sermon.edit', 'com_sermondistributor.sermon.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('sermon.edit', 'com_sermondistributor');
@ -487,20 +487,20 @@ class SermondistributorModelSermon extends JModelAdmin
*/
public function validate($form, $data, $group = null)
{
// [8736] check if the not_required field is set
// [8762] check if the not_required field is set
if (SermondistributorHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// [8741] now change the required field attributes value
// [8767] now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// [8744] make sure there is a string value
// [8770] make sure there is a string value
if (SermondistributorHelper::checkString($requiredField))
{
// [8747] change to false
// [8773] change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// [8749] also clear the data set
// [8775] also clear the data set
$data[$requiredField] = '';
}
}
@ -631,7 +631,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4898] Set some needed variables.
// [4924] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -645,12 +645,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4918] get list of uniqe fields
// [4944] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4920] remove move_copy from array
// [4946] remove move_copy from array
unset($values['move_copy']);
// [4923] make sure published is set
// [4949] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -666,7 +666,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [4948] move the category value to correct field name
// [4974] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -677,21 +677,21 @@ class SermondistributorModelSermon extends JModelAdmin
$newIds = array();
// [4960] Parent exists so let's proceed
// [4986] Parent exists so let's proceed
while (!empty($pks))
{
// [4963] Pop the first ID off the stack
// [4989] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4968] only allow copy if user may edit this item.
// [4994] only allow copy if user may edit this item.
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
{
// [4978] Not fatal error
// [5004] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -699,19 +699,19 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [4983] Check that the row actually exists
// [5009] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4988] Fatal error
// [5014] Fatal error
$this->setError($error);
return false;
}
else
{
// [4995] Not fatal error
// [5021] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -726,7 +726,7 @@ class SermondistributorModelSermon extends JModelAdmin
list($this->table->name, $this->table->alias) = $this->generateNewTitle($this->table->catid, $this->table->alias, $this->table->name);
}
// [5031] insert all set values
// [5057] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -738,7 +738,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5043] update all uniqe fields
// [5069] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -747,13 +747,13 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5052] Reset the ID because we are making a copy
// [5078] Reset the ID because we are making a copy
$this->table->id = 0;
// [5055] TODO: Deal with ordering?
// [5056] $this->table->ordering = 1;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5058] Check the row.
// [5084] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -766,7 +766,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5071] Store the row.
// [5097] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -774,14 +774,14 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [5079] Get the new item ID
// [5105] Get the new item ID
$newId = $this->table->get('id');
// [5082] Add the new ID to the array
// [5108] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5086] Clean the cache
// [5112] Clean the cache
$this->cleanCache();
return $newIds;
@ -802,7 +802,7 @@ class SermondistributorModelSermon extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4700] Set some needed variables.
// [4726] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -817,12 +817,12 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4722] make sure published only updates if user has the permission.
// [4748] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('sermon.edit.state'))
{
unset($values['published']);
}
// [4735] remove move_copy from array
// [4761] remove move_copy from array
unset($values['move_copy']);
if (isset($values['category']) && (int) $values['category'] > 0 && !static::checkCategoryId($values['category']))
@ -831,7 +831,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
elseif (isset($values['category']) && (int) $values['category'] > 0)
{
// [4746] move the category value to correct field name
// [4772] move the category value to correct field name
$values['catid'] = $values['category'];
unset($values['category']);
}
@ -841,7 +841,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [4756] Parent exists so we proceed
// [4782] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
@ -851,30 +851,30 @@ class SermondistributorModelSermon extends JModelAdmin
return false;
}
// [4773] Check that the row actually exists
// [4799] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4778] Fatal error
// [4804] Fatal error
$this->setError($error);
return false;
}
else
{
// [4785] Not fatal error
// [4811] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4791] insert all set values.
// [4817] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4796] Do special action for access.
// [4822] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -887,7 +887,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
// [4808] Check the row.
// [4834] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -900,7 +900,7 @@ class SermondistributorModelSermon extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4821] Store the row.
// [4847] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -909,7 +909,7 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [4830] Clean the cache
// [4856] Clean the cache
$this->cleanCache();
return true;
@ -939,13 +939,13 @@ class SermondistributorModelSermon extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// [4096] Set the local_files string to JSON string.
// [4099] Set the local_files string to JSON string.
if (isset($data['local_files']))
{
$data['local_files'] = (string) json_encode($data['local_files']);
}
// [4096] Set the manual_files string to JSON string.
// [4099] Set the manual_files string to JSON string.
if (isset($data['manual_files']))
{
$data['manual_files'] = (string) json_encode($data['manual_files']);
@ -959,7 +959,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['params'] = (string) $params;
}
// [5112] Alter the name for save as copy
// [5138] Alter the name for save as copy
if ($input->get('task') == 'save2copy')
{
$origTable = clone $this->getTable();
@ -982,7 +982,7 @@ class SermondistributorModelSermon extends JModelAdmin
$data['published'] = 0;
}
// [5139] Automatic handling of alias for empty fields
// [5165] Automatic handling of alias for empty fields
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
{
if ($data['alias'] == null)
@ -1013,10 +1013,10 @@ class SermondistributorModelSermon extends JModelAdmin
}
}
// [5178] Alter the uniqe field for save as copy
// [5204] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5181] Automatic handling of other uniqe fields
// [5207] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -1070,7 +1070,7 @@ class SermondistributorModelSermon extends JModelAdmin
protected function _generateNewTitle($alias, $title)
{
// [5212] Alter the title & alias
// [5238] Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias)))

View File

@ -40,7 +40,7 @@ class SermondistributorModelSermondistributor extends JModelList
$viewGroups = array(
'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.help_documents')
);
// [12148] view access array
// [12174] view access array
$viewAccess = array(
'preacher.create' => 'preacher.create',
'preachers.access' => 'preacher.access',

View File

@ -124,16 +124,16 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
// [10502] check in items
// [10528] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -147,14 +147,14 @@ class SermondistributorModelSermons extends JModelList
}
}
// [10843] set selection value to a translatable value
// [10869] set selection value to a translatable value
if (SermondistributorHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// [10850] convert link_type
// [10876] convert link_type
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
// [10850] convert source
// [10876] convert source
$item->source = $this->selectionTranslation($item->source, 'source');
}
}
@ -171,20 +171,20 @@ class SermondistributorModelSermons extends JModelList
*/
public function selectionTranslation($value,$name)
{
// [10876] Array of link_type language strings
// [10902] Array of link_type language strings
if ($name == 'link_type')
{
$link_typeArray = array(
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
{
return $link_typeArray[$value];
}
}
// [10876] Array of source language strings
// [10902] Array of source language strings
if ($name == 'source')
{
$sourceArray = array(
@ -193,7 +193,7 @@ class SermondistributorModelSermons extends JModelList
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
);
// [10907] Now check if value is found in this array
// [10933] Now check if value is found in this array
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
{
return $sourceArray[$value];
@ -209,29 +209,29 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getListQuery()
{
// [7363] Get the user object.
// [7389] Get the user object.
$user = JFactory::getUser();
// [7365] Create a new query object.
// [7391] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7368] Select some fields
// [7394] Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// [7375] From the sermondistributor_item table
// [7401] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// [7516] From the sermondistributor_preacher table.
// [7542] From the sermondistributor_preacher table.
$query->select($db->quoteName('g.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'g') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('g.id') . ')');
// [7516] From the sermondistributor_series table.
// [7542] From the sermondistributor_series table.
$query->select($db->quoteName('h.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'h') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('h.id') . ')');
// [7389] Filter by published state
// [7415] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -242,21 +242,21 @@ class SermondistributorModelSermons extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7401] Join over the asset groups.
// [7427] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7404] Filter by access level.
// [7430] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7409] Implement View Level Access
// [7435] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7486] Filter by search.
// [7512] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -271,28 +271,28 @@ class SermondistributorModelSermons extends JModelList
}
}
// [7720] Filter by preacher.
// [7746] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [7720] Filter by series.
// [7746] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [7729] Filter by Link_type.
// [7755] Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
}
// [7729] Filter by Source.
// [7755] Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
}
// [7423] Filter by a single or group of categories.
// [7449] Filter by a single or group of categories.
$baselevel = 1;
$categoryId = $this->getState('filter.category_id');
@ -314,7 +314,7 @@ class SermondistributorModelSermons extends JModelList
}
// [7445] Add the list ordering clause.
// [7471] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -332,42 +332,42 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExportData($pks)
{
// [7153] setup the query
// [7179] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7156] Get the user object.
// [7182] Get the user object.
$user = JFactory::getUser();
// [7158] Create a new query object.
// [7184] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7161] Select some fields
// [7187] Select some fields
$query->select('a.*');
// [7163] From the sermondistributor_sermon table
// [7189] From the sermondistributor_sermon table
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7173] Implement View Level Access
// [7199] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7180] Order the results by ordering
// [7206] Order the results by ordering
$query->order('a.ordering ASC');
// [7182] Load the items
// [7208] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -378,13 +378,13 @@ class SermondistributorModelSermons extends JModelList
continue;
}
// [10790] unset the values we don't want exported.
// [10816] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10799] Add headers to items array.
// [10825] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -403,13 +403,13 @@ class SermondistributorModelSermons extends JModelList
*/
public function getExImPortHeaders()
{
// [7202] Get a db connection.
// [7228] Get a db connection.
$db = JFactory::getDbo();
// [7204] get the columns
// [7230] get the columns
$columns = $db->getTableColumns("#__sermondistributor_sermon");
if (SermondistributorHelper::checkArray($columns))
{
// [7208] remove the headers you don't import/export.
// [7234] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -431,7 +431,7 @@ class SermondistributorModelSermons extends JModelList
*/
protected function getStoreId($id = '')
{
// [10125] Compile the store id.
// [10151] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -459,15 +459,15 @@ class SermondistributorModelSermons extends JModelList
*/
protected function checkInNow()
{
// [10518] Get set check in time
// [10544] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10523] Get a db connection.
// [10549] Get a db connection.
$db = JFactory::getDbo();
// [10525] reset query
// [10551] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon'));
@ -475,24 +475,24 @@ class SermondistributorModelSermons extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10533] Get Yesterdays date
// [10559] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10535] reset query
// [10561] reset query
$query = $db->getQuery(true);
// [10537] Fields to update.
// [10563] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10542] Conditions for which records should be updated.
// [10568] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10547] Check table
// [10573] Check table
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -111,7 +111,7 @@ class SermondistributorModelStatistic extends JModelAdmin
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{ // [9532] Get the form.
{ // [9558] Get the form.
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
@ -121,12 +121,12 @@ class SermondistributorModelStatistic extends JModelAdmin
$jinput = JFactory::getApplication()->input;
// [9617] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
// [9643] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// [9622] The back end uses id so we use that the rest of the time and set it to 0 by default.
// [9648] The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
@ -134,36 +134,36 @@ class SermondistributorModelStatistic extends JModelAdmin
$user = JFactory::getUser();
// [9628] Check for existing item.
// [9629] Modify the form based on Edit State access controls.
// [9654] Check for existing item.
// [9655] Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.state', 'com_sermondistributor')))
{
// [9642] Disable fields for display.
// [9668] Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// [9645] Disable fields while saving.
// [9671] Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// [9650] Modify the form based on Edit Creaded By access controls.
// [9676] Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created_by', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created_by', 'com_sermondistributor')))
{
// [9662] Disable fields for display.
// [9688] Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// [9664] Disable fields for display.
// [9690] Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// [9666] Disable fields while saving.
// [9692] Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// [9669] Modify the form based on Edit Creaded Date access controls.
// [9695] Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('statistic.edit.created', 'com_sermondistributor.statistic.' . (int) $id))
|| ($id == 0 && !$user->authorise('statistic.edit.created', 'com_sermondistributor')))
{
// [9681] Disable fields for display.
// [9707] Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// [9683] Disable fields while saving.
// [9709] Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
@ -199,7 +199,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
$user = JFactory::getUser();
// [9833] The record has been set. Check the record permissions.
// [9859] The record has been set. Check the record permissions.
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
}
return false;
@ -221,14 +221,14 @@ class SermondistributorModelStatistic extends JModelAdmin
if ($recordId)
{
// [9920] The record has been set. Check the record permissions.
// [9946] The record has been set. Check the record permissions.
$permission = $user->authorise('statistic.edit.state', 'com_sermondistributor.statistic.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// [9937] In the absense of better information, revert to the component permissions.
// [9963] In the absense of better information, revert to the component permissions.
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
}
@ -243,7 +243,7 @@ class SermondistributorModelStatistic extends JModelAdmin
*/
protected function allowEdit($data = array(), $key = 'id')
{
// [9745] Check specific edit permission then general edit permission.
// [9771] Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('statistic.edit', 'com_sermondistributor.statistic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('statistic.edit', 'com_sermondistributor');
@ -450,7 +450,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4898] Set some needed variables.
// [4924] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -464,12 +464,12 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4918] get list of uniqe fields
// [4944] get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// [4920] remove move_copy from array
// [4946] remove move_copy from array
unset($values['move_copy']);
// [4923] make sure published is set
// [4949] make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
@ -481,21 +481,21 @@ class SermondistributorModelStatistic extends JModelAdmin
$newIds = array();
// [4960] Parent exists so let's proceed
// [4986] Parent exists so let's proceed
while (!empty($pks))
{
// [4963] Pop the first ID off the stack
// [4989] Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// [4968] only allow copy if user may edit this item.
// [4994] only allow copy if user may edit this item.
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
{
// [4978] Not fatal error
// [5004] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
@ -503,19 +503,19 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [4983] Check that the row actually exists
// [5009] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4988] Fatal error
// [5014] Fatal error
$this->setError($error);
return false;
}
else
{
// [4995] Not fatal error
// [5021] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
@ -523,7 +523,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->table->filename = $this->generateUniqe('filename',$this->table->filename);
// [5031] insert all set values
// [5057] insert all set values
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
@ -535,7 +535,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5043] update all uniqe fields
// [5069] update all uniqe fields
if (SermondistributorHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
@ -544,13 +544,13 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [5052] Reset the ID because we are making a copy
// [5078] Reset the ID because we are making a copy
$this->table->id = 0;
// [5055] TODO: Deal with ordering?
// [5056] $this->table->ordering = 1;
// [5081] TODO: Deal with ordering?
// [5082] $this->table->ordering = 1;
// [5058] Check the row.
// [5084] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -563,7 +563,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [5071] Store the row.
// [5097] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -571,14 +571,14 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [5079] Get the new item ID
// [5105] Get the new item ID
$newId = $this->table->get('id');
// [5082] Add the new ID to the array
// [5108] Add the new ID to the array
$newIds[$pk] = $newId;
}
// [5086] Clean the cache
// [5112] Clean the cache
$this->cleanCache();
return $newIds;
@ -599,7 +599,7 @@ class SermondistributorModelStatistic extends JModelAdmin
{
if (empty($this->batchSet))
{
// [4700] Set some needed variables.
// [4726] Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
@ -614,15 +614,15 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4722] make sure published only updates if user has the permission.
// [4748] make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('statistic.edit.state'))
{
unset($values['published']);
}
// [4735] remove move_copy from array
// [4761] remove move_copy from array
unset($values['move_copy']);
// [4756] Parent exists so we proceed
// [4782] Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
@ -632,30 +632,30 @@ class SermondistributorModelStatistic extends JModelAdmin
return false;
}
// [4773] Check that the row actually exists
// [4799] Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// [4778] Fatal error
// [4804] Fatal error
$this->setError($error);
return false;
}
else
{
// [4785] Not fatal error
// [4811] Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// [4791] insert all set values.
// [4817] insert all set values.
if (SermondistributorHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// [4796] Do special action for access.
// [4822] Do special action for access.
if ('access' == $key && strlen($value) > 0)
{
$this->table->$key = $value;
@ -668,7 +668,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
// [4808] Check the row.
// [4834] Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
@ -681,7 +681,7 @@ class SermondistributorModelStatistic extends JModelAdmin
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// [4821] Store the row.
// [4847] Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
@ -690,7 +690,7 @@ class SermondistributorModelStatistic extends JModelAdmin
}
}
// [4830] Clean the cache
// [4856] Clean the cache
$this->cleanCache();
return true;
@ -728,10 +728,10 @@ class SermondistributorModelStatistic extends JModelAdmin
$data['params'] = (string) $params;
}
// [5178] Alter the uniqe field for save as copy
// [5204] Alter the uniqe field for save as copy
if ($input->get('task') == 'save2copy')
{
// [5181] Automatic handling of other uniqe fields
// [5207] Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (SermondistributorHelper::checkArray($uniqeFields))
{
@ -784,7 +784,7 @@ class SermondistributorModelStatistic extends JModelAdmin
protected function _generateNewTitle($title)
{
// [5236] Alter the title
// [5262] Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))

View File

@ -108,16 +108,16 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
// [10502] check in items
// [10528] check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -142,31 +142,31 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getListQuery()
{
// [7363] Get the user object.
// [7389] Get the user object.
$user = JFactory::getUser();
// [7365] Create a new query object.
// [7391] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7368] Select some fields
// [7394] Select some fields
$query->select('a.*');
// [7375] From the sermondistributor_item table
// [7401] From the sermondistributor_item table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [7516] From the sermondistributor_sermon table.
// [7542] From the sermondistributor_sermon table.
$query->select($db->quoteName('g.name','sermon_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_sermon', 'g') . ' ON (' . $db->quoteName('a.sermon') . ' = ' . $db->quoteName('g.id') . ')');
// [7516] From the sermondistributor_preacher table.
// [7542] From the sermondistributor_preacher table.
$query->select($db->quoteName('h.name','preacher_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_preacher', 'h') . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('h.id') . ')');
// [7516] From the sermondistributor_series table.
// [7542] From the sermondistributor_series table.
$query->select($db->quoteName('i.name','series_name'));
$query->join('LEFT', $db->quoteName('#__sermondistributor_series', 'i') . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('i.id') . ')');
// [7389] Filter by published state
// [7415] Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
@ -177,21 +177,21 @@ class SermondistributorModelStatistics extends JModelList
$query->where('(a.published = 0 OR a.published = 1)');
}
// [7401] Join over the asset groups.
// [7427] Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// [7404] Filter by access level.
// [7430] Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// [7409] Implement View Level Access
// [7435] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7486] Filter by search.
// [7512] Filter by search.
$search = $this->getState('filter.search');
if (!empty($search))
{
@ -206,23 +206,23 @@ class SermondistributorModelStatistics extends JModelList
}
}
// [7720] Filter by sermon.
// [7746] Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
}
// [7720] Filter by preacher.
// [7746] Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
}
// [7720] Filter by series.
// [7746] Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
}
// [7445] Add the list ordering clause.
// [7471] Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
@ -240,42 +240,42 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExportData($pks)
{
// [7153] setup the query
// [7179] setup the query
if (SermondistributorHelper::checkArray($pks))
{
// [7156] Get the user object.
// [7182] Get the user object.
$user = JFactory::getUser();
// [7158] Create a new query object.
// [7184] Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// [7161] Select some fields
// [7187] Select some fields
$query->select('a.*');
// [7163] From the sermondistributor_statistic table
// [7189] From the sermondistributor_statistic table
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// [7173] Implement View Level Access
// [7199] Implement View Level Access
if (!$user->authorise('core.options', 'com_sermondistributor'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// [7180] Order the results by ordering
// [7206] Order the results by ordering
$query->order('a.ordering ASC');
// [7182] Load the items
// [7208] Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [10577] set values to display correctly.
// [10603] set values to display correctly.
if (SermondistributorHelper::checkArray($items))
{
// [10580] get user object.
// [10606] get user object.
$user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
@ -286,13 +286,13 @@ class SermondistributorModelStatistics extends JModelList
continue;
}
// [10790] unset the values we don't want exported.
// [10816] unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
unset($item->checked_out_time);
}
}
// [10799] Add headers to items array.
// [10825] Add headers to items array.
$headers = $this->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers))
{
@ -311,13 +311,13 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getExImPortHeaders()
{
// [7202] Get a db connection.
// [7228] Get a db connection.
$db = JFactory::getDbo();
// [7204] get the columns
// [7230] get the columns
$columns = $db->getTableColumns("#__sermondistributor_statistic");
if (SermondistributorHelper::checkArray($columns))
{
// [7208] remove the headers you don't import/export.
// [7234] remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
@ -339,7 +339,7 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function getStoreId($id = '')
{
// [10125] Compile the store id.
// [10151] Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
@ -363,15 +363,15 @@ class SermondistributorModelStatistics extends JModelList
*/
protected function checkInNow()
{
// [10518] Get set check in time
// [10544] Get set check in time
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
if ($time)
{
// [10523] Get a db connection.
// [10549] Get a db connection.
$db = JFactory::getDbo();
// [10525] reset query
// [10551] reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic'));
@ -379,24 +379,24 @@ class SermondistributorModelStatistics extends JModelList
$db->execute();
if ($db->getNumRows())
{
// [10533] Get Yesterdays date
// [10559] Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// [10535] reset query
// [10561] reset query
$query = $db->getQuery(true);
// [10537] Fields to update.
// [10563] Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// [10542] Conditions for which records should be updated.
// [10568] Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// [10547] Check table
// [10573] Check table
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -48,7 +48,7 @@ class SermondistributorTableHelp_document extends JTable
{
parent::__construct('#__sermondistributor_help_document', 'id', $db);
// [4184] Adding History Options
// [4187] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.help_document'));
}

View File

@ -48,7 +48,7 @@ class SermondistributorTablePreacher extends JTable
{
parent::__construct('#__sermondistributor_preacher', 'id', $db);
// [4184] Adding History Options
// [4187] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.preacher'));
}

View File

@ -48,7 +48,7 @@ class SermondistributorTableSeries extends JTable
{
parent::__construct('#__sermondistributor_series', 'id', $db);
// [4184] Adding History Options
// [4187] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.series'));
}

View File

@ -48,10 +48,10 @@ class SermondistributorTableSermon extends JTable
{
parent::__construct('#__sermondistributor_sermon', 'id', $db);
// [4178] Adding Tag Options
// [4181] Adding Tag Options
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
// [4184] Adding History Options
// [4187] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
}

View File

@ -48,7 +48,7 @@ class SermondistributorTableStatistic extends JTable
{
parent::__construct('#__sermondistributor_statistic', 'id', $db);
// [4184] Adding History Options
// [4187] Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.statistic'));
}

View File

@ -95,93 +95,93 @@ $componentParams = JComponentHelper::getParams('com_sermondistributor');
<script type="text/javascript">
// #jform_location listeners for location_fpmeWpw function
// #jform_location listeners for location_HJpAkRW function
jQuery('#jform_location').on('keyup',function()
{
var location_fpmeWpw = jQuery("#jform_location input[type='radio']:checked").val();
fpmeWpw(location_fpmeWpw);
var location_HJpAkRW = jQuery("#jform_location input[type='radio']:checked").val();
HJpAkRW(location_HJpAkRW);
});
jQuery('#adminForm').on('change', '#jform_location',function (e)
{
e.preventDefault();
var location_fpmeWpw = jQuery("#jform_location input[type='radio']:checked").val();
fpmeWpw(location_fpmeWpw);
var location_HJpAkRW = jQuery("#jform_location input[type='radio']:checked").val();
HJpAkRW(location_HJpAkRW);
});
// #jform_location listeners for location_ynMoYbd function
// #jform_location listeners for location_MTapnld function
jQuery('#jform_location').on('keyup',function()
{
var location_ynMoYbd = jQuery("#jform_location input[type='radio']:checked").val();
ynMoYbd(location_ynMoYbd);
var location_MTapnld = jQuery("#jform_location input[type='radio']:checked").val();
MTapnld(location_MTapnld);
});
jQuery('#adminForm').on('change', '#jform_location',function (e)
{
e.preventDefault();
var location_ynMoYbd = jQuery("#jform_location input[type='radio']:checked").val();
ynMoYbd(location_ynMoYbd);
var location_MTapnld = jQuery("#jform_location input[type='radio']:checked").val();
MTapnld(location_MTapnld);
});
// #jform_type listeners for type_dXNGPAB function
// #jform_type listeners for type_jfXdjKE function
jQuery('#jform_type').on('keyup',function()
{
var type_dXNGPAB = jQuery("#jform_type").val();
dXNGPAB(type_dXNGPAB);
var type_jfXdjKE = jQuery("#jform_type").val();
jfXdjKE(type_jfXdjKE);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_dXNGPAB = jQuery("#jform_type").val();
dXNGPAB(type_dXNGPAB);
var type_jfXdjKE = jQuery("#jform_type").val();
jfXdjKE(type_jfXdjKE);
});
// #jform_type listeners for type_lUjJAvV function
// #jform_type listeners for type_neiBLak function
jQuery('#jform_type').on('keyup',function()
{
var type_lUjJAvV = jQuery("#jform_type").val();
lUjJAvV(type_lUjJAvV);
var type_neiBLak = jQuery("#jform_type").val();
neiBLak(type_neiBLak);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_lUjJAvV = jQuery("#jform_type").val();
lUjJAvV(type_lUjJAvV);
var type_neiBLak = jQuery("#jform_type").val();
neiBLak(type_neiBLak);
});
// #jform_type listeners for type_ILzlnJW function
// #jform_type listeners for type_SWAPKmP function
jQuery('#jform_type').on('keyup',function()
{
var type_ILzlnJW = jQuery("#jform_type").val();
ILzlnJW(type_ILzlnJW);
var type_SWAPKmP = jQuery("#jform_type").val();
SWAPKmP(type_SWAPKmP);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_ILzlnJW = jQuery("#jform_type").val();
ILzlnJW(type_ILzlnJW);
var type_SWAPKmP = jQuery("#jform_type").val();
SWAPKmP(type_SWAPKmP);
});
// #jform_target listeners for target_wQUmqIU function
// #jform_target listeners for target_dOgbQmL function
jQuery('#jform_target').on('keyup',function()
{
var target_wQUmqIU = jQuery("#jform_target input[type='radio']:checked").val();
wQUmqIU(target_wQUmqIU);
var target_dOgbQmL = jQuery("#jform_target input[type='radio']:checked").val();
dOgbQmL(target_dOgbQmL);
});
jQuery('#adminForm').on('change', '#jform_target',function (e)
{
e.preventDefault();
var target_wQUmqIU = jQuery("#jform_target input[type='radio']:checked").val();
wQUmqIU(target_wQUmqIU);
var target_dOgbQmL = jQuery("#jform_target input[type='radio']:checked").val();
dOgbQmL(target_dOgbQmL);
});

View File

@ -87,27 +87,27 @@ class SermondistributorViewHelp_document extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NEW' : 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_EDIT'), 'pencil-2 article-add');
// [10235] Built the actions for new and existing records.
// [10261] Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('help_document.create') && $isNew)
{
// [10247] We can create the record.
// [10273] We can create the record.
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('help_document.edit'))
{
// [10259] We can save the record.
// [10285] We can save the record.
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// [10264] Do not creat but cancel.
// [10290] Do not creat but cancel.
JToolBarHelper::cancel('help_document.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// [10269] We can close it.
// [10295] We can close it.
JToolBarHelper::cancel('help_document.cancel', 'JTOOLBAR_CLOSE');
}
}
@ -115,7 +115,7 @@ class SermondistributorViewHelp_document extends JViewLegacy
{
if ($isNew)
{
// [10277] For new records, check the create permission.
// [10303] For new records, check the create permission.
if ($this->canDo->get('help_document.create'))
{
JToolBarHelper::apply('help_document.apply', 'JTOOLBAR_APPLY');
@ -128,11 +128,11 @@ class SermondistributorViewHelp_document extends JViewLegacy
{
if ($this->canDo->get('help_document.edit'))
{
// [10304] We can save the new record
// [10330] We can save the new record
JToolBarHelper::apply('help_document.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
// [10307] We can save this record, but check the create permission to see
// [10308] if we can return to make a new one.
// [10333] We can save this record, but check the create permission to see
// [10334] if we can return to make a new one.
if ($this->canDo->get('help_document.create'))
{
JToolBarHelper::custom('help_document.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@ -151,7 +151,7 @@ class SermondistributorViewHelp_document extends JViewLegacy
}
}
JToolbarHelper::divider();
// [10344] set help url for this view if found
// [10370] set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('help_document');
if (SermondistributorHelper::checkString($help_url))
{

View File

@ -197,11 +197,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
);
}
// [9107] Set Type Selection
// [9133] Set Type Selection
$this->typeOptions = $this->getTheTypeSelections();
if ($this->typeOptions)
{
// [9111] Type Filter
// [9137] Type Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -',
'filter_type',
@ -210,7 +210,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Type Batch Selection
// [9146] Type Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -',
'batch[type]',
@ -219,11 +219,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
}
// [9107] Set Location Selection
// [9133] Set Location Selection
$this->locationOptions = $this->getTheLocationSelections();
if ($this->locationOptions)
{
// [9111] Location Filter
// [9137] Location Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -',
'filter_location',
@ -232,7 +232,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Location Batch Selection
// [9146] Location Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -',
'batch[location]',
@ -241,11 +241,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
}
// [9107] Set Admin View Selection
// [9133] Set Admin View Selection
$this->admin_viewOptions = $this->getTheAdmin_viewSelections();
if ($this->admin_viewOptions)
{
// [9111] Admin View Filter
// [9137] Admin View Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -',
'filter_admin_view',
@ -254,7 +254,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Admin View Batch Selection
// [9146] Admin View Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -',
'batch[admin_view]',
@ -263,11 +263,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
}
// [9107] Set Site View Selection
// [9133] Set Site View Selection
$this->site_viewOptions = $this->getTheSite_viewSelections();
if ($this->site_viewOptions)
{
// [9111] Site View Filter
// [9137] Site View Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -',
'filter_site_view',
@ -276,7 +276,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Site View Batch Selection
// [9146] Site View Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -',
'batch[site_view]',
@ -337,33 +337,33 @@ class SermondistributorViewHelp_documents extends JViewLegacy
protected function getTheTypeSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('type'));
$query->from($db->quoteName('#__sermondistributor_help_document'));
$query->order($db->quoteName('type') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// [8999] get model
// [9025] get model
$model = $this->getModel();
$results = array_unique($results);
$filter = array();
foreach ($results as $type)
{
// [9010] Translate the type selection
// [9036] Translate the type selection
$text = $model->selectionTranslation($type,'type');
// [9012] Now add the type and its text to the options array
// [9038] Now add the type and its text to the options array
$filter[] = JHtml::_('select.option', $type, JText::_($text));
}
return $filter;
@ -373,33 +373,33 @@ class SermondistributorViewHelp_documents extends JViewLegacy
protected function getTheLocationSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('location'));
$query->from($db->quoteName('#__sermondistributor_help_document'));
$query->order($db->quoteName('location') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// [8999] get model
// [9025] get model
$model = $this->getModel();
$results = array_unique($results);
$filter = array();
foreach ($results as $location)
{
// [9010] Translate the location selection
// [9036] Translate the location selection
$text = $model->selectionTranslation($location,'location');
// [9012] Now add the location and its text to the options array
// [9038] Now add the location and its text to the options array
$filter[] = JHtml::_('select.option', $location, JText::_($text));
}
return $filter;
@ -409,18 +409,18 @@ class SermondistributorViewHelp_documents extends JViewLegacy
protected function getTheAdmin_viewSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('admin_view'));
$query->from($db->quoteName('#__sermondistributor_help_document'));
$query->order($db->quoteName('admin_view') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
@ -431,7 +431,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
$filter = array();
foreach ($results as $admin_view)
{
// [9017] Now add the admin_view and its text to the options array
// [9043] Now add the admin_view and its text to the options array
$filter[] = JHtml::_('select.option', $admin_view, $admin_view);
}
return $filter;
@ -441,18 +441,18 @@ class SermondistributorViewHelp_documents extends JViewLegacy
protected function getTheSite_viewSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('site_view'));
$query->from($db->quoteName('#__sermondistributor_help_document'));
$query->order($db->quoteName('site_view') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
@ -463,7 +463,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
$filter = array();
foreach ($results as $site_view)
{
// [9017] Now add the site_view and its text to the options array
// [9043] Now add the site_view and its text to the options array
$filter[] = JHtml::_('select.option', $site_view, $site_view);
}
return $filter;

View File

@ -65,8 +65,8 @@ class SermondistributorViewPreacher extends JViewLegacy
$this->referral = '&ref='.(string)$this->ref;
}
// [6445] Get Linked view data
$this->slqsermons = $this->get('Slqsermons');
// [6471] Get Linked view data
$this->xhfsermons = $this->get('Xhfsermons');
// Set the toolbar
$this->addToolBar();
@ -90,27 +90,27 @@ class SermondistributorViewPreacher extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_PREACHER_NEW' : 'COM_SERMONDISTRIBUTOR_PREACHER_EDIT'), 'pencil-2 article-add');
// [10235] Built the actions for new and existing records.
// [10261] Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('preacher.create') && $isNew)
{
// [10247] We can create the record.
// [10273] We can create the record.
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('preacher.edit'))
{
// [10259] We can save the record.
// [10285] We can save the record.
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// [10264] Do not creat but cancel.
// [10290] Do not creat but cancel.
JToolBarHelper::cancel('preacher.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// [10269] We can close it.
// [10295] We can close it.
JToolBarHelper::cancel('preacher.cancel', 'JTOOLBAR_CLOSE');
}
}
@ -118,7 +118,7 @@ class SermondistributorViewPreacher extends JViewLegacy
{
if ($isNew)
{
// [10277] For new records, check the create permission.
// [10303] For new records, check the create permission.
if ($this->canDo->get('preacher.create'))
{
JToolBarHelper::apply('preacher.apply', 'JTOOLBAR_APPLY');
@ -131,11 +131,11 @@ class SermondistributorViewPreacher extends JViewLegacy
{
if ($this->canDo->get('preacher.edit'))
{
// [10304] We can save the new record
// [10330] We can save the new record
JToolBarHelper::apply('preacher.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
// [10307] We can save this record, but check the create permission to see
// [10308] if we can return to make a new one.
// [10333] We can save this record, but check the create permission to see
// [10334] if we can return to make a new one.
if ($this->canDo->get('preacher.create'))
{
JToolBarHelper::custom('preacher.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@ -154,7 +154,7 @@ class SermondistributorViewPreacher extends JViewLegacy
}
}
JToolbarHelper::divider();
// [10344] set help url for this view if found
// [10370] set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preacher');
if (SermondistributorHelper::checkString($help_url))
{
@ -192,21 +192,21 @@ class SermondistributorViewPreacher extends JViewLegacy
$document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_PREACHER_NEW' : 'COM_SERMONDISTRIBUTOR_PREACHER_EDIT'));
$document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/preacher.css");
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');

View File

@ -65,8 +65,8 @@ class SermondistributorViewSeries extends JViewLegacy
$this->referral = '&ref='.(string)$this->ref;
}
// [6445] Get Linked view data
$this->grqsermons = $this->get('Grqsermons');
// [6471] Get Linked view data
$this->hspsermons = $this->get('Hspsermons');
// Set the toolbar
$this->addToolBar();
@ -90,27 +90,27 @@ class SermondistributorViewSeries extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERIES_NEW' : 'COM_SERMONDISTRIBUTOR_SERIES_EDIT'), 'pencil-2 article-add');
// [10235] Built the actions for new and existing records.
// [10261] Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('series.create') && $isNew)
{
// [10247] We can create the record.
// [10273] We can create the record.
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('series.edit'))
{
// [10259] We can save the record.
// [10285] We can save the record.
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// [10264] Do not creat but cancel.
// [10290] Do not creat but cancel.
JToolBarHelper::cancel('series.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// [10269] We can close it.
// [10295] We can close it.
JToolBarHelper::cancel('series.cancel', 'JTOOLBAR_CLOSE');
}
}
@ -118,7 +118,7 @@ class SermondistributorViewSeries extends JViewLegacy
{
if ($isNew)
{
// [10277] For new records, check the create permission.
// [10303] For new records, check the create permission.
if ($this->canDo->get('series.create'))
{
JToolBarHelper::apply('series.apply', 'JTOOLBAR_APPLY');
@ -131,11 +131,11 @@ class SermondistributorViewSeries extends JViewLegacy
{
if ($this->canDo->get('series.edit'))
{
// [10304] We can save the new record
// [10330] We can save the new record
JToolBarHelper::apply('series.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
// [10307] We can save this record, but check the create permission to see
// [10308] if we can return to make a new one.
// [10333] We can save this record, but check the create permission to see
// [10334] if we can return to make a new one.
if ($this->canDo->get('series.create'))
{
JToolBarHelper::custom('series.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@ -154,7 +154,7 @@ class SermondistributorViewSeries extends JViewLegacy
}
}
JToolbarHelper::divider();
// [10344] set help url for this view if found
// [10370] set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('series');
if (SermondistributorHelper::checkString($help_url))
{
@ -192,21 +192,21 @@ class SermondistributorViewSeries extends JViewLegacy
$document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERIES_NEW' : 'COM_SERMONDISTRIBUTOR_SERIES_EDIT'));
$document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/series.css");
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');

View File

@ -115,180 +115,180 @@ $componentParams = JComponentHelper::getParams('com_sermondistributor');
<script type="text/javascript">
// #jform_source listeners for source_rftyiTC function
// #jform_source listeners for source_xbZtXWz function
jQuery('#jform_source').on('keyup',function()
{
var source_rftyiTC = jQuery("#jform_source").val();
rftyiTC(source_rftyiTC);
var source_xbZtXWz = jQuery("#jform_source").val();
xbZtXWz(source_xbZtXWz);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var source_rftyiTC = jQuery("#jform_source").val();
rftyiTC(source_rftyiTC);
var source_xbZtXWz = jQuery("#jform_source").val();
xbZtXWz(source_xbZtXWz);
});
// #jform_source listeners for source_liGWajx function
// #jform_source listeners for source_CDIVEjW function
jQuery('#jform_source').on('keyup',function()
{
var source_liGWajx = jQuery("#jform_source").val();
var build_liGWajx = jQuery("#jform_build input[type='radio']:checked").val();
liGWajx(source_liGWajx,build_liGWajx);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var source_liGWajx = jQuery("#jform_source").val();
var build_liGWajx = jQuery("#jform_build input[type='radio']:checked").val();
liGWajx(source_liGWajx,build_liGWajx);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
});
// #jform_build listeners for build_liGWajx function
// #jform_build listeners for build_CDIVEjW function
jQuery('#jform_build').on('keyup',function()
{
var source_liGWajx = jQuery("#jform_source").val();
var build_liGWajx = jQuery("#jform_build input[type='radio']:checked").val();
liGWajx(source_liGWajx,build_liGWajx);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
});
jQuery('#adminForm').on('change', '#jform_build',function (e)
{
e.preventDefault();
var source_liGWajx = jQuery("#jform_source").val();
var build_liGWajx = jQuery("#jform_build input[type='radio']:checked").val();
liGWajx(source_liGWajx,build_liGWajx);
var source_CDIVEjW = jQuery("#jform_source").val();
var build_CDIVEjW = jQuery("#jform_build input[type='radio']:checked").val();
CDIVEjW(source_CDIVEjW,build_CDIVEjW);
});
// #jform_source listeners for source_jAMSvXi function
// #jform_source listeners for source_WZwWpgD function
jQuery('#jform_source').on('keyup',function()
{
var source_jAMSvXi = jQuery("#jform_source").val();
var build_jAMSvXi = jQuery("#jform_build input[type='radio']:checked").val();
jAMSvXi(source_jAMSvXi,build_jAMSvXi);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var source_jAMSvXi = jQuery("#jform_source").val();
var build_jAMSvXi = jQuery("#jform_build input[type='radio']:checked").val();
jAMSvXi(source_jAMSvXi,build_jAMSvXi);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
});
// #jform_build listeners for build_jAMSvXi function
// #jform_build listeners for build_WZwWpgD function
jQuery('#jform_build').on('keyup',function()
{
var source_jAMSvXi = jQuery("#jform_source").val();
var build_jAMSvXi = jQuery("#jform_build input[type='radio']:checked").val();
jAMSvXi(source_jAMSvXi,build_jAMSvXi);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
});
jQuery('#adminForm').on('change', '#jform_build',function (e)
{
e.preventDefault();
var source_jAMSvXi = jQuery("#jform_source").val();
var build_jAMSvXi = jQuery("#jform_build input[type='radio']:checked").val();
jAMSvXi(source_jAMSvXi,build_jAMSvXi);
var source_WZwWpgD = jQuery("#jform_source").val();
var build_WZwWpgD = jQuery("#jform_build input[type='radio']:checked").val();
WZwWpgD(source_WZwWpgD,build_WZwWpgD);
});
// #jform_build listeners for build_hkBIRwX function
// #jform_build listeners for build_hdyAkcs function
jQuery('#jform_build').on('keyup',function()
{
var build_hkBIRwX = jQuery("#jform_build input[type='radio']:checked").val();
var source_hkBIRwX = jQuery("#jform_source").val();
hkBIRwX(build_hkBIRwX,source_hkBIRwX);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
});
jQuery('#adminForm').on('change', '#jform_build',function (e)
{
e.preventDefault();
var build_hkBIRwX = jQuery("#jform_build input[type='radio']:checked").val();
var source_hkBIRwX = jQuery("#jform_source").val();
hkBIRwX(build_hkBIRwX,source_hkBIRwX);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
});
// #jform_source listeners for source_hkBIRwX function
// #jform_source listeners for source_hdyAkcs function
jQuery('#jform_source').on('keyup',function()
{
var build_hkBIRwX = jQuery("#jform_build input[type='radio']:checked").val();
var source_hkBIRwX = jQuery("#jform_source").val();
hkBIRwX(build_hkBIRwX,source_hkBIRwX);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var build_hkBIRwX = jQuery("#jform_build input[type='radio']:checked").val();
var source_hkBIRwX = jQuery("#jform_source").val();
hkBIRwX(build_hkBIRwX,source_hkBIRwX);
var build_hdyAkcs = jQuery("#jform_build input[type='radio']:checked").val();
var source_hdyAkcs = jQuery("#jform_source").val();
hdyAkcs(build_hdyAkcs,source_hdyAkcs);
});
// #jform_source listeners for source_cyLHBtp function
// #jform_source listeners for source_MkfKpcz function
jQuery('#jform_source').on('keyup',function()
{
var source_cyLHBtp = jQuery("#jform_source").val();
cyLHBtp(source_cyLHBtp);
var source_MkfKpcz = jQuery("#jform_source").val();
MkfKpcz(source_MkfKpcz);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var source_cyLHBtp = jQuery("#jform_source").val();
cyLHBtp(source_cyLHBtp);
var source_MkfKpcz = jQuery("#jform_source").val();
MkfKpcz(source_MkfKpcz);
});
// #jform_source listeners for source_XcZLWuJ function
// #jform_source listeners for source_VHZADuE function
jQuery('#jform_source').on('keyup',function()
{
var source_XcZLWuJ = jQuery("#jform_source").val();
XcZLWuJ(source_XcZLWuJ);
var source_VHZADuE = jQuery("#jform_source").val();
VHZADuE(source_VHZADuE);
});
jQuery('#adminForm').on('change', '#jform_source',function (e)
{
e.preventDefault();
var source_XcZLWuJ = jQuery("#jform_source").val();
XcZLWuJ(source_XcZLWuJ);
var source_VHZADuE = jQuery("#jform_source").val();
VHZADuE(source_VHZADuE);
});
// #jform_link_type listeners for link_type_LnTfUMv function
// #jform_link_type listeners for link_type_BlITSTV function
jQuery('#jform_link_type').on('keyup',function()
{
var link_type_LnTfUMv = jQuery("#jform_link_type input[type='radio']:checked").val();
LnTfUMv(link_type_LnTfUMv);
var link_type_BlITSTV = jQuery("#jform_link_type input[type='radio']:checked").val();
BlITSTV(link_type_BlITSTV);
});
jQuery('#adminForm').on('change', '#jform_link_type',function (e)
{
e.preventDefault();
var link_type_LnTfUMv = jQuery("#jform_link_type input[type='radio']:checked").val();
LnTfUMv(link_type_LnTfUMv);
var link_type_BlITSTV = jQuery("#jform_link_type input[type='radio']:checked").val();
BlITSTV(link_type_BlITSTV);
});
// #jform_link_type listeners for link_type_SPbxTGc function
// #jform_link_type listeners for link_type_fGuayEg function
jQuery('#jform_link_type').on('keyup',function()
{
var link_type_SPbxTGc = jQuery("#jform_link_type input[type='radio']:checked").val();
SPbxTGc(link_type_SPbxTGc);
var link_type_fGuayEg = jQuery("#jform_link_type input[type='radio']:checked").val();
fGuayEg(link_type_fGuayEg);
});
jQuery('#adminForm').on('change', '#jform_link_type',function (e)
{
e.preventDefault();
var link_type_SPbxTGc = jQuery("#jform_link_type input[type='radio']:checked").val();
SPbxTGc(link_type_SPbxTGc);
var link_type_fGuayEg = jQuery("#jform_link_type input[type='radio']:checked").val();
fGuayEg(link_type_fGuayEg);
});

View File

@ -65,8 +65,8 @@ class SermondistributorViewSermon extends JViewLegacy
$this->referral = '&ref='.(string)$this->ref;
}
// [6445] Get Linked view data
$this->uaqstastics = $this->get('Uaqstastics');
// [6471] Get Linked view data
$this->bagstastics = $this->get('Bagstastics');
// Set the toolbar
$this->addToolBar();
@ -90,27 +90,27 @@ class SermondistributorViewSermon extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERMON_NEW' : 'COM_SERMONDISTRIBUTOR_SERMON_EDIT'), 'pencil-2 article-add');
// [10235] Built the actions for new and existing records.
// [10261] Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('sermon.create') && $isNew)
{
// [10247] We can create the record.
// [10273] We can create the record.
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('sermon.edit'))
{
// [10259] We can save the record.
// [10285] We can save the record.
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// [10264] Do not creat but cancel.
// [10290] Do not creat but cancel.
JToolBarHelper::cancel('sermon.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// [10269] We can close it.
// [10295] We can close it.
JToolBarHelper::cancel('sermon.cancel', 'JTOOLBAR_CLOSE');
}
}
@ -118,7 +118,7 @@ class SermondistributorViewSermon extends JViewLegacy
{
if ($isNew)
{
// [10277] For new records, check the create permission.
// [10303] For new records, check the create permission.
if ($this->canDo->get('sermon.create'))
{
JToolBarHelper::apply('sermon.apply', 'JTOOLBAR_APPLY');
@ -131,11 +131,11 @@ class SermondistributorViewSermon extends JViewLegacy
{
if ($this->canDo->get('sermon.edit'))
{
// [10304] We can save the new record
// [10330] We can save the new record
JToolBarHelper::apply('sermon.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
// [10307] We can save this record, but check the create permission to see
// [10308] if we can return to make a new one.
// [10333] We can save this record, but check the create permission to see
// [10334] if we can return to make a new one.
if ($this->canDo->get('sermon.create'))
{
JToolBarHelper::custom('sermon.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@ -154,7 +154,7 @@ class SermondistributorViewSermon extends JViewLegacy
}
}
JToolbarHelper::divider();
// [10344] set help url for this view if found
// [10370] set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermon');
if (SermondistributorHelper::checkString($help_url))
{
@ -192,21 +192,21 @@ class SermondistributorViewSermon extends JViewLegacy
$document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERMON_NEW' : 'COM_SERMONDISTRIBUTOR_SERMON_EDIT'));
$document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/sermon.css");
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');

View File

@ -197,7 +197,7 @@ class SermondistributorViewSermons extends JViewLegacy
);
}
// [9158] Category Filter.
// [9184] Category Filter.
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_CATEGORY'),
'filter_category_id',
@ -206,7 +206,7 @@ class SermondistributorViewSermons extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9168] Category Batch selection.
// [9194] Category Batch selection.
JHtmlBatch_::addListSelection(
JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY'),
'batch[category]',
@ -214,11 +214,11 @@ class SermondistributorViewSermons extends JViewLegacy
);
}
// [9073] Set Preacher Name Selection
// [9099] Set Preacher Name Selection
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->getOptions();
if ($this->preacherNameOptions)
{
// [9077] Preacher Name Filter
// [9103] Preacher Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -',
'filter_preacher',
@ -227,7 +227,7 @@ class SermondistributorViewSermons extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9086] Preacher Name Batch Selection
// [9112] Preacher Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -',
'batch[preacher]',
@ -236,11 +236,11 @@ class SermondistributorViewSermons extends JViewLegacy
}
}
// [9073] Set Series Name Selection
// [9099] Set Series Name Selection
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->getOptions();
if ($this->seriesNameOptions)
{
// [9077] Series Name Filter
// [9103] Series Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -',
'filter_series',
@ -249,7 +249,7 @@ class SermondistributorViewSermons extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9086] Series Name Batch Selection
// [9112] Series Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -',
'batch[series]',
@ -258,11 +258,11 @@ class SermondistributorViewSermons extends JViewLegacy
}
}
// [9107] Set Link Type Selection
// [9133] Set Link Type Selection
$this->link_typeOptions = $this->getTheLink_typeSelections();
if ($this->link_typeOptions)
{
// [9111] Link Type Filter
// [9137] Link Type Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -',
'filter_link_type',
@ -271,7 +271,7 @@ class SermondistributorViewSermons extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Link Type Batch Selection
// [9146] Link Type Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -',
'batch[link_type]',
@ -280,11 +280,11 @@ class SermondistributorViewSermons extends JViewLegacy
}
}
// [9107] Set Source Selection
// [9133] Set Source Selection
$this->sourceOptions = $this->getTheSourceSelections();
if ($this->sourceOptions)
{
// [9111] Source Filter
// [9137] Source Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -',
'filter_source',
@ -293,7 +293,7 @@ class SermondistributorViewSermons extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9120] Source Batch Selection
// [9146] Source Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -',
'batch[source]',
@ -356,33 +356,33 @@ class SermondistributorViewSermons extends JViewLegacy
protected function getTheLink_typeSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('link_type'));
$query->from($db->quoteName('#__sermondistributor_sermon'));
$query->order($db->quoteName('link_type') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// [8999] get model
// [9025] get model
$model = $this->getModel();
$results = array_unique($results);
$filter = array();
foreach ($results as $link_type)
{
// [9010] Translate the link_type selection
// [9036] Translate the link_type selection
$text = $model->selectionTranslation($link_type,'link_type');
// [9012] Now add the link_type and its text to the options array
// [9038] Now add the link_type and its text to the options array
$filter[] = JHtml::_('select.option', $link_type, JText::_($text));
}
return $filter;
@ -392,33 +392,33 @@ class SermondistributorViewSermons extends JViewLegacy
protected function getTheSourceSelections()
{
// [8983] Get a db connection.
// [9009] Get a db connection.
$db = JFactory::getDbo();
// [8985] Create a new query object.
// [9011] Create a new query object.
$query = $db->getQuery(true);
// [8987] Select the text.
// [9013] Select the text.
$query->select($db->quoteName('source'));
$query->from($db->quoteName('#__sermondistributor_sermon'));
$query->order($db->quoteName('source') . ' ASC');
// [8991] Reset the query using our newly populated query object.
// [9017] Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// [8999] get model
// [9025] get model
$model = $this->getModel();
$results = array_unique($results);
$filter = array();
foreach ($results as $source)
{
// [9010] Translate the source selection
// [9036] Translate the source selection
$text = $model->selectionTranslation($source,'source');
// [9012] Now add the source and its text to the options array
// [9038] Now add the source and its text to the options array
$filter[] = JHtml::_('select.option', $source, JText::_($text));
}
return $filter;

View File

@ -87,27 +87,27 @@ class SermondistributorViewStatistic extends JViewLegacy
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_STATISTIC_NEW' : 'COM_SERMONDISTRIBUTOR_STATISTIC_EDIT'), 'pencil-2 article-add');
// [10235] Built the actions for new and existing records.
// [10261] Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('statistic.create') && $isNew)
{
// [10247] We can create the record.
// [10273] We can create the record.
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('statistic.edit'))
{
// [10259] We can save the record.
// [10285] We can save the record.
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// [10264] Do not creat but cancel.
// [10290] Do not creat but cancel.
JToolBarHelper::cancel('statistic.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// [10269] We can close it.
// [10295] We can close it.
JToolBarHelper::cancel('statistic.cancel', 'JTOOLBAR_CLOSE');
}
}
@ -115,7 +115,7 @@ class SermondistributorViewStatistic extends JViewLegacy
{
if ($isNew)
{
// [10277] For new records, check the create permission.
// [10303] For new records, check the create permission.
if ($this->canDo->get('statistic.create'))
{
JToolBarHelper::apply('statistic.apply', 'JTOOLBAR_APPLY');
@ -128,11 +128,11 @@ class SermondistributorViewStatistic extends JViewLegacy
{
if ($this->canDo->get('statistic.edit'))
{
// [10304] We can save the new record
// [10330] We can save the new record
JToolBarHelper::apply('statistic.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
// [10307] We can save this record, but check the create permission to see
// [10308] if we can return to make a new one.
// [10333] We can save this record, but check the create permission to see
// [10334] if we can return to make a new one.
if ($this->canDo->get('statistic.create'))
{
JToolBarHelper::custom('statistic.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
@ -151,7 +151,7 @@ class SermondistributorViewStatistic extends JViewLegacy
}
}
JToolbarHelper::divider();
// [10344] set help url for this view if found
// [10370] set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('statistic');
if (SermondistributorHelper::checkString($help_url))
{

View File

@ -197,11 +197,11 @@ class SermondistributorViewStatistics extends JViewLegacy
);
}
// [9073] Set Sermon Name Selection
// [9099] Set Sermon Name Selection
$this->sermonNameOptions = JFormHelper::loadFieldType('Sermon')->getOptions();
if ($this->sermonNameOptions)
{
// [9077] Sermon Name Filter
// [9103] Sermon Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -',
'filter_sermon',
@ -210,7 +210,7 @@ class SermondistributorViewStatistics extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9086] Sermon Name Batch Selection
// [9112] Sermon Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -',
'batch[sermon]',
@ -219,11 +219,11 @@ class SermondistributorViewStatistics extends JViewLegacy
}
}
// [9073] Set Preacher Name Selection
// [9099] Set Preacher Name Selection
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->getOptions();
if ($this->preacherNameOptions)
{
// [9077] Preacher Name Filter
// [9103] Preacher Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -',
'filter_preacher',
@ -232,7 +232,7 @@ class SermondistributorViewStatistics extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9086] Preacher Name Batch Selection
// [9112] Preacher Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -',
'batch[preacher]',
@ -241,11 +241,11 @@ class SermondistributorViewStatistics extends JViewLegacy
}
}
// [9073] Set Series Name Selection
// [9099] Set Series Name Selection
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->getOptions();
if ($this->seriesNameOptions)
{
// [9077] Series Name Filter
// [9103] Series Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -',
'filter_series',
@ -254,7 +254,7 @@ class SermondistributorViewStatistics extends JViewLegacy
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// [9086] Series Name Batch Selection
// [9112] Series Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -',
'batch[series]',

View File

@ -48,536 +48,536 @@ class com_sermondistributorInstallerScript
*/
function uninstall($parent)
{
// [4209] Get Application object
// [4212] Get Application object
$app = JFactory::getApplication();
// [4211] Get The Database object
// [4214] Get The Database object
$db = JFactory::getDbo();
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Preacher alias is found
// [4228] Where Preacher alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$preacher_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($preacher_found)
{
// [4234] Since there are load the needed preacher type ids
// [4237] Since there are load the needed preacher type ids
$preacher_ids = $db->loadColumn();
// [4238] Remove Preacher from the content type table
// [4241] Remove Preacher from the content type table
$preacher_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($preacher_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Preacher items
// [4248] Execute the query to remove Preacher items
$preacher_done = $db->execute();
if ($preacher_done);
{
// [4249] If succesfully remove Preacher add queued success message.
// [4252] If succesfully remove Preacher add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.preacher) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Preacher items from the contentitem tag map table
// [4258] Remove Preacher items from the contentitem tag map table
$preacher_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($preacher_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Preacher items
// [4265] Execute the query to remove Preacher items
$preacher_done = $db->execute();
if ($preacher_done);
{
// [4266] If succesfully remove Preacher add queued success message.
// [4269] If succesfully remove Preacher add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.preacher) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Preacher items from the ucm content table
// [4275] Remove Preacher items from the ucm content table
$preacher_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.preacher') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($preacher_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Preacher items
// [4282] Execute the query to remove Preacher items
$preacher_done = $db->execute();
if ($preacher_done);
{
// [4283] If succesfully remove Preacher add queued success message.
// [4286] If succesfully remove Preacher add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.preacher) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Preacher items are cleared from DB
// [4292] Make sure that all the Preacher items are cleared from DB
foreach ($preacher_ids as $preacher_id)
{
// [4294] Remove Preacher items from the ucm base table
// [4297] Remove Preacher items from the ucm base table
$preacher_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $preacher_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($preacher_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Preacher items
// [4304] Execute the query to remove Preacher items
$db->execute();
// [4305] Remove Preacher items from the ucm history table
// [4308] Remove Preacher items from the ucm history table
$preacher_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $preacher_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($preacher_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Preacher items
// [4315] Execute the query to remove Preacher items
$db->execute();
}
}
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Sermon alias is found
// [4228] Where Sermon alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$sermon_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($sermon_found)
{
// [4234] Since there are load the needed sermon type ids
// [4237] Since there are load the needed sermon type ids
$sermon_ids = $db->loadColumn();
// [4238] Remove Sermon from the content type table
// [4241] Remove Sermon from the content type table
$sermon_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($sermon_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Sermon items
// [4248] Execute the query to remove Sermon items
$sermon_done = $db->execute();
if ($sermon_done);
{
// [4249] If succesfully remove Sermon add queued success message.
// [4252] If succesfully remove Sermon add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermon) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Sermon items from the contentitem tag map table
// [4258] Remove Sermon items from the contentitem tag map table
$sermon_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($sermon_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Sermon items
// [4265] Execute the query to remove Sermon items
$sermon_done = $db->execute();
if ($sermon_done);
{
// [4266] If succesfully remove Sermon add queued success message.
// [4269] If succesfully remove Sermon add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermon) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Sermon items from the ucm content table
// [4275] Remove Sermon items from the ucm content table
$sermon_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.sermon') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($sermon_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Sermon items
// [4282] Execute the query to remove Sermon items
$sermon_done = $db->execute();
if ($sermon_done);
{
// [4283] If succesfully remove Sermon add queued success message.
// [4286] If succesfully remove Sermon add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermon) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Sermon items are cleared from DB
// [4292] Make sure that all the Sermon items are cleared from DB
foreach ($sermon_ids as $sermon_id)
{
// [4294] Remove Sermon items from the ucm base table
// [4297] Remove Sermon items from the ucm base table
$sermon_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($sermon_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Sermon items
// [4304] Execute the query to remove Sermon items
$db->execute();
// [4305] Remove Sermon items from the ucm history table
// [4308] Remove Sermon items from the ucm history table
$sermon_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($sermon_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Sermon items
// [4315] Execute the query to remove Sermon items
$db->execute();
}
}
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Sermon catid alias is found
// [4228] Where Sermon catid alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$sermon_catid_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($sermon_catid_found)
{
// [4234] Since there are load the needed sermon_catid type ids
// [4237] Since there are load the needed sermon_catid type ids
$sermon_catid_ids = $db->loadColumn();
// [4238] Remove Sermon catid from the content type table
// [4241] Remove Sermon catid from the content type table
$sermon_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($sermon_catid_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Sermon catid items
// [4248] Execute the query to remove Sermon catid items
$sermon_catid_done = $db->execute();
if ($sermon_catid_done);
{
// [4249] If succesfully remove Sermon catid add queued success message.
// [4252] If succesfully remove Sermon catid add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermons.category) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Sermon catid items from the contentitem tag map table
// [4258] Remove Sermon catid items from the contentitem tag map table
$sermon_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($sermon_catid_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Sermon catid items
// [4265] Execute the query to remove Sermon catid items
$sermon_catid_done = $db->execute();
if ($sermon_catid_done);
{
// [4266] If succesfully remove Sermon catid add queued success message.
// [4269] If succesfully remove Sermon catid add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermons.category) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Sermon catid items from the ucm content table
// [4275] Remove Sermon catid items from the ucm content table
$sermon_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.sermons.category') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($sermon_catid_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Sermon catid items
// [4282] Execute the query to remove Sermon catid items
$sermon_catid_done = $db->execute();
if ($sermon_catid_done);
{
// [4283] If succesfully remove Sermon catid add queued success message.
// [4286] If succesfully remove Sermon catid add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.sermons.category) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Sermon catid items are cleared from DB
// [4292] Make sure that all the Sermon catid items are cleared from DB
foreach ($sermon_catid_ids as $sermon_catid_id)
{
// [4294] Remove Sermon catid items from the ucm base table
// [4297] Remove Sermon catid items from the ucm base table
$sermon_catid_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_catid_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($sermon_catid_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Sermon catid items
// [4304] Execute the query to remove Sermon catid items
$db->execute();
// [4305] Remove Sermon catid items from the ucm history table
// [4308] Remove Sermon catid items from the ucm history table
$sermon_catid_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_catid_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($sermon_catid_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Sermon catid items
// [4315] Execute the query to remove Sermon catid items
$db->execute();
}
}
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Series alias is found
// [4228] Where Series alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$series_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($series_found)
{
// [4234] Since there are load the needed series type ids
// [4237] Since there are load the needed series type ids
$series_ids = $db->loadColumn();
// [4238] Remove Series from the content type table
// [4241] Remove Series from the content type table
$series_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($series_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Series items
// [4248] Execute the query to remove Series items
$series_done = $db->execute();
if ($series_done);
{
// [4249] If succesfully remove Series add queued success message.
// [4252] If succesfully remove Series add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.series) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Series items from the contentitem tag map table
// [4258] Remove Series items from the contentitem tag map table
$series_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($series_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Series items
// [4265] Execute the query to remove Series items
$series_done = $db->execute();
if ($series_done);
{
// [4266] If succesfully remove Series add queued success message.
// [4269] If succesfully remove Series add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.series) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Series items from the ucm content table
// [4275] Remove Series items from the ucm content table
$series_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.series') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($series_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Series items
// [4282] Execute the query to remove Series items
$series_done = $db->execute();
if ($series_done);
{
// [4283] If succesfully remove Series add queued success message.
// [4286] If succesfully remove Series add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.series) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Series items are cleared from DB
// [4292] Make sure that all the Series items are cleared from DB
foreach ($series_ids as $series_id)
{
// [4294] Remove Series items from the ucm base table
// [4297] Remove Series items from the ucm base table
$series_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $series_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($series_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Series items
// [4304] Execute the query to remove Series items
$db->execute();
// [4305] Remove Series items from the ucm history table
// [4308] Remove Series items from the ucm history table
$series_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $series_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($series_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Series items
// [4315] Execute the query to remove Series items
$db->execute();
}
}
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Statistic alias is found
// [4228] Where Statistic alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$statistic_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($statistic_found)
{
// [4234] Since there are load the needed statistic type ids
// [4237] Since there are load the needed statistic type ids
$statistic_ids = $db->loadColumn();
// [4238] Remove Statistic from the content type table
// [4241] Remove Statistic from the content type table
$statistic_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($statistic_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Statistic items
// [4248] Execute the query to remove Statistic items
$statistic_done = $db->execute();
if ($statistic_done);
{
// [4249] If succesfully remove Statistic add queued success message.
// [4252] If succesfully remove Statistic add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.statistic) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Statistic items from the contentitem tag map table
// [4258] Remove Statistic items from the contentitem tag map table
$statistic_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($statistic_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Statistic items
// [4265] Execute the query to remove Statistic items
$statistic_done = $db->execute();
if ($statistic_done);
{
// [4266] If succesfully remove Statistic add queued success message.
// [4269] If succesfully remove Statistic add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.statistic) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Statistic items from the ucm content table
// [4275] Remove Statistic items from the ucm content table
$statistic_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.statistic') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($statistic_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Statistic items
// [4282] Execute the query to remove Statistic items
$statistic_done = $db->execute();
if ($statistic_done);
{
// [4283] If succesfully remove Statistic add queued success message.
// [4286] If succesfully remove Statistic add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.statistic) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Statistic items are cleared from DB
// [4292] Make sure that all the Statistic items are cleared from DB
foreach ($statistic_ids as $statistic_id)
{
// [4294] Remove Statistic items from the ucm base table
// [4297] Remove Statistic items from the ucm base table
$statistic_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $statistic_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($statistic_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Statistic items
// [4304] Execute the query to remove Statistic items
$db->execute();
// [4305] Remove Statistic items from the ucm history table
// [4308] Remove Statistic items from the ucm history table
$statistic_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $statistic_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($statistic_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Statistic items
// [4315] Execute the query to remove Statistic items
$db->execute();
}
}
// [4220] Create a new query object.
// [4223] Create a new query object.
$query = $db->getQuery(true);
// [4222] Select id from content type table
// [4225] Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// [4225] Where Help_document alias is found
// [4228] Where Help_document alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
$db->setQuery($query);
// [4228] Execute query to see if alias is found
// [4231] Execute query to see if alias is found
$db->execute();
$help_document_found = $db->getNumRows();
// [4231] Now check if there were any rows
// [4234] Now check if there were any rows
if ($help_document_found)
{
// [4234] Since there are load the needed help_document type ids
// [4237] Since there are load the needed help_document type ids
$help_document_ids = $db->loadColumn();
// [4238] Remove Help_document from the content type table
// [4241] Remove Help_document from the content type table
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
// [4240] Create a new query object.
// [4243] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($help_document_condition);
$db->setQuery($query);
// [4245] Execute the query to remove Help_document items
// [4248] Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
// [4249] If succesfully remove Help_document add queued success message.
// [4252] If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.help_document) type alias was removed from the <b>#__content_type</b> table'));
}
// [4255] Remove Help_document items from the contentitem tag map table
// [4258] Remove Help_document items from the contentitem tag map table
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
// [4257] Create a new query object.
// [4260] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($help_document_condition);
$db->setQuery($query);
// [4262] Execute the query to remove Help_document items
// [4265] Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
// [4266] If succesfully remove Help_document add queued success message.
// [4269] If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.help_document) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// [4272] Remove Help_document items from the ucm content table
// [4275] Remove Help_document items from the ucm content table
$help_document_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.help_document') );
// [4274] Create a new query object.
// [4277] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($help_document_condition);
$db->setQuery($query);
// [4279] Execute the query to remove Help_document items
// [4282] Execute the query to remove Help_document items
$help_document_done = $db->execute();
if ($help_document_done);
{
// [4283] If succesfully remove Help_document add queued success message.
// [4286] If succesfully remove Help_document add queued success message.
$app->enqueueMessage(JText::_('The (com_sermondistributor.help_document) type alias was removed from the <b>#__ucm_content</b> table'));
}
// [4289] Make sure that all the Help_document items are cleared from DB
// [4292] Make sure that all the Help_document items are cleared from DB
foreach ($help_document_ids as $help_document_id)
{
// [4294] Remove Help_document items from the ucm base table
// [4297] Remove Help_document items from the ucm base table
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
// [4296] Create a new query object.
// [4299] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($help_document_condition);
$db->setQuery($query);
// [4301] Execute the query to remove Help_document items
// [4304] Execute the query to remove Help_document items
$db->execute();
// [4305] Remove Help_document items from the ucm history table
// [4308] Remove Help_document items from the ucm history table
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
// [4307] Create a new query object.
// [4310] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($help_document_condition);
$db->setQuery($query);
// [4312] Execute the query to remove Help_document items
// [4315] Execute the query to remove Help_document items
$db->execute();
}
}
// [4320] If All related items was removed queued success message.
// [4323] If All related items was removed queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the <b>#__ucm_base</b> table'));
$app->enqueueMessage(JText::_('All related items was removed from the <b>#__ucm_history</b> table'));
// [4325] Remove sermondistributor assets from the assets table
// [4328] Remove sermondistributor assets from the assets table
$sermondistributor_condition = array( $db->quoteName('name') . ' LIKE ' . $db->quote('com_sermondistributor%') );
// [4327] Create a new query object.
// [4330] Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__assets'));
$query->where($sermondistributor_condition);
@ -585,7 +585,7 @@ class com_sermondistributorInstallerScript
$help_document_done = $db->execute();
if ($help_document_done);
{
// [4335] If succesfully remove sermondistributor add queued success message.
// [4338] If succesfully remove sermondistributor add queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the <b>#__assets</b> table'));
}
@ -635,15 +635,15 @@ class com_sermondistributorInstallerScript
*/
function postflight($type, $parent)
{
//set the default component settings
// set the default component settings
if ($type == 'install')
{
// [4380] Get The Database object
// [4384] Get The Database object
$db = JFactory::getDbo();
// [4387] Create the preacher content type object.
// [4391] Create the preacher content type object.
$preacher = new stdClass();
$preacher->type_title = 'Sermondistributor Preacher';
$preacher->type_alias = 'com_sermondistributor.preacher';
@ -652,10 +652,10 @@ class com_sermondistributorInstallerScript
$preacher->router = 'SermondistributorHelperRoute::getPreacherRoute';
$preacher->content_history_options = '{"formFile": "administrator/components/com_sermondistributor/models/forms/preacher.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$preacherInserted = $db->insertObject('#__content_types', $preacher);
// [4387] Create the sermon content type object.
// [4391] Create the sermon content type object.
$sermon = new stdClass();
$sermon->type_title = 'Sermondistributor Sermon';
$sermon->type_alias = 'com_sermondistributor.sermon';
@ -664,10 +664,10 @@ class com_sermondistributorInstallerScript
$sermon->router = 'SermondistributorHelperRoute::getSermonRoute';
$sermon->content_history_options = '{"formFile": "administrator/components/com_sermondistributor/models/forms/sermon.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","auto_sermons"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","preacher","series","catid","link_type","source","not_required","build"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "preacher","targetTable": "#__sermondistributor_preacher","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "series","targetTable": "#__sermondistributor_series","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "local_files","targetTable": "","targetColumn": "","displayColumn": ""},{"sourceColumn": "manual_files","targetTable": "","targetColumn": "","displayColumn": ""}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$sermonInserted = $db->insertObject('#__content_types', $sermon);
// [4387] Create the sermon catagory content type object.
// [4391] Create the sermon catagory content type object.
$sermon_catagory = new stdClass();
$sermon_catagory->type_title = 'Sermondistributor Sermon Catid';
$sermon_catagory->type_alias = 'com_sermondistributor.sermons.category';
@ -676,10 +676,10 @@ class com_sermondistributorInstallerScript
$sermon_catagory->router = 'SermondistributorHelperRoute::getCategoryRoute';
$sermon_catagory->content_history_options = '{"formFile":"administrator\/components\/com_categories\/models\/forms\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$sermon_catagoryInserted = $db->insertObject('#__content_types', $sermon_catagory);
// [4387] Create the series content type object.
// [4391] Create the series content type object.
$series = new stdClass();
$series->type_title = 'Sermondistributor Series';
$series->type_alias = 'com_sermondistributor.series';
@ -688,10 +688,10 @@ class com_sermondistributorInstallerScript
$series->router = 'SermondistributorHelperRoute::getSeriesRoute';
$series->content_history_options = '{"formFile": "administrator/components/com_sermondistributor/models/forms/series.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$seriesInserted = $db->insertObject('#__content_types', $series);
// [4387] Create the statistic content type object.
// [4391] Create the statistic content type object.
$statistic = new stdClass();
$statistic->type_title = 'Sermondistributor Statistic';
$statistic->type_alias = 'com_sermondistributor.statistic';
@ -700,10 +700,10 @@ class com_sermondistributorInstallerScript
$statistic->router = 'SermondistributorHelperRoute::getStatisticRoute';
$statistic->content_history_options = '{"formFile": "administrator/components/com_sermondistributor/models/forms/statistic.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","sermon","preacher","series","counter"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sermon","targetTable": "#__sermondistributor_sermon","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "preacher","targetTable": "#__sermondistributor_preacher","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "series","targetTable": "#__sermondistributor_series","targetColumn": "id","displayColumn": "name"}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$statisticInserted = $db->insertObject('#__content_types', $statistic);
// [4387] Create the help_document content type object.
// [4391] Create the help_document content type object.
$help_document = new stdClass();
$help_document->type_title = 'Sermondistributor Help_document';
$help_document->type_alias = 'com_sermondistributor.help_document';
@ -712,26 +712,36 @@ class com_sermondistributorInstallerScript
$help_document->router = 'SermondistributorHelperRoute::getHelp_documentRoute';
$help_document->content_history_options = '{"formFile": "administrator/components/com_sermondistributor/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","target","article","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
// [4393] Insert the object into the content types table.
// [4397] Insert the object into the content types table.
$help_documentInserted = $db->insertObject('#__content_types', $help_document);
// [4405] Install the global extenstion params.
// [4409] Install the global extenstion params.
$query = $db->getQuery(true);
// [4413] Field to update.
// [4417] Field to update.
$fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@vdm.io","add_to_dropbox":"0","dropbox_filetypes":"zero","manual_link_update_method":"1","manual_dropbox_timer":"60","auto_link_update_method":"1","auto_dropbox_timer":"60","preacher_state":"1","series_state":"1","sermon_state":"1","auto_link_type":"1","link_encryption":")$KCGiB3BEfDf6kzEWrFnHex5uTJxlQG","preachers_display":"2","preachers_list_style":"2","preachers_table_color":"0","preachers_icon":"1","preachers_desc":"1","preachers_sermon_count":"1","preachers_hits":"1","preachers_website":"1","preachers_email":"1","preacher_request_id":"zero","preacher_display":"3","preacher_box_contrast":"1","preacher_list_style":"3","preacher_icon":"1","preacher_desc":"1","preacher_sermon_count":"1","preacher_hits":"1","preacher_email":"1","preacher_website":"1","preacher_sermons_display":"2","preacher_sermons_list_style":"2","preacher_sermons_table_color":"0","preacher_sermons_icon":"1","preacher_sermons_desc":"1","preacher_sermons_series":"1","preacher_sermons_category":"1","preacher_sermons_download_counter":"1","preacher_sermons_hits":"1","preacher_sermons_downloads":"1","preacher_sermons_open":"1","categories_display":"2","categories_list_style":"2","categories_table_color":"0","categories_icon":"1","categories_desc":"1","categories_sermon_count":"1","categories_hits":"1","category_display":"3","category_box_contrast":"1","category_list_style":"3","category_icon":"1","category_desc":"1","category_sermon_count":"1","category_hits":"1","category_sermons_display":"2","category_sermons_list_style":"1","category_sermons_table_color":"1","category_sermons_icon":"1","category_sermons_desc":"1","category_sermons_preacher":"1","category_sermons_series":"1","category_sermons_download_counter":"1","category_sermons_hits":"1","category_sermons_downloads":"1","category_sermons_open":"1","list_series_display":"2","list_series_list_style":"2","list_series_table_color":"0","list_series_icon":"1","list_series_desc":"1","list_series_sermon_count":"1","list_series_hits":"1","series_request_id":"zero","series_display":"3","series_box_contrast":"1","series_list_style":"3","series_icon":"1","series_desc":"1","series_sermon_count":"1","series_hits":"1","series_sermons_display":"2","series_sermons_list_style":"1","series_sermons_table_color":"1","series_sermons_icon":"1","series_sermons_desc":"1","series_sermons_preacher":"1","series_sermons_category":"1","series_sermons_download_counter":"1","series_sermons_hits":"1","series_sermons_downloads":"1","series_sermons_open":"1","sermon_display":"1","sermon_box_contrast":"one","sermon_list_style":"1","sermon_icon":"1","sermon_desc":"1","sermon_preacher":"1","sermon_series":"1","sermon_series":"1","sermon_category":"1","sermon_download_counter":"1","sermon_hits":"1","sermon_downloads":"1","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
);
// [4417] Condition.
// [4421] Condition.
$conditions = array(
$db->quoteName('element') . ' = ' . $db->quote('com_sermondistributor')
);
$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);
$db->setQuery($query);
$allDone = $db->execute();
$allDone = $db->execute();
echo '<a target="_blank" href="https://www.vdm.io/" title="Sermon Distributor">
<img src="components/com_sermondistributor/assets/images/component-300.jpg"/>
</a>';
}
// do any updates needed
if ($type == 'update')
{
echo '<a target="_blank" href="https://www.vdm.io/" title="Sermon Distributor">
<img src="components/com_sermondistributor/assets/images/component-300.jpg"/>
</a>';
}
}
}

View File

@ -39,18 +39,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'sermon' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=sermon&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=sermon';
}
if ($catid > 1)
@ -80,18 +80,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'preachers' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=preachers&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=preachers';
}
if ($catid > 1)
@ -121,18 +121,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'preacher' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=preacher&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=preacher';
}
if ($catid > 1)
@ -162,18 +162,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'categories' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=categories&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=categories';
}
@ -192,18 +192,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'category' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=category&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=category';
}
@ -222,18 +222,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'serieslist' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=serieslist&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=serieslist';
}
if ($catid > 1)
@ -263,18 +263,18 @@ abstract class SermondistributorHelperRoute
{
if ($id > 0)
{
// [4544] Initialize the needel array.
// [4570] Initialize the needel array.
$needles = array(
'series' => array((int) $id)
);
// [4548] Create the link
// [4574] Create the link
$link = 'index.php?option=com_sermondistributor&view=series&id='. $id;
}
else
{
// [4553] Initialize the needel array.
// [4579] Initialize the needel array.
$needles = array();
// [4555]Create the link but don't add the id.
// [4581]Create the link but don't add the id.
$link = 'index.php?option=com_sermondistributor&view=series';
}
if ($catid > 1)

View File

@ -556,23 +556,23 @@ abstract class SermondistributorHelper
$targetgroups = json_decode($help->groups, true);
if (!array_intersect($targetgroups, $groups))
{
// [1380] if user not in those target groups then remove the item
// [1383] if user not in those target groups then remove the item
unset($helps[$nr]);
continue;
}
}
// [1385] set the return type
// [1388] set the return type
switch ($help->type)
{
// [1388] set joomla article
// [1391] set joomla article
case 1:
return self::loadArticleLink($help->article);
break;
// [1392] set help text
// [1395] set help text
case 2:
return self::loadHelpTextLink($help->id);
break;
// [1396] set Link
// [1399] set Link
case 3:
return $help->url;
break;
@ -812,7 +812,7 @@ abstract class SermondistributorHelper
{
if (strpos($content,'class="uk-') !== false)
{
// [2594] reset
// [2597] reset
$temp = array();
foreach (self::$uk_components as $looking => $add)
{
@ -821,15 +821,15 @@ abstract class SermondistributorHelper
$temp[] = $looking;
}
}
// [2603] make sure uikit is loaded to config
// [2606] make sure uikit is loaded to config
if (strpos($content,'class="uk-') !== false)
{
self::$uikit = true;
}
// [2608] sorter
// [2611] sorter
if (self::checkArray($temp))
{
// [2611] merger
// [2614] merger
if (self::checkArray($classes))
{
$newTemp = array_merge($temp,$classes);

View File

@ -38,7 +38,7 @@ class SermondistributorModelAjax extends JModelList
}
// [8882] Used in sermon
// [8908] Used in sermon
/**
* Check and Set Dropbox local listing
**/

View File

@ -60,13 +60,13 @@ class SermondistributorModelCategories extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__categories as a
// [1791] Get from #__categories as a
$query->select($db->quoteName(
array('a.id','a.title','a.alias','a.description','a.hits','a.language'),
array('id','name','alias','description','hits','language')));
@ -76,7 +76,7 @@ class SermondistributorModelCategories extends JModelList
$query->where('a.extension = "com_sermondistributor.sermons"');
$query->order('a.title ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -102,12 +102,12 @@ class SermondistributorModelCategories extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
// [2038] set idCatidSermonB to the $item object.
// [2041] set idCatidSermonB to the $item object.
$item->idCatidSermonB = $this->getIdCatidSermonBced_B($item->id);
}
@ -123,13 +123,13 @@ class SermondistributorModelCategories extends JModelList
*/
public function getIdCatidSermonBced_B($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_sermon as b
// [2706] Get from #__sermondistributor_sermon as b
$query->select($db->quoteName(
array('b.id'),
array('id')));
@ -138,11 +138,11 @@ class SermondistributorModelCategories extends JModelList
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
$query->where('b.published = 1');
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();

View File

@ -60,37 +60,37 @@ class SermondistributorModelCategory extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.link_type','a.short_description','a.icon','a.preacher','a.series','a.catid','a.description','a.source','a.build','a.manual_files','a.local_files','a.url','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering'),
array('id','asset_id','name','alias','link_type','short_description','icon','preacher','series','catid','description','source','build','manual_files','local_files','url','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [1788] Get from #__sermondistributor_preacher as c
// [1791] Get from #__sermondistributor_preacher as c
$query->select($db->quoteName(
array('c.name','c.alias'),
array('preacher_name','preacher_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_preacher', 'c')) . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('c.id') . ')');
// [1788] Get from #__sermondistributor_series as d
// [1791] Get from #__sermondistributor_series as d
$query->select($db->quoteName(
array('d.name','d.alias'),
array('series_name','series_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_series', 'd')) . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('d.id') . ')');
// [1788] Get from #__categories as b
// [1791] Get from #__categories as b
$query->select($db->quoteName(
array('b.title'),
array('category')));
$query->join('LEFT', ($db->quoteName('#__categories', 'b')) . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('b.id') . ')');
$query->where('a.access IN (' . implode(',', $this->levels) . ')');
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -107,7 +107,7 @@ class SermondistributorModelCategory extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -133,26 +133,26 @@ class SermondistributorModelCategory extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
if (SermondistributorHelper::checkString($item->local_files))
{
// [1990] Decode local_files
// [1993] Decode local_files
$item->local_files = json_decode($item->local_files, true);
}
if (SermondistributorHelper::checkString($item->manual_files))
{
// [1990] Decode manual_files
// [1993] Decode manual_files
$item->manual_files = json_decode($item->manual_files, true);
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// [2038] set idSermonStatisticE to the $item object.
// [2041] set idSermonStatisticE to the $item object.
$item->idSermonStatisticE = $this->getIdSermonStatisticBcea_E($item->id);
}
@ -205,24 +205,24 @@ class SermondistributorModelCategory extends JModelList
*/
public function getIdSermonStatisticBcea_E($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_statistic as e
// [2706] Get from #__sermondistributor_statistic as e
$query->select($db->quoteName(
array('e.filename','e.sermon','e.preacher','e.series','e.counter'),
array('filename','sermon','preacher','series','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'e'));
$query->where('e.sermon = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@ -250,18 +250,18 @@ class SermondistributorModelCategory extends JModelList
$this->levels = $this->user->getAuthorisedViewLevels();
$this->initSet = true;
}
// [2329] Get a db connection.
// [2332] Get a db connection.
$db = JFactory::getDbo();
// [2331] Create a new query object.
// [2334] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__categories as a
// [1791] Get from #__categories as a
$query->select($db->quoteName(
array('a.id','a.parent_id','a.lft','a.rgt','a.level','a.title','a.alias','a.note','a.description','a.params','a.metadesc','a.metakey','a.metadata','a.hits','a.language','a.version'),
array('id','parent_id','lft','rgt','level','name','alias','note','description','params','metadesc','metakey','metadata','hits','language','version')));
$query->from($db->quoteName('#__categories', 'a'));
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -278,19 +278,19 @@ class SermondistributorModelCategory extends JModelList
$query->where('a.published = 1');
$query->order('a.title ASC');
// [2342] Reset the query using our newly populated query object.
// [2345] Reset the query using our newly populated query object.
$db->setQuery($query);
// [2344] Load the results as a stdClass object.
// [2347] Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
return false;
}
// [2038] set idCatidSermonB to the $data object.
// [2041] set idCatidSermonB to the $data object.
$data->idCatidSermonB = $this->getIdCatidSermonFbdf_B($data->id);
// [2443] return data object.
// [2446] return data object.
return $data;
}
@ -302,32 +302,32 @@ class SermondistributorModelCategory extends JModelList
*/
public function getIdCatidSermonFbdf_B($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_sermon as b
// [2706] Get from #__sermondistributor_sermon as b
$query->select($db->quoteName(
array('b.id'),
array('id')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'b'));
$query->where('b.catid = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// [2813] Convert the parameter fields into objects.
// [2816] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2026] set idSermonStatisticC to the $item object.
// [2029] set idSermonStatisticC to the $item object.
$item->idSermonStatisticC = $this->getIdSermonStatisticFbdf_C($item->id);
}
return $items;
@ -343,24 +343,24 @@ class SermondistributorModelCategory extends JModelList
*/
public function getIdSermonStatisticFbdf_C($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_statistic as c
// [2706] Get from #__sermondistributor_statistic as c
$query->select($db->quoteName(
array('c.counter'),
array('counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'c'));
$query->where('c.sermon = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();

View File

@ -60,36 +60,36 @@ class SermondistributorModelPreacher extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.link_type','a.short_description','a.icon','a.preacher','a.series','a.catid','a.description','a.source','a.build','a.manual_files','a.local_files','a.url','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering'),
array('id','asset_id','name','alias','link_type','short_description','icon','preacher','series','catid','description','source','build','manual_files','local_files','url','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [1788] Get from #__sermondistributor_series as c
// [1791] Get from #__sermondistributor_series as c
$query->select($db->quoteName(
array('c.name','c.alias'),
array('series_name','series_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_series', 'c')) . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('c.id') . ')');
// [1788] Get from #__sermondistributor_preacher as d
// [1791] Get from #__sermondistributor_preacher as d
$query->select($db->quoteName(
array('d.name','d.alias'),
array('preacher_name','preacher_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_preacher', 'd')) . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('d.id') . ')');
// [1788] Get from #__categories as b
// [1791] Get from #__categories as b
$query->select($db->quoteName(
array('b.title','b.alias'),
array('category','category_alias')));
$query->join('LEFT', ($db->quoteName('#__categories', 'b')) . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('b.id') . ')');
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -107,7 +107,7 @@ class SermondistributorModelPreacher extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -133,26 +133,26 @@ class SermondistributorModelPreacher extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
if (SermondistributorHelper::checkString($item->local_files))
{
// [1990] Decode local_files
// [1993] Decode local_files
$item->local_files = json_decode($item->local_files, true);
}
if (SermondistributorHelper::checkString($item->manual_files))
{
// [1990] Decode manual_files
// [1993] Decode manual_files
$item->manual_files = json_decode($item->manual_files, true);
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// [2038] set idSermonStatisticE to the $item object.
// [2041] set idSermonStatisticE to the $item object.
$item->idSermonStatisticE = $this->getIdSermonStatisticFcff_E($item->id);
}
@ -205,24 +205,24 @@ class SermondistributorModelPreacher extends JModelList
*/
public function getIdSermonStatisticFcff_E($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_statistic as e
// [2706] Get from #__sermondistributor_statistic as e
$query->select($db->quoteName(
array('e.filename','e.sermon','e.preacher','e.series','e.counter'),
array('filename','sermon','preacher','series','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'e'));
$query->where('e.sermon = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@ -250,19 +250,19 @@ class SermondistributorModelPreacher extends JModelList
$this->levels = $this->user->getAuthorisedViewLevels();
$this->initSet = true;
}
// [2329] Get a db connection.
// [2332] Get a db connection.
$db = JFactory::getDbo();
// [2331] Create a new query object.
// [2334] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_preacher as a
// [1791] Get from #__sermondistributor_preacher as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.icon','a.email','a.website','a.description','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering','a.metadesc','a.metakey','a.metadata'),
array('id','asset_id','name','alias','icon','email','website','description','published','created_by','modified_by','created','modified','version','hits','ordering','metadesc','metakey','metadata')));
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where('a.access IN (' . implode(',', $this->levels) . ')');
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -279,21 +279,21 @@ class SermondistributorModelPreacher extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2342] Reset the query using our newly populated query object.
// [2345] Reset the query using our newly populated query object.
$db->setQuery($query);
// [2344] Load the results as a stdClass object.
// [2347] Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
return false;
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$data->description = JHtml::_('content.prepare',$data->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
// [2443] return data object.
// [2446] return data object.
return $data;
}
@ -318,20 +318,20 @@ class SermondistributorModelPreacher extends JModelList
$this->initSet = true;
}
// [2499] Get the global params
// [2502] Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_statistic as a
// [1791] Get from #__sermondistributor_statistic as a
$query->select($db->quoteName(
array('a.id','a.counter'),
array('id','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -348,7 +348,7 @@ class SermondistributorModelPreacher extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2504] Reset the query using our newly populated query object.
// [2507] Reset the query using our newly populated query object.
$db->setQuery($query);
$items = $db->loadObjectList();
@ -357,13 +357,13 @@ class SermondistributorModelPreacher extends JModelList
return false;
}
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
}
// [2513] return items
// [2516] return items
return $items;
}
@ -388,20 +388,20 @@ class SermondistributorModelPreacher extends JModelList
$this->initSet = true;
}
// [2499] Get the global params
// [2502] Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.alias','a.preacher'),
array('id','alias','preacher')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -419,7 +419,7 @@ class SermondistributorModelPreacher extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2504] Reset the query using our newly populated query object.
// [2507] Reset the query using our newly populated query object.
$db->setQuery($query);
$items = $db->loadObjectList();
@ -428,13 +428,13 @@ class SermondistributorModelPreacher extends JModelList
return false;
}
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
}
// [2513] return items
// [2516] return items
return $items;
}

View File

@ -60,13 +60,13 @@ class SermondistributorModelPreachers extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_preacher as a
// [1791] Get from #__sermondistributor_preacher as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.icon','a.email','a.website','a.description','a.hits','a.ordering'),
array('id','asset_id','name','alias','icon','email','website','description','hits','ordering')));
@ -75,7 +75,7 @@ class SermondistributorModelPreachers extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// [2038] set idPreacherSermonB to the $item object.
// [2041] set idPreacherSermonB to the $item object.
$item->idPreacherSermonB = $this->getIdPreacherSermonDcaa_B($item->id);
}
@ -126,13 +126,13 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getIdPreacherSermonDcaa_B($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_sermon as b
// [2706] Get from #__sermondistributor_sermon as b
$query->select($db->quoteName(
array('b.id'),
array('id')));
@ -141,11 +141,11 @@ class SermondistributorModelPreachers extends JModelList
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
$query->where('b.published = 1');
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();

View File

@ -60,37 +60,37 @@ class SermondistributorModelSeries extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.link_type','a.short_description','a.icon','a.preacher','a.series','a.catid','a.description','a.source','a.build','a.manual_files','a.local_files','a.url','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering'),
array('id','asset_id','name','alias','link_type','short_description','icon','preacher','series','catid','description','source','build','manual_files','local_files','url','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [1788] Get from #__sermondistributor_preacher as c
// [1791] Get from #__sermondistributor_preacher as c
$query->select($db->quoteName(
array('c.name','c.alias'),
array('preacher_name','preacher_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_preacher', 'c')) . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('c.id') . ')');
// [1788] Get from #__sermondistributor_series as d
// [1791] Get from #__sermondistributor_series as d
$query->select($db->quoteName(
array('d.name','d.alias'),
array('series_name','series_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_series', 'd')) . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('d.id') . ')');
// [1788] Get from #__categories as b
// [1791] Get from #__categories as b
$query->select($db->quoteName(
array('b.title','b.alias'),
array('category','category_alias')));
$query->join('LEFT', ($db->quoteName('#__categories', 'b')) . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('b.id') . ')');
$query->where('a.access IN (' . implode(',', $this->levels) . ')');
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -107,7 +107,7 @@ class SermondistributorModelSeries extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -133,26 +133,26 @@ class SermondistributorModelSeries extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
if (SermondistributorHelper::checkString($item->local_files))
{
// [1990] Decode local_files
// [1993] Decode local_files
$item->local_files = json_decode($item->local_files, true);
}
if (SermondistributorHelper::checkString($item->manual_files))
{
// [1990] Decode manual_files
// [1993] Decode manual_files
$item->manual_files = json_decode($item->manual_files, true);
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// [2038] set idSermonStatisticE to the $item object.
// [2041] set idSermonStatisticE to the $item object.
$item->idSermonStatisticE = $this->getIdSermonStatisticEfeb_E($item->id);
}
@ -205,24 +205,24 @@ class SermondistributorModelSeries extends JModelList
*/
public function getIdSermonStatisticEfeb_E($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_statistic as e
// [2706] Get from #__sermondistributor_statistic as e
$query->select($db->quoteName(
array('e.filename','e.sermon','e.preacher','e.series','e.counter'),
array('filename','sermon','preacher','series','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'e'));
$query->where('e.sermon = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();
@ -250,19 +250,19 @@ class SermondistributorModelSeries extends JModelList
$this->levels = $this->user->getAuthorisedViewLevels();
$this->initSet = true;
}
// [2329] Get a db connection.
// [2332] Get a db connection.
$db = JFactory::getDbo();
// [2331] Create a new query object.
// [2334] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_series as a
// [1791] Get from #__sermondistributor_series as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.description','a.icon','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering','a.metadesc','a.metakey','a.metadata'),
array('id','asset_id','name','alias','description','icon','published','created_by','modified_by','created','modified','version','hits','ordering','metadesc','metakey','metadata')));
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where('a.access IN (' . implode(',', $this->levels) . ')');
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -279,21 +279,21 @@ class SermondistributorModelSeries extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2342] Reset the query using our newly populated query object.
// [2345] Reset the query using our newly populated query object.
$db->setQuery($query);
// [2344] Load the results as a stdClass object.
// [2347] Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
return false;
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$data->description = JHtml::_('content.prepare',$data->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
// [2443] return data object.
// [2446] return data object.
return $data;
}
@ -318,20 +318,20 @@ class SermondistributorModelSeries extends JModelList
$this->initSet = true;
}
// [2499] Get the global params
// [2502] Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_statistic as a
// [1791] Get from #__sermondistributor_statistic as a
$query->select($db->quoteName(
array('a.id','a.counter'),
array('id','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -348,7 +348,7 @@ class SermondistributorModelSeries extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2504] Reset the query using our newly populated query object.
// [2507] Reset the query using our newly populated query object.
$db->setQuery($query);
$items = $db->loadObjectList();
@ -357,13 +357,13 @@ class SermondistributorModelSeries extends JModelList
return false;
}
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
}
// [2513] return items
// [2516] return items
return $items;
}
@ -388,20 +388,20 @@ class SermondistributorModelSeries extends JModelList
$this->initSet = true;
}
// [2499] Get the global params
// [2502] Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.alias','a.series'),
array('id','alias','series')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [2130] Check if JRequest::getInt('id') is a string or numeric value.
// [2133] Check if JRequest::getInt('id') is a string or numeric value.
$checkValue = JRequest::getInt('id');
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
{
@ -419,7 +419,7 @@ class SermondistributorModelSeries extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2504] Reset the query using our newly populated query object.
// [2507] Reset the query using our newly populated query object.
$db->setQuery($query);
$items = $db->loadObjectList();
@ -428,13 +428,13 @@ class SermondistributorModelSeries extends JModelList
return false;
}
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
}
// [2513] return items
// [2516] return items
return $items;
}

View File

@ -60,13 +60,13 @@ class SermondistributorModelSerieslist extends JModelList
$this->app = JFactory::getApplication();
$this->input = $this->app->input;
$this->initSet = true;
// [2897] Get a db connection.
// [2900] Get a db connection.
$db = JFactory::getDbo();
// [2906] Create a new query object.
// [2909] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_series as a
// [1791] Get from #__sermondistributor_series as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.description','a.icon','a.hits','a.ordering'),
array('id','asset_id','name','alias','description','icon','hits','ordering')));
@ -75,7 +75,7 @@ class SermondistributorModelSerieslist extends JModelList
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2919] return the query object
// [2922] return the query object
return $query;
}
@ -101,16 +101,16 @@ class SermondistributorModelSerieslist extends JModelList
// Get the global params
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
// [2934] Convert the parameter fields into objects.
// [2937] Convert the parameter fields into objects.
foreach ($items as $nr => &$item)
{
// [2937] Always create a slug for sef URL's
// [2940] Always create a slug for sef URL's
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$item->description = JHtml::_('content.prepare',$item->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// [2038] set idSeriesSermonB to the $item object.
// [2041] set idSeriesSermonB to the $item object.
$item->idSeriesSermonB = $this->getIdSeriesSermonBcae_B($item->id);
}
@ -126,13 +126,13 @@ class SermondistributorModelSerieslist extends JModelList
*/
public function getIdSeriesSermonBcae_B($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_sermon as b
// [2706] Get from #__sermondistributor_sermon as b
$query->select($db->quoteName(
array('b.id'),
array('id')));
@ -141,11 +141,11 @@ class SermondistributorModelSerieslist extends JModelList
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
$query->where('b.published = 1');
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();

View File

@ -114,31 +114,31 @@ class SermondistributorModelSermon extends JModelItem
{
try
{
// [2329] Get a db connection.
// [2332] Get a db connection.
$db = JFactory::getDbo();
// [2331] Create a new query object.
// [2334] Create a new query object.
$query = $db->getQuery(true);
// [1788] Get from #__sermondistributor_sermon as a
// [1791] Get from #__sermondistributor_sermon as a
$query->select($db->quoteName(
array('a.id','a.asset_id','a.name','a.alias','a.preacher','a.short_description','a.icon','a.scripture','a.series','a.catid','a.description','a.link_type','a.source','a.build','a.manual_files','a.local_files','a.url','a.not_required','a.auto_sermons','a.published','a.created_by','a.modified_by','a.created','a.modified','a.version','a.hits','a.ordering','a.metadesc','a.metakey','a.metadata'),
array('id','asset_id','name','alias','preacher','short_description','icon','scripture','series','catid','description','link_type','source','build','manual_files','local_files','url','not_required','auto_sermons','published','created_by','modified_by','created','modified','version','hits','ordering','metadesc','metakey','metadata')));
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
// [1788] Get from #__sermondistributor_series as b
// [1791] Get from #__sermondistributor_series as b
$query->select($db->quoteName(
array('b.name','b.alias'),
array('series_name','series_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_series', 'b')) . ' ON (' . $db->quoteName('a.series') . ' = ' . $db->quoteName('b.id') . ')');
// [1788] Get from #__sermondistributor_preacher as c
// [1791] Get from #__sermondistributor_preacher as c
$query->select($db->quoteName(
array('c.name','c.alias'),
array('preacher_name','preacher_alias')));
$query->join('LEFT', ($db->quoteName('#__sermondistributor_preacher', 'c')) . ' ON (' . $db->quoteName('a.preacher') . ' = ' . $db->quoteName('c.id') . ')');
// [1788] Get from #__categories as e
// [1791] Get from #__categories as e
$query->select($db->quoteName(
array('e.alias','e.title'),
array('category_alias','category')));
@ -148,38 +148,38 @@ class SermondistributorModelSermon extends JModelItem
$query->where('a.published = 1');
$query->order('a.ordering ASC');
// [2342] Reset the query using our newly populated query object.
// [2345] Reset the query using our newly populated query object.
$db->setQuery($query);
// [2344] Load the results as a stdClass object.
// [2347] Load the results as a stdClass object.
$data = $db->loadObject();
if (empty($data))
{
// [2355] If no data is found redirect to default page and show warning.
// [2358] If no data is found redirect to default page and show warning.
JError::raiseWarning(500, JText::_('COM_SERMONDISTRIBUTOR_NOT_FOUND_OR_ACCESS_DENIED'));
JFactory::getApplication()->redirect('index.php?option=com_sermondistributor&view=preachers');
return false;
}
if (SermondistributorHelper::checkString($data->local_files))
{
// [1990] Decode local_files
// [1993] Decode local_files
$data->local_files = json_decode($data->local_files, true);
}
if (SermondistributorHelper::checkString($data->manual_files))
{
// [1990] Decode manual_files
// [1993] Decode manual_files
$data->manual_files = json_decode($data->manual_files, true);
}
// [2005] Make sure the content prepare plugins fire on description.
// [2008] Make sure the content prepare plugins fire on description.
$data->description = JHtml::_('content.prepare',$data->description);
// [2007] Checking if description has uikit components that must be loaded.
// [2010] Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
// [2301] set the global sermon value.
// [2304] set the global sermon value.
$this->a_sermon = $data->id;
// [2038] set idSermonStatisticD to the $data object.
// [2041] set idSermonStatisticD to the $data object.
$data->idSermonStatisticD = $this->getIdSermonStatisticEbbd_D($data->id);
// [2449] set data object to item.
// [2452] set data object to item.
$this->_item[$pk] = $data;
}
catch (Exception $e)
@ -260,24 +260,24 @@ class SermondistributorModelSermon extends JModelItem
*/
public function getIdSermonStatisticEbbd_D($id)
{
// [2699] Get a db connection.
// [2702] Get a db connection.
$db = JFactory::getDbo();
// [2701] Create a new query object.
// [2704] Create a new query object.
$query = $db->getQuery(true);
// [2703] Get from #__sermondistributor_statistic as d
// [2706] Get from #__sermondistributor_statistic as d
$query->select($db->quoteName(
array('d.filename','d.counter'),
array('filename','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic', 'd'));
$query->where('d.sermon = ' . $db->quote($id));
// [2757] Reset the query using our newly populated query object.
// [2760] Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
// [2760] check if there was data returned
// [2763] check if there was data returned
if ($db->getNumRows())
{
return $db->loadObjectList();

View File

@ -5,10 +5,10 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_DESC]]>
</message>
</layout>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] Categories_display Field. Type: Radio. (joomla) -->
<!-- [11272] Categories_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="categories_display"
@ -16,7 +16,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -26,7 +26,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] Categories_list_style Field. Type: List. (joomla) -->
<!-- [11272] Categories_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="categories_list_style"
@ -36,7 +36,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -48,7 +48,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Categories_table_color Field. Type: List. (joomla) -->
<!-- [11272] Categories_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="categories_table_color"
@ -58,7 +58,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -80,7 +80,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] Categories_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Categories_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="categories_icon"
@ -88,7 +88,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -96,7 +96,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Categories_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Categories_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="categories_desc"
@ -104,7 +104,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -112,7 +112,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Categories_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] Categories_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="categories_sermon_count"
@ -120,7 +120,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -128,7 +128,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Categories_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Categories_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="categories_hits"
@ -136,7 +136,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORIES_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,11 +38,11 @@ class SermondistributorViewCategories extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -71,10 +71,10 @@ class SermondistributorViewCategories extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -86,96 +86,96 @@ class SermondistributorViewCategories extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-tooltip';
$uikitComp[] = 'data-uk-grid';
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3377] load the meta description
// [3380] load the meta description
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3382] load the key words if set
// [3385] load the key words if set
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3387] check the robot params
// [3390] check the robot params
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));

View File

@ -5,12 +5,12 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_CATEGORY_DESC]]>
</message>
</layout>
<!-- [1714] Add fields to the request variables for the layout. -->
<!-- [1717] Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
<!-- [11332] Category_request_id Field. Type: Category. (joomla) -->
<!-- [11358] Category_request_id Field. Type: Category. (joomla) -->
<field
type="category"
name="id"
@ -22,10 +22,10 @@
/>
</fieldset>
</fields>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] Category_display Field. Type: Radio. (joomla) -->
<!-- [11272] Category_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_display"
@ -33,7 +33,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -43,7 +43,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SMALL</option>
</field>
<!-- [11246] Category_box_contrast Field. Type: Radio. (joomla) -->
<!-- [11272] Category_box_contrast Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_box_contrast"
@ -51,7 +51,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_BOX_CONTRAST_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -59,7 +59,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_list_style Field. Type: List. (joomla) -->
<!-- [11272] Category_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="category_list_style"
@ -69,7 +69,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -81,7 +81,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Category_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Category_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_icon"
@ -89,7 +89,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -97,7 +97,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Category_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_desc"
@ -105,7 +105,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -113,7 +113,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermon_count"
@ -121,7 +121,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -129,7 +129,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Category_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_hits"
@ -137,7 +137,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -145,9 +145,9 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11346] Spacer_hr_g Field. Type: Spacer. A None Database Field. (joomla) -->
<!-- [11372] Spacer_hr_g Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_g" hr="true" class="spacer_hr_g" />
<!-- [11246] Category_sermons_display Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_display"
@ -155,7 +155,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -165,7 +165,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] Category_sermons_list_style Field. Type: List. (joomla) -->
<!-- [11272] Category_sermons_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="category_sermons_list_style"
@ -175,7 +175,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -187,7 +187,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Category_sermons_table_color Field. Type: List. (joomla) -->
<!-- [11272] Category_sermons_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="category_sermons_table_color"
@ -197,7 +197,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -219,7 +219,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] Category_sermons_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_icon"
@ -227,7 +227,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -235,7 +235,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_desc"
@ -243,7 +243,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -251,7 +251,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_preacher Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_preacher Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_preacher"
@ -259,7 +259,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_PREACHER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -267,7 +267,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_series Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_series Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_series"
@ -275,7 +275,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_SERIES_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -283,7 +283,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_download_counter Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_download_counter Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_download_counter"
@ -291,7 +291,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_DOWNLOAD_COUNTER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -299,7 +299,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_hits"
@ -307,7 +307,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -315,7 +315,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_downloads Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_downloads Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_downloads"
@ -323,7 +323,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_DOWNLOADS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -331,7 +331,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Category_sermons_open Field. Type: Radio. (joomla) -->
<!-- [11272] Category_sermons_open Field. Type: Radio. (joomla) -->
<field
type="radio"
name="category_sermons_open"
@ -339,7 +339,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_CATEGORY_SERMONS_OPEN_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,12 +38,12 @@ class SermondistributorViewCategory extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->category = $this->get('Category');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -87,10 +87,10 @@ class SermondistributorViewCategory extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -134,39 +134,39 @@ class SermondistributorViewCategory extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -182,52 +182,52 @@ class SermondistributorViewCategory extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3326] load the meta description
// [3329] load the meta description
if (isset($this->category->metadesc) && $this->category->metadesc)
{
$this->document->setDescription($this->category->metadesc);
@ -236,7 +236,7 @@ class SermondistributorViewCategory extends JViewLegacy
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3335] load the key words if set
// [3338] load the key words if set
if (isset($this->category->metakey) && $this->category->metakey)
{
$this->document->setMetadata('keywords', $this->category->metakey);
@ -245,7 +245,7 @@ class SermondistributorViewCategory extends JViewLegacy
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3344] check the robot params
// [3347] check the robot params
if (isset($this->category->robots) && $this->category->robots)
{
$this->document->setMetadata('robots', $this->category->robots);
@ -254,12 +254,12 @@ class SermondistributorViewCategory extends JViewLegacy
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// [3353] check if autor is to be set
// [3356] check if autor is to be set
if (isset($this->category->created_by) && $this->params->get('MetaAuthor') == '1')
{
$this->document->setMetaData('author', $this->category->created_by);
}
// [3358] check if metadata is available
// [3361] check if metadata is available
if (isset($this->category->metadata) && $this->category->metadata)
{
$mdata = json_decode($this->category->metadata,true);

View File

@ -5,12 +5,12 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_PREACHER_DESC]]>
</message>
</layout>
<!-- [1714] Add fields to the request variables for the layout. -->
<!-- [1717] Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
<!-- [11453] Preacher_request_id Field. Type: Preachers. (custom) -->
<!-- [11479] Preacher_request_id Field. Type: Preachers. (custom) -->
<field
type="preachers"
name="id"
@ -24,10 +24,10 @@
/>
</fieldset>
</fields>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] Preacher_display Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_display"
@ -35,7 +35,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -45,7 +45,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SMALL</option>
</field>
<!-- [11246] Preacher_box_contrast Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_box_contrast Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_box_contrast"
@ -53,7 +53,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_BOX_CONTRAST_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -61,7 +61,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_list_style Field. Type: List. (joomla) -->
<!-- [11272] Preacher_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="preacher_list_style"
@ -71,7 +71,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -83,7 +83,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Preacher_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_icon"
@ -91,7 +91,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -99,7 +99,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_desc"
@ -107,7 +107,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -115,7 +115,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermon_count"
@ -123,7 +123,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -131,7 +131,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_hits"
@ -139,7 +139,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -147,7 +147,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_email Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_email Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_email"
@ -155,7 +155,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_EMAIL_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -163,7 +163,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_website Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_website Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_website"
@ -171,7 +171,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_WEBSITE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -179,9 +179,9 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11346] Spacer_hr_f Field. Type: Spacer. A None Database Field. (joomla) -->
<!-- [11372] Spacer_hr_f Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_f" hr="true" class="spacer_hr_f" />
<!-- [11246] Preacher_sermons_display Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_display"
@ -189,7 +189,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -199,7 +199,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] Preacher_sermons_list_style Field. Type: List. (joomla) -->
<!-- [11272] Preacher_sermons_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="preacher_sermons_list_style"
@ -209,7 +209,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -221,7 +221,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Preacher_sermons_table_color Field. Type: List. (joomla) -->
<!-- [11272] Preacher_sermons_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="preacher_sermons_table_color"
@ -231,7 +231,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -253,7 +253,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] Preacher_sermons_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_icon"
@ -261,7 +261,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -269,7 +269,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_desc"
@ -277,7 +277,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -285,7 +285,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_series Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_series Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_series"
@ -293,7 +293,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_SERIES_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -301,7 +301,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_category Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_category Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_category"
@ -309,7 +309,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_CATEGORY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -317,7 +317,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_download_counter Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_download_counter Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_download_counter"
@ -325,7 +325,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_DOWNLOAD_COUNTER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -333,7 +333,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_hits"
@ -341,7 +341,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -349,7 +349,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_downloads Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_downloads Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_downloads"
@ -357,7 +357,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_DOWNLOADS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -365,7 +365,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preacher_sermons_open Field. Type: Radio. (joomla) -->
<!-- [11272] Preacher_sermons_open Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preacher_sermons_open"
@ -373,7 +373,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_OPEN_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,14 +38,14 @@ class SermondistributorViewPreacher extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->preacher = $this->get('Preacher');
$this->numberdownloads = $this->get('NumberDownloads');
$this->numbersermons = $this->get('NumberSermons');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -81,10 +81,10 @@ class SermondistributorViewPreacher extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -128,40 +128,40 @@ class SermondistributorViewPreacher extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-tooltip';
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -177,52 +177,52 @@ class SermondistributorViewPreacher extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3326] load the meta description
// [3329] load the meta description
if (isset($this->preacher->metadesc) && $this->preacher->metadesc)
{
$this->document->setDescription($this->preacher->metadesc);
@ -231,7 +231,7 @@ class SermondistributorViewPreacher extends JViewLegacy
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3335] load the key words if set
// [3338] load the key words if set
if (isset($this->preacher->metakey) && $this->preacher->metakey)
{
$this->document->setMetadata('keywords', $this->preacher->metakey);
@ -240,7 +240,7 @@ class SermondistributorViewPreacher extends JViewLegacy
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3344] check the robot params
// [3347] check the robot params
if (isset($this->preacher->robots) && $this->preacher->robots)
{
$this->document->setMetadata('robots', $this->preacher->robots);
@ -249,12 +249,12 @@ class SermondistributorViewPreacher extends JViewLegacy
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// [3353] check if autor is to be set
// [3356] check if autor is to be set
if (isset($this->preacher->created_by) && $this->params->get('MetaAuthor') == '1')
{
$this->document->setMetaData('author', $this->preacher->created_by);
}
// [3358] check if metadata is available
// [3361] check if metadata is available
if (isset($this->preacher->metadata) && $this->preacher->metadata)
{
$mdata = json_decode($this->preacher->metadata,true);

View File

@ -5,10 +5,10 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_PREACHERS_DESC]]>
</message>
</layout>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] Preachers_display Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_display"
@ -16,7 +16,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -26,7 +26,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] Preachers_list_style Field. Type: List. (joomla) -->
<!-- [11272] Preachers_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="preachers_list_style"
@ -36,7 +36,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -48,7 +48,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Preachers_table_color Field. Type: List. (joomla) -->
<!-- [11272] Preachers_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="preachers_table_color"
@ -58,7 +58,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -80,7 +80,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] Preachers_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_icon"
@ -88,7 +88,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -96,7 +96,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preachers_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_desc"
@ -104,7 +104,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -112,7 +112,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preachers_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_sermon_count"
@ -120,7 +120,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -128,7 +128,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preachers_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_hits"
@ -136,7 +136,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -144,7 +144,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preachers_website Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_website Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_website"
@ -152,7 +152,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_WEBSITE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -160,7 +160,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Preachers_email Field. Type: Radio. (joomla) -->
<!-- [11272] Preachers_email Field. Type: Radio. (joomla) -->
<field
type="radio"
name="preachers_email"
@ -168,7 +168,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_EMAIL_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,11 +38,11 @@ class SermondistributorViewPreachers extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -71,10 +71,10 @@ class SermondistributorViewPreachers extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -86,40 +86,40 @@ class SermondistributorViewPreachers extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-tooltip';
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -135,62 +135,62 @@ class SermondistributorViewPreachers extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3377] load the meta description
// [3380] load the meta description
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3382] load the key words if set
// [3385] load the key words if set
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3387] check the robot params
// [3390] check the robot params
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));

View File

@ -5,12 +5,12 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_SERIES_DESC]]>
</message>
</layout>
<!-- [1714] Add fields to the request variables for the layout. -->
<!-- [1717] Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
<!-- [11453] Series_request_id Field. Type: Series. (custom) -->
<!-- [11479] Series_request_id Field. Type: Series. (custom) -->
<field
type="series"
name="id"
@ -23,10 +23,10 @@
/>
</fieldset>
</fields>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] Series_display Field. Type: Radio. (joomla) -->
<!-- [11272] Series_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_display"
@ -34,7 +34,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -44,7 +44,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SMALL</option>
</field>
<!-- [11246] Series_box_contrast Field. Type: Radio. (joomla) -->
<!-- [11272] Series_box_contrast Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_box_contrast"
@ -52,7 +52,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_BOX_CONTRAST_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -60,7 +60,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_list_style Field. Type: List. (joomla) -->
<!-- [11272] Series_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="series_list_style"
@ -70,7 +70,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -82,7 +82,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Series_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Series_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_icon"
@ -90,7 +90,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -98,7 +98,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Series_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_desc"
@ -106,7 +106,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -114,7 +114,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermon_count"
@ -122,7 +122,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -130,7 +130,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Series_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_hits"
@ -138,7 +138,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -146,9 +146,9 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11346] Spacer_hr_h Field. Type: Spacer. A None Database Field. (joomla) -->
<!-- [11372] Spacer_hr_h Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_h" hr="true" class="spacer_hr_h" />
<!-- [11246] Series_sermons_display Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_display"
@ -156,7 +156,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -166,7 +166,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] Series_sermons_list_style Field. Type: List. (joomla) -->
<!-- [11272] Series_sermons_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="series_sermons_list_style"
@ -176,7 +176,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -188,7 +188,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] Series_sermons_table_color Field. Type: List. (joomla) -->
<!-- [11272] Series_sermons_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="series_sermons_table_color"
@ -198,7 +198,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -220,7 +220,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] Series_sermons_icon Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_icon"
@ -228,7 +228,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -236,7 +236,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_desc Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_desc"
@ -244,7 +244,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -252,7 +252,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_preacher Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_preacher Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_preacher"
@ -260,7 +260,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_PREACHER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -268,7 +268,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_category Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_category Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_category"
@ -276,7 +276,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_CATEGORY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -284,7 +284,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_download_counter Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_download_counter Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_download_counter"
@ -292,7 +292,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_DOWNLOAD_COUNTER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -300,7 +300,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_hits Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_hits"
@ -308,7 +308,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -316,7 +316,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_downloads Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_downloads Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_downloads"
@ -324,7 +324,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_DOWNLOADS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -332,7 +332,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] Series_sermons_open Field. Type: Radio. (joomla) -->
<!-- [11272] Series_sermons_open Field. Type: Radio. (joomla) -->
<field
type="radio"
name="series_sermons_open"
@ -340,7 +340,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_OPEN_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,14 +38,14 @@ class SermondistributorViewSeries extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->series = $this->get('Series');
$this->numberdownloads = $this->get('NumberDownloads');
$this->numbersermons = $this->get('NumberSermons');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -81,10 +81,10 @@ class SermondistributorViewSeries extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -128,39 +128,39 @@ class SermondistributorViewSeries extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -176,52 +176,52 @@ class SermondistributorViewSeries extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3326] load the meta description
// [3329] load the meta description
if (isset($this->series->metadesc) && $this->series->metadesc)
{
$this->document->setDescription($this->series->metadesc);
@ -230,7 +230,7 @@ class SermondistributorViewSeries extends JViewLegacy
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3335] load the key words if set
// [3338] load the key words if set
if (isset($this->series->metakey) && $this->series->metakey)
{
$this->document->setMetadata('keywords', $this->series->metakey);
@ -239,7 +239,7 @@ class SermondistributorViewSeries extends JViewLegacy
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3344] check the robot params
// [3347] check the robot params
if (isset($this->series->robots) && $this->series->robots)
{
$this->document->setMetadata('robots', $this->series->robots);
@ -248,12 +248,12 @@ class SermondistributorViewSeries extends JViewLegacy
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// [3353] check if autor is to be set
// [3356] check if autor is to be set
if (isset($this->series->created_by) && $this->params->get('MetaAuthor') == '1')
{
$this->document->setMetaData('author', $this->series->created_by);
}
// [3358] check if metadata is available
// [3361] check if metadata is available
if (isset($this->series->metadata) && $this->series->metadata)
{
$mdata = json_decode($this->series->metadata,true);

View File

@ -5,10 +5,10 @@
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_SERIESLIST_DESC]]>
</message>
</layout>
<!-- [1729] Adding page parameters -->
<!-- [1732] Adding page parameters -->
<fields name="params">
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
<!-- [11246] List_series_display Field. Type: Radio. (joomla) -->
<!-- [11272] List_series_display Field. Type: Radio. (joomla) -->
<field
type="radio"
name="list_series_display"
@ -16,7 +16,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_DISPLAY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -26,7 +26,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_LIST</option>
</field>
<!-- [11246] List_series_list_style Field. Type: List. (joomla) -->
<!-- [11272] List_series_list_style Field. Type: List. (joomla) -->
<field
type="list"
name="list_series_list_style"
@ -36,7 +36,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -48,7 +48,7 @@
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_SPACED</option>
</field>
<!-- [11246] List_series_table_color Field. Type: List. (joomla) -->
<!-- [11272] List_series_table_color Field. Type: List. (joomla) -->
<field
type="list"
name="list_series_table_color"
@ -58,7 +58,7 @@
multiple="false"
filter="string"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="0">
@ -80,7 +80,7 @@
<option value="8">
COM_SERMONDISTRIBUTOR_CONFIG_NONE</option>
</field>
<!-- [11246] List_series_icon Field. Type: Radio. (joomla) -->
<!-- [11272] List_series_icon Field. Type: Radio. (joomla) -->
<field
type="radio"
name="list_series_icon"
@ -88,7 +88,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_ICON_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -96,7 +96,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] List_series_desc Field. Type: Radio. (joomla) -->
<!-- [11272] List_series_desc Field. Type: Radio. (joomla) -->
<field
type="radio"
name="list_series_desc"
@ -104,7 +104,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_DESC_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -112,7 +112,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] List_series_sermon_count Field. Type: Radio. (joomla) -->
<!-- [11272] List_series_sermon_count Field. Type: Radio. (joomla) -->
<field
type="radio"
name="list_series_sermon_count"
@ -120,7 +120,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_SERMON_COUNT_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">
@ -128,7 +128,7 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- [11246] List_series_hits Field. Type: Radio. (joomla) -->
<!-- [11272] List_series_hits Field. Type: Radio. (joomla) -->
<field
type="radio"
name="list_series_hits"
@ -136,7 +136,7 @@
description="COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_HITS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
<!-- [11318] [1752] Global & Option Set. -->
<!-- [11344] [1755] Global & Option Set. -->
<option value="">
JGLOBAL_USE_GLOBAL</option>
<option value="1">

View File

@ -38,11 +38,11 @@ class SermondistributorViewSerieslist extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3032] Initialise variables.
// [3035] Initialise variables.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -71,10 +71,10 @@ class SermondistributorViewSerieslist extends JViewLegacy
$this->fooTableStyle = 2;
}
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -86,40 +86,40 @@ class SermondistributorViewSerieslist extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-tooltip';
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -135,62 +135,62 @@ class SermondistributorViewSerieslist extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [6480] Add the CSS for Footable.
// [6506] Add the CSS for Footable.
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
// [6482] Use the Metro Style
// [6508] Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
}
// [6487] Use the Legacy Style.
// [6513] Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
}
// [6492] Add the JavaScript for Footable
// [6518] Add the JavaScript for Footable
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.sort.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.filter.js');
$this->document->addScript(JURI::root() .'media/com_sermondistributor/footable/js/footable.paginate.js');
// [3377] load the meta description
// [3380] load the meta description
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3382] load the key words if set
// [3385] load the key words if set
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3387] check the robot params
// [3390] check the robot params
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));

View File

@ -38,10 +38,10 @@ class SermondistributorViewSermon extends JViewLegacy
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// [3026] Initialise variables.
// [3029] Initialise variables.
$this->item = $this->get('Item');
// [3050] Check for errors.
// [3053] Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
@ -55,10 +55,10 @@ class SermondistributorViewSermon extends JViewLegacy
// set view key
$this->item->viewKey = 'sermon';
// [3067] Set the toolbar
// [3070] Set the toolbar
$this->addToolBar();
// [3069] set the document
// [3072] set the document
$this->_prepareDocument();
parent::display($tpl);
@ -102,40 +102,40 @@ class SermondistributorViewSermon extends JViewLegacy
protected function _prepareDocument()
{
// [3419] always make sure jquery is loaded.
// [3422] always make sure jquery is loaded.
JHtml::_('jquery.framework');
// [3421] Load the header checker class.
// [3424] Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
// [3423] Initialize the header checker.
// [3426] Initialize the header checker.
$HeaderCheck = new HeaderCheck;
// [3428] Load uikit options.
// [3431] Load uikit options.
$uikit = $this->params->get('uikit_load');
// [3430] Set script size.
// [3433] Set script size.
$size = $this->params->get('uikit_min');
// [3432] Set css style.
// [3435] Set css style.
$style = $this->params->get('uikit_style');
// [3435] The uikit css.
// [3438] The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css');
}
// [3440] The uikit js.
// [3443] The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js');
}
// [3449] Load the script to find all uikit components needed.
// [3452] Load the script to find all uikit components needed.
if ($uikit != 2)
{
// [3452] Set the default uikit components in this view.
// [3455] Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'data-uk-tooltip';
$uikitComp[] = 'data-uk-grid';
// [3461] Get field uikit components needed in this view.
// [3464] Get field uikit components needed in this view.
$uikitFieldComp = $this->get('UikitComp');
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
{
@ -151,32 +151,32 @@ class SermondistributorViewSermon extends JViewLegacy
}
}
// [3477] Load the needed uikit components in this view.
// [3480] Load the needed uikit components in this view.
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
{
// [3480] load just in case.
// [3483] load just in case.
jimport('joomla.filesystem.file');
// [3482] loading...
// [3485] loading...
foreach ($uikitComp as $class)
{
foreach (SermondistributorHelper::$uk_components[$class] as $name)
{
// [3487] check if the CSS file exists.
// [3490] check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
{
// [3490] load the css.
// [3493] load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
}
// [3493] check if the JavaScript file exists.
// [3496] check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
{
// [3496] load the js.
// [3499] load the js.
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
}
}
}
}
// [3326] load the meta description
// [3329] load the meta description
if (isset($this->item->metadesc) && $this->item->metadesc)
{
$this->document->setDescription($this->item->metadesc);
@ -185,7 +185,7 @@ class SermondistributorViewSermon extends JViewLegacy
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// [3335] load the key words if set
// [3338] load the key words if set
if (isset($this->item->metakey) && $this->item->metakey)
{
$this->document->setMetadata('keywords', $this->item->metakey);
@ -194,7 +194,7 @@ class SermondistributorViewSermon extends JViewLegacy
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
// [3344] check the robot params
// [3347] check the robot params
if (isset($this->item->robots) && $this->item->robots)
{
$this->document->setMetadata('robots', $this->item->robots);
@ -203,12 +203,12 @@ class SermondistributorViewSermon extends JViewLegacy
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// [3353] check if autor is to be set
// [3356] check if autor is to be set
if (isset($this->item->created_by) && $this->params->get('MetaAuthor') == '1')
{
$this->document->setMetaData('author', $this->item->created_by);
}
// [3358] check if metadata is available
// [3361] check if metadata is available
if (isset($this->item->metadata) && $this->item->metadata)
{
$mdata = json_decode($this->item->metadata,true);