Fix to update server, all other changes are only random variable name and date changes (due to automation sorry)
This commit is contained in:
parent
4077fe88e1
commit
2b470a7979
@ -35,7 +35,7 @@ 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*: **46544**
|
||||
+ *Line count*: **46561**
|
||||
+ *File count*: **350**
|
||||
+ *Folder count*: **79**
|
||||
|
||||
|
468
admin/config.xml
468
admin/config.xml
File diff suppressed because it is too large
Load Diff
@ -60,13 +60,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [9559] Access check.
|
||||
// [9571] Access check.
|
||||
$access = JFactory::getUser()->authorise('help_document.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [9570] In the absense of better information, revert to the component permissions.
|
||||
// [9582] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('help_document.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [9713] get user object.
|
||||
// [9725] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [9715] get record id.
|
||||
// [9727] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [9722] Access check.
|
||||
// [9734] Access check.
|
||||
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [9731] The record has been set. Check the record permissions.
|
||||
// [9743] 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))
|
||||
{
|
||||
// [9753] Now test the owner is the user.
|
||||
// [9765] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [9757] Need to do a lookup from the model.
|
||||
// [9769] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [9765] If the owner matches 'me' then allow.
|
||||
// [9777] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerHelp_document extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [9787] Since there is no permission, revert to the component permissions.
|
||||
// [9799] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('help_document.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -48,29 +48,29 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// [7509] Check for request forgeries
|
||||
// [7521] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7511] check if export is allowed for this user.
|
||||
// [7523] 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'))
|
||||
{
|
||||
// [7515] Get the input
|
||||
// [7527] Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// [7518] Sanitize the input
|
||||
// [7530] Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// [7520] Get the model
|
||||
// [7532] Get the model
|
||||
$model = $this->getModel('Help_documents');
|
||||
// [7522] get the data to export
|
||||
// [7534] get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (SermondistributorHelper::checkArray($data))
|
||||
{
|
||||
// [7526] now set the data to the spreadsheet
|
||||
// [7538] 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');
|
||||
}
|
||||
}
|
||||
// [7531] Redirect to the list screen with error.
|
||||
// [7543] 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;
|
||||
@ -79,31 +79,31 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// [7540] Check for request forgeries
|
||||
// [7552] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7542] check if import is allowed for this user.
|
||||
// [7554] 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'))
|
||||
{
|
||||
// [7546] Get the import model
|
||||
// [7558] Get the import model
|
||||
$model = $this->getModel('Help_documents');
|
||||
// [7548] get the headers to import
|
||||
// [7560] get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
// [7552] Load headers to session.
|
||||
// [7564] 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');
|
||||
// [7558] Redirect to import view.
|
||||
// [7570] 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;
|
||||
}
|
||||
}
|
||||
// [7570] Redirect to the list screen with error.
|
||||
// [7582] 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;
|
||||
|
@ -60,13 +60,13 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [9559] Access check.
|
||||
// [9571] Access check.
|
||||
$access = JFactory::getUser()->authorise('preacher.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [9570] In the absense of better information, revert to the component permissions.
|
||||
// [9582] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('preacher.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [9713] get user object.
|
||||
// [9725] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [9715] get record id.
|
||||
// [9727] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [9722] Access check.
|
||||
// [9734] Access check.
|
||||
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [9731] The record has been set. Check the record permissions.
|
||||
// [9743] 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))
|
||||
{
|
||||
// [9753] Now test the owner is the user.
|
||||
// [9765] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [9757] Need to do a lookup from the model.
|
||||
// [9769] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [9765] If the owner matches 'me' then allow.
|
||||
// [9777] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('preacher.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerPreacher extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [9787] Since there is no permission, revert to the component permissions.
|
||||
// [9799] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('preacher.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -48,29 +48,29 @@ class SermondistributorControllerPreachers extends JControllerAdmin
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// [7509] Check for request forgeries
|
||||
// [7521] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7511] check if export is allowed for this user.
|
||||
// [7523] check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
|
||||
{
|
||||
// [7515] Get the input
|
||||
// [7527] Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// [7518] Sanitize the input
|
||||
// [7530] Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// [7520] Get the model
|
||||
// [7532] Get the model
|
||||
$model = $this->getModel('Preachers');
|
||||
// [7522] get the data to export
|
||||
// [7534] get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (SermondistributorHelper::checkArray($data))
|
||||
{
|
||||
// [7526] now set the data to the spreadsheet
|
||||
// [7538] 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');
|
||||
}
|
||||
}
|
||||
// [7531] Redirect to the list screen with error.
|
||||
// [7543] 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;
|
||||
@ -79,31 +79,31 @@ class SermondistributorControllerPreachers extends JControllerAdmin
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// [7540] Check for request forgeries
|
||||
// [7552] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7542] check if import is allowed for this user.
|
||||
// [7554] check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
|
||||
{
|
||||
// [7546] Get the import model
|
||||
// [7558] Get the import model
|
||||
$model = $this->getModel('Preachers');
|
||||
// [7548] get the headers to import
|
||||
// [7560] get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
// [7552] Load headers to session.
|
||||
// [7564] 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');
|
||||
// [7558] Redirect to import view.
|
||||
// [7570] 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;
|
||||
}
|
||||
}
|
||||
// [7570] Redirect to the list screen with error.
|
||||
// [7582] 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;
|
||||
|
@ -60,13 +60,13 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [9559] Access check.
|
||||
// [9571] Access check.
|
||||
$access = JFactory::getUser()->authorise('series.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [9570] In the absense of better information, revert to the component permissions.
|
||||
// [9582] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('series.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [9713] get user object.
|
||||
// [9725] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [9715] get record id.
|
||||
// [9727] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [9722] Access check.
|
||||
// [9734] Access check.
|
||||
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [9731] The record has been set. Check the record permissions.
|
||||
// [9743] 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))
|
||||
{
|
||||
// [9753] Now test the owner is the user.
|
||||
// [9765] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [9757] Need to do a lookup from the model.
|
||||
// [9769] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [9765] If the owner matches 'me' then allow.
|
||||
// [9777] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('series.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerSeries extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [9787] Since there is no permission, revert to the component permissions.
|
||||
// [9799] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('series.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -48,29 +48,29 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// [7509] Check for request forgeries
|
||||
// [7521] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7511] check if export is allowed for this user.
|
||||
// [7523] check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
|
||||
{
|
||||
// [7515] Get the input
|
||||
// [7527] Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// [7518] Sanitize the input
|
||||
// [7530] Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// [7520] Get the model
|
||||
// [7532] Get the model
|
||||
$model = $this->getModel('Series_list');
|
||||
// [7522] get the data to export
|
||||
// [7534] get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (SermondistributorHelper::checkArray($data))
|
||||
{
|
||||
// [7526] now set the data to the spreadsheet
|
||||
// [7538] 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');
|
||||
}
|
||||
}
|
||||
// [7531] Redirect to the list screen with error.
|
||||
// [7543] 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;
|
||||
@ -79,31 +79,31 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// [7540] Check for request forgeries
|
||||
// [7552] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7542] check if import is allowed for this user.
|
||||
// [7554] check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
|
||||
{
|
||||
// [7546] Get the import model
|
||||
// [7558] Get the import model
|
||||
$model = $this->getModel('Series_list');
|
||||
// [7548] get the headers to import
|
||||
// [7560] get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
// [7552] Load headers to session.
|
||||
// [7564] 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');
|
||||
// [7558] Redirect to import view.
|
||||
// [7570] 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;
|
||||
}
|
||||
}
|
||||
// [7570] Redirect to the list screen with error.
|
||||
// [7582] 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;
|
||||
|
@ -60,10 +60,10 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [9514] get the user object
|
||||
// [9526] get the user object
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9519] Access check.
|
||||
// [9531] Access check.
|
||||
$access = $user->authorise('sermon.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
@ -74,13 +74,13 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($categoryId)
|
||||
{
|
||||
// [9530] If the category has been passed in the URL check it.
|
||||
// [9542] If the category has been passed in the URL check it.
|
||||
$allow = $user->authorise('core.create', $this->option . '.sermons.category.' . $categoryId);
|
||||
}
|
||||
|
||||
if ($allow === null)
|
||||
{
|
||||
// [9539] In the absense of better information, revert to the component permissions.
|
||||
// [9551] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('sermon.create', $this->option);
|
||||
}
|
||||
else
|
||||
@ -100,13 +100,13 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{ // [9617] get user object.
|
||||
{ // [9629] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [9619] get record id.
|
||||
// [9631] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [9626] Access check.
|
||||
// [9638] Access check.
|
||||
$access = ($user->authorise('sermon.access', 'com_sermondistributor.sermon.' . (int) $recordId) && $user->authorise('sermon.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -115,17 +115,17 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [9635] The record has been set. Check the record permissions.
|
||||
// [9647] 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))
|
||||
{
|
||||
// [9657] Fallback on edit.own. Now test the owner is the user.
|
||||
// [9669] Fallback on edit.own. Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [9661] Need to do a lookup from the model.
|
||||
// [9673] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -135,7 +135,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [9669] If the owner matches 'me' then do the test.
|
||||
// [9681] If the owner matches 'me' then do the test.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('sermon.edit.own', 'com_sermondistributor'))
|
||||
@ -151,7 +151,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
|
||||
if ($categoryId)
|
||||
{
|
||||
// [9691] The category has been set. Check the category permissions.
|
||||
// [9703] The category has been set. Check the category permissions.
|
||||
$catpermission = $user->authorise('core.edit', $this->option . '.sermons.category.' . $categoryId);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -159,7 +159,7 @@ class SermondistributorControllerSermon extends JControllerForm
|
||||
}
|
||||
}
|
||||
}
|
||||
// [9701] Since there is no permission, revert to the component permissions.
|
||||
// [9713] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('sermon.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -48,29 +48,29 @@ class SermondistributorControllerSermons extends JControllerAdmin
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// [7509] Check for request forgeries
|
||||
// [7521] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7511] check if export is allowed for this user.
|
||||
// [7523] check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
|
||||
{
|
||||
// [7515] Get the input
|
||||
// [7527] Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// [7518] Sanitize the input
|
||||
// [7530] Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// [7520] Get the model
|
||||
// [7532] Get the model
|
||||
$model = $this->getModel('Sermons');
|
||||
// [7522] get the data to export
|
||||
// [7534] get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (SermondistributorHelper::checkArray($data))
|
||||
{
|
||||
// [7526] now set the data to the spreadsheet
|
||||
// [7538] 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');
|
||||
}
|
||||
}
|
||||
// [7531] Redirect to the list screen with error.
|
||||
// [7543] 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;
|
||||
@ -79,31 +79,31 @@ class SermondistributorControllerSermons extends JControllerAdmin
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// [7540] Check for request forgeries
|
||||
// [7552] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7542] check if import is allowed for this user.
|
||||
// [7554] check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
|
||||
{
|
||||
// [7546] Get the import model
|
||||
// [7558] Get the import model
|
||||
$model = $this->getModel('Sermons');
|
||||
// [7548] get the headers to import
|
||||
// [7560] get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
// [7552] Load headers to session.
|
||||
// [7564] 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');
|
||||
// [7558] Redirect to import view.
|
||||
// [7570] 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;
|
||||
}
|
||||
}
|
||||
// [7570] Redirect to the list screen with error.
|
||||
// [7582] 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;
|
||||
|
@ -60,13 +60,13 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// [9559] Access check.
|
||||
// [9571] Access check.
|
||||
$access = JFactory::getUser()->authorise('statistic.access', 'com_sermondistributor');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [9570] In the absense of better information, revert to the component permissions.
|
||||
// [9582] In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('statistic.create', $this->option);
|
||||
}
|
||||
|
||||
@ -82,13 +82,13 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [9713] get user object.
|
||||
// [9725] get user object.
|
||||
$user = JFactory::getUser();
|
||||
// [9715] get record id.
|
||||
// [9727] get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// [9722] Access check.
|
||||
// [9734] Access check.
|
||||
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
|
||||
if (!$access)
|
||||
{
|
||||
@ -97,17 +97,17 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [9731] The record has been set. Check the record permissions.
|
||||
// [9743] 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))
|
||||
{
|
||||
// [9753] Now test the owner is the user.
|
||||
// [9765] Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// [9757] Need to do a lookup from the model.
|
||||
// [9769] Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
@ -117,7 +117,7 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// [9765] If the owner matches 'me' then allow.
|
||||
// [9777] If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('statistic.edit.own', 'com_sermondistributor'))
|
||||
@ -129,7 +129,7 @@ class SermondistributorControllerStatistic extends JControllerForm
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [9787] Since there is no permission, revert to the component permissions.
|
||||
// [9799] Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('statistic.edit', $this->option);
|
||||
}
|
||||
|
||||
|
@ -48,29 +48,29 @@ class SermondistributorControllerStatistics extends JControllerAdmin
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// [7509] Check for request forgeries
|
||||
// [7521] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7511] check if export is allowed for this user.
|
||||
// [7523] check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
|
||||
{
|
||||
// [7515] Get the input
|
||||
// [7527] Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// [7518] Sanitize the input
|
||||
// [7530] Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// [7520] Get the model
|
||||
// [7532] Get the model
|
||||
$model = $this->getModel('Statistics');
|
||||
// [7522] get the data to export
|
||||
// [7534] get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (SermondistributorHelper::checkArray($data))
|
||||
{
|
||||
// [7526] now set the data to the spreadsheet
|
||||
// [7538] 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');
|
||||
}
|
||||
}
|
||||
// [7531] Redirect to the list screen with error.
|
||||
// [7543] 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;
|
||||
@ -79,31 +79,31 @@ class SermondistributorControllerStatistics extends JControllerAdmin
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// [7540] Check for request forgeries
|
||||
// [7552] Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// [7542] check if import is allowed for this user.
|
||||
// [7554] check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
|
||||
{
|
||||
// [7546] Get the import model
|
||||
// [7558] Get the import model
|
||||
$model = $this->getModel('Statistics');
|
||||
// [7548] get the headers to import
|
||||
// [7560] get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
// [7552] Load headers to session.
|
||||
// [7564] 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');
|
||||
// [7558] Redirect to import view.
|
||||
// [7570] 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;
|
||||
}
|
||||
}
|
||||
// [7570] Redirect to the list screen with error.
|
||||
// [7582] 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;
|
||||
|
@ -553,23 +553,23 @@ abstract class SermondistributorHelper
|
||||
$targetgroups = json_decode($help->groups, true);
|
||||
if (!array_intersect($targetgroups, $groups))
|
||||
{
|
||||
// [1470] if user not in those target groups then remove the item
|
||||
// [1482] if user not in those target groups then remove the item
|
||||
unset($helps[$nr]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// [1475] set the return type
|
||||
// [1487] set the return type
|
||||
switch ($help->type)
|
||||
{
|
||||
// [1478] set joomla article
|
||||
// [1490] set joomla article
|
||||
case 1:
|
||||
return self::loadArticleLink($help->article);
|
||||
break;
|
||||
// [1482] set help text
|
||||
// [1494] set help text
|
||||
case 2:
|
||||
return self::loadHelpTextLink($help->id);
|
||||
break;
|
||||
// [1486] set Link
|
||||
// [1498] set Link
|
||||
case 3:
|
||||
return $help->url;
|
||||
break;
|
||||
@ -698,7 +698,7 @@ abstract class SermondistributorHelper
|
||||
{
|
||||
if (strpos($content,'class="uk-') !== false)
|
||||
{
|
||||
// [2714] reset
|
||||
// [2726] reset
|
||||
$temp = array();
|
||||
foreach (self::$uk_components as $looking => $add)
|
||||
{
|
||||
@ -707,15 +707,15 @@ abstract class SermondistributorHelper
|
||||
$temp[] = $looking;
|
||||
}
|
||||
}
|
||||
// [2723] make sure uikit is loaded to config
|
||||
// [2735] make sure uikit is loaded to config
|
||||
if (strpos($content,'class="uk-') !== false)
|
||||
{
|
||||
self::$uikit = true;
|
||||
}
|
||||
// [2728] sorter
|
||||
// [2740] sorter
|
||||
if (self::checkArray($temp))
|
||||
{
|
||||
// [2731] merger
|
||||
// [2743] merger
|
||||
if (self::checkArray($classes))
|
||||
{
|
||||
$newTemp = array_merge($temp,$classes);
|
||||
@ -736,37 +736,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)
|
||||
{
|
||||
// [1525] set the user
|
||||
// [1537] set the user
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [1528] set fieldname if not set
|
||||
// [1540] set fieldname if not set
|
||||
if (!$fileName)
|
||||
{
|
||||
$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');
|
||||
}
|
||||
// [1533] set modiefied if not set
|
||||
// [1545] set modiefied if not set
|
||||
if (!$modified)
|
||||
{
|
||||
$modified = $user->name;
|
||||
}
|
||||
// [1538] set title if not set
|
||||
// [1550] set title if not set
|
||||
if (!$title)
|
||||
{
|
||||
$title = 'Book1';
|
||||
}
|
||||
// [1543] set tab name if not set
|
||||
// [1555] set tab name if not set
|
||||
if (!$subjectTab)
|
||||
{
|
||||
$subjectTab = 'Sheet1';
|
||||
}
|
||||
|
||||
// [1549] make sure the file is loaded
|
||||
// [1561] make sure the file is loaded
|
||||
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
||||
|
||||
// [1552] Create new PHPExcel object
|
||||
// [1564] Create new PHPExcel object
|
||||
$objPHPExcel = new PHPExcel();
|
||||
|
||||
// [1555] Set document properties
|
||||
// [1567] Set document properties
|
||||
$objPHPExcel->getProperties()->setCreator($creator)
|
||||
->setCompany('Vast Development Method')
|
||||
->setLastModifiedBy($modified)
|
||||
@ -785,7 +785,7 @@ abstract class SermondistributorHelper
|
||||
$objPHPExcel->getProperties()->setCategory($category);
|
||||
}
|
||||
|
||||
// [1574] Some styles
|
||||
// [1586] Some styles
|
||||
$headerStyles = array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
@ -807,7 +807,7 @@ abstract class SermondistributorHelper
|
||||
'name' => 'Verdana'
|
||||
));
|
||||
|
||||
// [1596] Add some data
|
||||
// [1608] Add some data
|
||||
if (self::checkArray($rows))
|
||||
{
|
||||
$i = 1;
|
||||
@ -834,20 +834,20 @@ abstract class SermondistributorHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
// [1623] Rename worksheet
|
||||
// [1635] Rename worksheet
|
||||
$objPHPExcel->getActiveSheet()->setTitle($subjectTab);
|
||||
|
||||
// [1626] Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
||||
// [1638] Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
||||
$objPHPExcel->setActiveSheetIndex(0);
|
||||
|
||||
// [1629] Redirect output to a client's web browser (Excel5)
|
||||
// [1641] 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');
|
||||
// [1633] If you're serving to IE 9, then the following may be needed
|
||||
// [1645] If you're serving to IE 9, then the following may be needed
|
||||
header('Cache-Control: max-age=1');
|
||||
|
||||
// [1636] If you're serving to IE over SSL, then the following may be needed
|
||||
// [1648] 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
|
||||
@ -863,13 +863,13 @@ abstract class SermondistributorHelper
|
||||
*/
|
||||
public static function getFileHeaders($dataType)
|
||||
{
|
||||
// [1652] make sure the file is loaded
|
||||
// [1664] make sure the file is loaded
|
||||
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
||||
// [1654] get session object
|
||||
// [1666] get session object
|
||||
$session = JFactory::getSession();
|
||||
$package = $session->get('package', null);
|
||||
$package = json_decode($package, true);
|
||||
// [1658] set the headers
|
||||
// [1670] set the headers
|
||||
if(isset($package['dir']))
|
||||
{
|
||||
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
|
||||
|
@ -28,7 +28,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->jfzsermons;
|
||||
$items = $displayData->pblsermons;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
|
||||
|
@ -28,7 +28,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->ekusermons;
|
||||
$items = $displayData->skxsermons;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
|
||||
|
@ -28,7 +28,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->qfostastics;
|
||||
$items = $displayData->pomstastics;
|
||||
$user = JFactory::getUser();
|
||||
$id = $displayData->item->id;
|
||||
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";
|
||||
|
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
|
||||
|
||||
}
|
||||
|
||||
// [9156] Used in sermon
|
||||
// [9168] Used in sermon
|
||||
/**
|
||||
* Check and Set Dropbox local listing
|
||||
**/
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldArticles extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create article
|
||||
// [7951] only add if user allowed to create article
|
||||
if ($user->authorise('core.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=article&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldDropboxfiles extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create
|
||||
// [7951] only add if user allowed to create
|
||||
if ($user->authorise('core.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldLocalfiles extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create
|
||||
// [7951] only add if user allowed to create
|
||||
if ($user->authorise('core.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldPreachers extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create preacher
|
||||
// [7951] only add if user allowed to create preacher
|
||||
if ($user->authorise('preacher.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=preacher&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldSeries extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create series
|
||||
// [7951] only add if user allowed to create series
|
||||
if ($user->authorise('series.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=series&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -50,36 +50,36 @@ class JFormFieldSermon extends JFormFieldList
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// [7931] see if we should add buttons
|
||||
// [7943] see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// [7933] get html
|
||||
// [7945] get html
|
||||
$html = parent::getInput();
|
||||
// [7935] if true set button
|
||||
// [7947] if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
// [7939] only add if user allowed to create sermon
|
||||
// [7951] only add if user allowed to create sermon
|
||||
if ($user->authorise('sermon.create', 'com_sermondistributor'))
|
||||
{
|
||||
// [7957] get the input from url
|
||||
// [7969] get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// [7959] get the view name & id
|
||||
// [7971] get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// [7964] check if new item
|
||||
// [7976] check if new item
|
||||
$ref = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// [7968] only load referal if not new item.
|
||||
// [7980] only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
// [7971] build the button
|
||||
// [7983] build the button
|
||||
$button = '<a class="btn btn-small btn-success"
|
||||
href="index.php?option=com_sermondistributor&view=sermon&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span>' . JText::_('COM_SERMONDISTRIBUTOR_NEW') . '</a>';
|
||||
// [7975] return the button attached to input field
|
||||
// [7987] return the button attached to input field
|
||||
return $html . $button;
|
||||
}
|
||||
}
|
||||
|
@ -23,38 +23,38 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_PDcWyEnUDa_required = false;
|
||||
jform_oNdbymxKWg_required = false;
|
||||
jform_QQNYqXlxnF_required = false;
|
||||
jform_xgjGfFertA_required = false;
|
||||
jform_KVFJfFjKLp_required = false;
|
||||
jform_PVcvKoRLlz_required = false;
|
||||
jform_RaenoglczP_required = false;
|
||||
jform_roNdXRBgDs_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var location_pLIjTGg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
pLIjTGg(location_pLIjTGg);
|
||||
var location_VcFiOMv = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
VcFiOMv(location_VcFiOMv);
|
||||
|
||||
var location_Ajshqyg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
Ajshqyg(location_Ajshqyg);
|
||||
var location_nbWIzGw = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nbWIzGw(location_nbWIzGw);
|
||||
|
||||
var type_PDcWyEn = jQuery("#jform_type").val();
|
||||
PDcWyEn(type_PDcWyEn);
|
||||
var type_KVFJfFj = jQuery("#jform_type").val();
|
||||
KVFJfFj(type_KVFJfFj);
|
||||
|
||||
var type_oNdbymx = jQuery("#jform_type").val();
|
||||
oNdbymx(type_oNdbymx);
|
||||
var type_PVcvKoR = jQuery("#jform_type").val();
|
||||
PVcvKoR(type_PVcvKoR);
|
||||
|
||||
var type_QQNYqXl = jQuery("#jform_type").val();
|
||||
QQNYqXl(type_QQNYqXl);
|
||||
var type_Raenogl = jQuery("#jform_type").val();
|
||||
Raenogl(type_Raenogl);
|
||||
|
||||
var target_xgjGfFe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
xgjGfFe(target_xgjGfFe);
|
||||
var target_roNdXRB = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
roNdXRB(target_roNdXRB);
|
||||
});
|
||||
|
||||
// the pLIjTGg function
|
||||
function pLIjTGg(location_pLIjTGg)
|
||||
// the VcFiOMv function
|
||||
function VcFiOMv(location_VcFiOMv)
|
||||
{
|
||||
// [8248] set the function logic
|
||||
if (location_pLIjTGg == 1)
|
||||
// [8260] set the function logic
|
||||
if (location_VcFiOMv == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
}
|
||||
@ -64,11 +64,11 @@ function pLIjTGg(location_pLIjTGg)
|
||||
}
|
||||
}
|
||||
|
||||
// the Ajshqyg function
|
||||
function Ajshqyg(location_Ajshqyg)
|
||||
// the nbWIzGw function
|
||||
function nbWIzGw(location_nbWIzGw)
|
||||
{
|
||||
// [8248] set the function logic
|
||||
if (location_Ajshqyg == 2)
|
||||
// [8260] set the function logic
|
||||
if (location_nbWIzGw == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
}
|
||||
@ -78,198 +78,198 @@ function Ajshqyg(location_Ajshqyg)
|
||||
}
|
||||
}
|
||||
|
||||
// the PDcWyEn function
|
||||
function PDcWyEn(type_PDcWyEn)
|
||||
// the KVFJfFj function
|
||||
function KVFJfFj(type_KVFJfFj)
|
||||
{
|
||||
if (isSet(type_PDcWyEn) && type_PDcWyEn.constructor !== Array)
|
||||
if (isSet(type_KVFJfFj) && type_KVFJfFj.constructor !== Array)
|
||||
{
|
||||
var temp_PDcWyEn = type_PDcWyEn;
|
||||
var type_PDcWyEn = [];
|
||||
type_PDcWyEn.push(temp_PDcWyEn);
|
||||
var temp_KVFJfFj = type_KVFJfFj;
|
||||
var type_KVFJfFj = [];
|
||||
type_KVFJfFj.push(temp_KVFJfFj);
|
||||
}
|
||||
else if (!isSet(type_PDcWyEn))
|
||||
else if (!isSet(type_KVFJfFj))
|
||||
{
|
||||
var type_PDcWyEn = [];
|
||||
var type_KVFJfFj = [];
|
||||
}
|
||||
var type = type_PDcWyEn.some(type_PDcWyEn_SomeFunc);
|
||||
var type = type_KVFJfFj.some(type_KVFJfFj_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_PDcWyEnUDa_required)
|
||||
if (jform_KVFJfFjKLp_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_PDcWyEnUDa_required = false;
|
||||
jform_KVFJfFjKLp_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_PDcWyEnUDa_required)
|
||||
if (!jform_KVFJfFjKLp_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_PDcWyEnUDa_required = true;
|
||||
jform_KVFJfFjKLp_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the PDcWyEn Some function
|
||||
function type_PDcWyEn_SomeFunc(type_PDcWyEn)
|
||||
// the KVFJfFj Some function
|
||||
function type_KVFJfFj_SomeFunc(type_KVFJfFj)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (type_PDcWyEn == 3)
|
||||
// [8225] set the function logic
|
||||
if (type_KVFJfFj == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the oNdbymx function
|
||||
function oNdbymx(type_oNdbymx)
|
||||
// the PVcvKoR function
|
||||
function PVcvKoR(type_PVcvKoR)
|
||||
{
|
||||
if (isSet(type_oNdbymx) && type_oNdbymx.constructor !== Array)
|
||||
if (isSet(type_PVcvKoR) && type_PVcvKoR.constructor !== Array)
|
||||
{
|
||||
var temp_oNdbymx = type_oNdbymx;
|
||||
var type_oNdbymx = [];
|
||||
type_oNdbymx.push(temp_oNdbymx);
|
||||
var temp_PVcvKoR = type_PVcvKoR;
|
||||
var type_PVcvKoR = [];
|
||||
type_PVcvKoR.push(temp_PVcvKoR);
|
||||
}
|
||||
else if (!isSet(type_oNdbymx))
|
||||
else if (!isSet(type_PVcvKoR))
|
||||
{
|
||||
var type_oNdbymx = [];
|
||||
var type_PVcvKoR = [];
|
||||
}
|
||||
var type = type_oNdbymx.some(type_oNdbymx_SomeFunc);
|
||||
var type = type_PVcvKoR.some(type_PVcvKoR_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
if (jform_oNdbymxKWg_required)
|
||||
if (jform_PVcvKoRLlz_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_oNdbymxKWg_required = false;
|
||||
jform_PVcvKoRLlz_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
if (!jform_oNdbymxKWg_required)
|
||||
if (!jform_PVcvKoRLlz_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_oNdbymxKWg_required = true;
|
||||
jform_PVcvKoRLlz_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the oNdbymx Some function
|
||||
function type_oNdbymx_SomeFunc(type_oNdbymx)
|
||||
// the PVcvKoR Some function
|
||||
function type_PVcvKoR_SomeFunc(type_PVcvKoR)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (type_oNdbymx == 1)
|
||||
// [8225] set the function logic
|
||||
if (type_PVcvKoR == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the QQNYqXl function
|
||||
function QQNYqXl(type_QQNYqXl)
|
||||
// the Raenogl function
|
||||
function Raenogl(type_Raenogl)
|
||||
{
|
||||
if (isSet(type_QQNYqXl) && type_QQNYqXl.constructor !== Array)
|
||||
if (isSet(type_Raenogl) && type_Raenogl.constructor !== Array)
|
||||
{
|
||||
var temp_QQNYqXl = type_QQNYqXl;
|
||||
var type_QQNYqXl = [];
|
||||
type_QQNYqXl.push(temp_QQNYqXl);
|
||||
var temp_Raenogl = type_Raenogl;
|
||||
var type_Raenogl = [];
|
||||
type_Raenogl.push(temp_Raenogl);
|
||||
}
|
||||
else if (!isSet(type_QQNYqXl))
|
||||
else if (!isSet(type_Raenogl))
|
||||
{
|
||||
var type_QQNYqXl = [];
|
||||
var type_Raenogl = [];
|
||||
}
|
||||
var type = type_QQNYqXl.some(type_QQNYqXl_SomeFunc);
|
||||
var type = type_Raenogl.some(type_Raenogl_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
if (jform_QQNYqXlxnF_required)
|
||||
if (jform_RaenoglczP_required)
|
||||
{
|
||||
updateFieldRequired('content',0);
|
||||
jQuery('#jform_content').prop('required','required');
|
||||
jQuery('#jform_content').attr('aria-required',true);
|
||||
jQuery('#jform_content').addClass('required');
|
||||
jform_QQNYqXlxnF_required = false;
|
||||
jform_RaenoglczP_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').hide();
|
||||
if (!jform_QQNYqXlxnF_required)
|
||||
if (!jform_RaenoglczP_required)
|
||||
{
|
||||
updateFieldRequired('content',1);
|
||||
jQuery('#jform_content').removeAttr('required');
|
||||
jQuery('#jform_content').removeAttr('aria-required');
|
||||
jQuery('#jform_content').removeClass('required');
|
||||
jform_QQNYqXlxnF_required = true;
|
||||
jform_RaenoglczP_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the QQNYqXl Some function
|
||||
function type_QQNYqXl_SomeFunc(type_QQNYqXl)
|
||||
// the Raenogl Some function
|
||||
function type_Raenogl_SomeFunc(type_Raenogl)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (type_QQNYqXl == 2)
|
||||
// [8225] set the function logic
|
||||
if (type_Raenogl == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the xgjGfFe function
|
||||
function xgjGfFe(target_xgjGfFe)
|
||||
// the roNdXRB function
|
||||
function roNdXRB(target_roNdXRB)
|
||||
{
|
||||
// [8248] set the function logic
|
||||
if (target_xgjGfFe == 1)
|
||||
// [8260] set the function logic
|
||||
if (target_roNdXRB == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
if (jform_xgjGfFertA_required)
|
||||
if (jform_roNdXRBgDs_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_xgjGfFertA_required = false;
|
||||
jform_roNdXRBgDs_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
if (!jform_xgjGfFertA_required)
|
||||
if (!jform_roNdXRBgDs_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_xgjGfFertA_required = true;
|
||||
jform_roNdXRBgDs_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,15 @@
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- [11263] Default Fields. -->
|
||||
<!-- [11264] Id Field. Type: Text (joomla) -->
|
||||
<!-- [11275] Default Fields. -->
|
||||
<!-- [11276] 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"
|
||||
/>
|
||||
<!-- [11271] Date Created Field. Type: Calendar (joomla) -->
|
||||
<!-- [11283] 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"
|
||||
/>
|
||||
<!-- [11282] User Created Field. Type: User (joomla) -->
|
||||
<!-- [11294] 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"
|
||||
/>
|
||||
<!-- [11290] Published Field. Type: List (joomla) -->
|
||||
<!-- [11302] 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>
|
||||
<!-- [11305] Date Modified Field. Type: Calendar (joomla) -->
|
||||
<!-- [11317] 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" />
|
||||
<!-- [11309] User Modified Field. Type: User (joomla) -->
|
||||
<!-- [11321] User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11319] Access Field. Type: Accesslevel (joomla) -->
|
||||
<!-- [11331] Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
@ -61,7 +61,7 @@
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11329] Ordering Field. Type: Numbers (joomla) -->
|
||||
<!-- [11341] Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
@ -72,7 +72,7 @@
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11341] Version Field. Type: Text (joomla) -->
|
||||
<!-- [11353] Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
@ -83,7 +83,7 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11355] Metakey Field. Type: Textarea (joomla) -->
|
||||
<!-- [11367] Metakey Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metakey"
|
||||
type="textarea"
|
||||
@ -92,7 +92,7 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11364] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<!-- [11376] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metadesc"
|
||||
type="textarea"
|
||||
@ -101,8 +101,8 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11374] Dynamic Fields. -->
|
||||
<!-- [11610] Title Field. Type: Text. (joomla) -->
|
||||
<!-- [11386] Dynamic Fields. -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11524] Type Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="type"
|
||||
@ -127,7 +127,7 @@
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="true">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] 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>
|
||||
<!-- [11610] Groups Field. Type: Usergroup. (joomla) -->
|
||||
<!-- [11622] Groups Field. Type: Usergroup. (joomla) -->
|
||||
<field
|
||||
type="usergroup"
|
||||
name="groups"
|
||||
@ -146,7 +146,7 @@
|
||||
required="true"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- [11524] Location Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] Option Set. -->
|
||||
<option value="1">
|
||||
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN</option>
|
||||
<option value="2">
|
||||
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
|
||||
</field>
|
||||
<!-- [11610] Admin_view Field. Type: Folderlist. (joomla) -->
|
||||
<!-- [11622] Admin_view Field. Type: Folderlist. (joomla) -->
|
||||
<field
|
||||
type="folderlist"
|
||||
name="admin_view"
|
||||
@ -170,7 +170,7 @@
|
||||
hide_none="true"
|
||||
hide_default="true"
|
||||
/>
|
||||
<!-- [11610] Site_view Field. Type: Folderlist. (joomla) -->
|
||||
<!-- [11622] Site_view Field. Type: Folderlist. (joomla) -->
|
||||
<field
|
||||
type="folderlist"
|
||||
name="site_view"
|
||||
@ -180,7 +180,7 @@
|
||||
hide_none="true"
|
||||
hide_default="true"
|
||||
/>
|
||||
<!-- [11524] Target Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] Option Set. -->
|
||||
<option value="1">
|
||||
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME</option>
|
||||
<option value="2">
|
||||
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALL</option>
|
||||
</field>
|
||||
<!-- [11610] Content Field. Type: Editor. (joomla) -->
|
||||
<!-- [11622] Content Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="content"
|
||||
@ -205,7 +205,7 @@
|
||||
filter="safehtml"
|
||||
required="true"
|
||||
/>
|
||||
<!-- [11610] Alias Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Alias Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="alias"
|
||||
@ -214,7 +214,7 @@
|
||||
filter="STRING"
|
||||
hint="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT"
|
||||
/>
|
||||
<!-- [11731] Article Field. Type: Articles. (custom) -->
|
||||
<!-- [11743] Article Field. Type: Articles. (custom) -->
|
||||
<field
|
||||
type="articles"
|
||||
name="article"
|
||||
@ -224,7 +224,7 @@
|
||||
default="0"
|
||||
required="true"
|
||||
/>
|
||||
<!-- [11610] Url Field. Type: Url. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Not_required Field. Type: Hidden. (joomla) -->
|
||||
<!-- [11622] Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
@ -247,11 +247,11 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- [11393] Metadata Fields. -->
|
||||
<!-- [11405] Metadata Fields. -->
|
||||
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<fieldset name="vdmmetadata"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<!-- [11397] Robots Field. Type: List (joomla) -->
|
||||
<!-- [11409] 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>
|
||||
<!-- [11408] Author Field. Type: Text (joomla) -->
|
||||
<!-- [11420] Author Field. Type: Text (joomla) -->
|
||||
<field name="author"
|
||||
type="text"
|
||||
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
|
||||
size="20"
|
||||
/>
|
||||
<!-- [11414] Rights Field. Type: Textarea (joomla) -->
|
||||
<!-- [11426] 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>
|
||||
|
||||
<!-- [10296] Access Control Fields. -->
|
||||
<!-- [10308] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [10298] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [10310] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [10304] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [10316] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -4,15 +4,15 @@
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- [11263] Default Fields. -->
|
||||
<!-- [11264] Id Field. Type: Text (joomla) -->
|
||||
<!-- [11275] Default Fields. -->
|
||||
<!-- [11276] 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"
|
||||
/>
|
||||
<!-- [11271] Date Created Field. Type: Calendar (joomla) -->
|
||||
<!-- [11283] 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"
|
||||
/>
|
||||
<!-- [11282] User Created Field. Type: User (joomla) -->
|
||||
<!-- [11294] 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"
|
||||
/>
|
||||
<!-- [11290] Published Field. Type: List (joomla) -->
|
||||
<!-- [11302] 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>
|
||||
<!-- [11305] Date Modified Field. Type: Calendar (joomla) -->
|
||||
<!-- [11317] 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" />
|
||||
<!-- [11309] User Modified Field. Type: User (joomla) -->
|
||||
<!-- [11321] User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11319] Access Field. Type: Accesslevel (joomla) -->
|
||||
<!-- [11331] Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
@ -61,7 +61,7 @@
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11329] Ordering Field. Type: Numbers (joomla) -->
|
||||
<!-- [11341] Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
@ -72,7 +72,7 @@
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11341] Version Field. Type: Text (joomla) -->
|
||||
<!-- [11353] Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
@ -83,7 +83,7 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11355] Metakey Field. Type: Textarea (joomla) -->
|
||||
<!-- [11367] Metakey Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metakey"
|
||||
type="textarea"
|
||||
@ -92,7 +92,7 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11364] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<!-- [11376] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metadesc"
|
||||
type="textarea"
|
||||
@ -101,8 +101,8 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11374] Dynamic Fields. -->
|
||||
<!-- [11610] Name Field. Type: Text. (joomla) -->
|
||||
<!-- [11386] Dynamic Fields. -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Description Field. Type: Editor. (joomla) -->
|
||||
<!-- [11622] Description Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="description"
|
||||
@ -130,7 +130,7 @@
|
||||
buttons="false"
|
||||
filter="safehtml"
|
||||
/>
|
||||
<!-- [11610] Alias Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Alias Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="alias"
|
||||
@ -139,7 +139,7 @@
|
||||
filter="STRING"
|
||||
hint="COM_SERMONDISTRIBUTOR_PREACHER_ALIAS_HINT"
|
||||
/>
|
||||
<!-- [11610] Email Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Website Field. Type: Url. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Icon Field. Type: Media. (joomla) -->
|
||||
<!-- [11622] Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon"
|
||||
@ -178,11 +178,11 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- [11393] Metadata Fields. -->
|
||||
<!-- [11405] Metadata Fields. -->
|
||||
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<fieldset name="vdmmetadata"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<!-- [11397] Robots Field. Type: List (joomla) -->
|
||||
<!-- [11409] 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>
|
||||
<!-- [11408] Author Field. Type: Text (joomla) -->
|
||||
<!-- [11420] Author Field. Type: Text (joomla) -->
|
||||
<field name="author"
|
||||
type="text"
|
||||
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
|
||||
size="20"
|
||||
/>
|
||||
<!-- [11414] Rights Field. Type: Textarea (joomla) -->
|
||||
<!-- [11426] 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>
|
||||
|
||||
<!-- [10296] Access Control Fields. -->
|
||||
<!-- [10308] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [10298] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [10310] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [10304] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [10316] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -4,15 +4,15 @@
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- [11263] Default Fields. -->
|
||||
<!-- [11264] Id Field. Type: Text (joomla) -->
|
||||
<!-- [11275] Default Fields. -->
|
||||
<!-- [11276] 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"
|
||||
/>
|
||||
<!-- [11271] Date Created Field. Type: Calendar (joomla) -->
|
||||
<!-- [11283] 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"
|
||||
/>
|
||||
<!-- [11282] User Created Field. Type: User (joomla) -->
|
||||
<!-- [11294] 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"
|
||||
/>
|
||||
<!-- [11290] Published Field. Type: List (joomla) -->
|
||||
<!-- [11302] 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>
|
||||
<!-- [11305] Date Modified Field. Type: Calendar (joomla) -->
|
||||
<!-- [11317] 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" />
|
||||
<!-- [11309] User Modified Field. Type: User (joomla) -->
|
||||
<!-- [11321] User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11319] Access Field. Type: Accesslevel (joomla) -->
|
||||
<!-- [11331] Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
@ -61,7 +61,7 @@
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11329] Ordering Field. Type: Numbers (joomla) -->
|
||||
<!-- [11341] Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
@ -72,7 +72,7 @@
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11341] Version Field. Type: Text (joomla) -->
|
||||
<!-- [11353] Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
@ -83,7 +83,7 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11355] Metakey Field. Type: Textarea (joomla) -->
|
||||
<!-- [11367] Metakey Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metakey"
|
||||
type="textarea"
|
||||
@ -92,7 +92,7 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11364] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<!-- [11376] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metadesc"
|
||||
type="textarea"
|
||||
@ -101,8 +101,8 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11374] Dynamic Fields. -->
|
||||
<!-- [11610] Name Field. Type: Text. (joomla) -->
|
||||
<!-- [11386] Dynamic Fields. -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Description Field. Type: Editor. (joomla) -->
|
||||
<!-- [11622] Description Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="description"
|
||||
@ -130,7 +130,7 @@
|
||||
buttons="false"
|
||||
filter="safehtml"
|
||||
/>
|
||||
<!-- [11610] Alias Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Alias Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="alias"
|
||||
@ -139,7 +139,7 @@
|
||||
filter="STRING"
|
||||
hint="COM_SERMONDISTRIBUTOR_SERIES_ALIAS_HINT"
|
||||
/>
|
||||
<!-- [11610] Icon Field. Type: Media. (joomla) -->
|
||||
<!-- [11622] Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon"
|
||||
@ -147,7 +147,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_SERIES_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- [11610] Scripture Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Scripture Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="scripture"
|
||||
@ -165,11 +165,11 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- [11393] Metadata Fields. -->
|
||||
<!-- [11405] Metadata Fields. -->
|
||||
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<fieldset name="vdmmetadata"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<!-- [11397] Robots Field. Type: List (joomla) -->
|
||||
<!-- [11409] 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>
|
||||
<!-- [11408] Author Field. Type: Text (joomla) -->
|
||||
<!-- [11420] Author Field. Type: Text (joomla) -->
|
||||
<field name="author"
|
||||
type="text"
|
||||
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
|
||||
size="20"
|
||||
/>
|
||||
<!-- [11414] Rights Field. Type: Textarea (joomla) -->
|
||||
<!-- [11426] 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>
|
||||
|
||||
<!-- [10296] Access Control Fields. -->
|
||||
<!-- [10308] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [10298] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [10310] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [10304] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [10316] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -23,127 +23,127 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_pRjJkFbxsO_required = false;
|
||||
jform_UwNFZmFkhM_required = false;
|
||||
jform_XolZULNBiI_required = false;
|
||||
jform_BxTsmCrfEH_required = false;
|
||||
jform_DrXlXWEDhG_required = false;
|
||||
jform_iZRZzQyybj_required = false;
|
||||
jform_EnSYbTjjQc_required = false;
|
||||
jform_jqQIKTSzxn_required = false;
|
||||
jform_lAIfOHIxFe_required = false;
|
||||
jform_UkrHisGoCy_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var source_pRjJkFb = jQuery("#jform_source").val();
|
||||
pRjJkFb(source_pRjJkFb);
|
||||
var source_iZRZzQy = jQuery("#jform_source").val();
|
||||
iZRZzQy(source_iZRZzQy);
|
||||
|
||||
var source_NvRTrqR = jQuery("#jform_source").val();
|
||||
var build_NvRTrqR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
NvRTrqR(source_NvRTrqR,build_NvRTrqR);
|
||||
var source_WwtGkmR = jQuery("#jform_source").val();
|
||||
var build_WwtGkmR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
WwtGkmR(source_WwtGkmR,build_WwtGkmR);
|
||||
|
||||
var source_UwNFZmF = jQuery("#jform_source").val();
|
||||
var build_UwNFZmF = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
UwNFZmF(source_UwNFZmF,build_UwNFZmF);
|
||||
var source_EnSYbTj = jQuery("#jform_source").val();
|
||||
var build_EnSYbTj = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
EnSYbTj(source_EnSYbTj,build_EnSYbTj);
|
||||
|
||||
var build_XolZULN = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_XolZULN = jQuery("#jform_source").val();
|
||||
XolZULN(build_XolZULN,source_XolZULN);
|
||||
var build_jqQIKTS = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_jqQIKTS = jQuery("#jform_source").val();
|
||||
jqQIKTS(build_jqQIKTS,source_jqQIKTS);
|
||||
|
||||
var source_BxTsmCr = jQuery("#jform_source").val();
|
||||
BxTsmCr(source_BxTsmCr);
|
||||
var source_lAIfOHI = jQuery("#jform_source").val();
|
||||
lAIfOHI(source_lAIfOHI);
|
||||
|
||||
var source_DrXlXWE = jQuery("#jform_source").val();
|
||||
DrXlXWE(source_DrXlXWE);
|
||||
var source_UkrHisG = jQuery("#jform_source").val();
|
||||
UkrHisG(source_UkrHisG);
|
||||
|
||||
var link_type_jgbBgTf = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
jgbBgTf(link_type_jgbBgTf);
|
||||
var link_type_xJKoumd = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
xJKoumd(link_type_xJKoumd);
|
||||
|
||||
var link_type_TvlDXQo = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
TvlDXQo(link_type_TvlDXQo);
|
||||
var link_type_oUuxich = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
oUuxich(link_type_oUuxich);
|
||||
});
|
||||
|
||||
// the pRjJkFb function
|
||||
function pRjJkFb(source_pRjJkFb)
|
||||
// the iZRZzQy function
|
||||
function iZRZzQy(source_iZRZzQy)
|
||||
{
|
||||
if (isSet(source_pRjJkFb) && source_pRjJkFb.constructor !== Array)
|
||||
if (isSet(source_iZRZzQy) && source_iZRZzQy.constructor !== Array)
|
||||
{
|
||||
var temp_pRjJkFb = source_pRjJkFb;
|
||||
var source_pRjJkFb = [];
|
||||
source_pRjJkFb.push(temp_pRjJkFb);
|
||||
var temp_iZRZzQy = source_iZRZzQy;
|
||||
var source_iZRZzQy = [];
|
||||
source_iZRZzQy.push(temp_iZRZzQy);
|
||||
}
|
||||
else if (!isSet(source_pRjJkFb))
|
||||
else if (!isSet(source_iZRZzQy))
|
||||
{
|
||||
var source_pRjJkFb = [];
|
||||
var source_iZRZzQy = [];
|
||||
}
|
||||
var source = source_pRjJkFb.some(source_pRjJkFb_SomeFunc);
|
||||
var source = source_iZRZzQy.some(source_iZRZzQy_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_build').closest('.control-group').show();
|
||||
if (jform_pRjJkFbxsO_required)
|
||||
if (jform_iZRZzQyybj_required)
|
||||
{
|
||||
updateFieldRequired('build',0);
|
||||
jQuery('#jform_build').prop('required','required');
|
||||
jQuery('#jform_build').attr('aria-required',true);
|
||||
jQuery('#jform_build').addClass('required');
|
||||
jform_pRjJkFbxsO_required = false;
|
||||
jform_iZRZzQyybj_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_build').closest('.control-group').hide();
|
||||
if (!jform_pRjJkFbxsO_required)
|
||||
if (!jform_iZRZzQyybj_required)
|
||||
{
|
||||
updateFieldRequired('build',1);
|
||||
jQuery('#jform_build').removeAttr('required');
|
||||
jQuery('#jform_build').removeAttr('aria-required');
|
||||
jQuery('#jform_build').removeClass('required');
|
||||
jform_pRjJkFbxsO_required = true;
|
||||
jform_iZRZzQyybj_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the pRjJkFb Some function
|
||||
function source_pRjJkFb_SomeFunc(source_pRjJkFb)
|
||||
// the iZRZzQy Some function
|
||||
function source_iZRZzQy_SomeFunc(source_iZRZzQy)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_pRjJkFb == 2)
|
||||
// [8225] set the function logic
|
||||
if (source_iZRZzQy == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the NvRTrqR function
|
||||
function NvRTrqR(source_NvRTrqR,build_NvRTrqR)
|
||||
// the WwtGkmR function
|
||||
function WwtGkmR(source_WwtGkmR,build_WwtGkmR)
|
||||
{
|
||||
if (isSet(source_NvRTrqR) && source_NvRTrqR.constructor !== Array)
|
||||
if (isSet(source_WwtGkmR) && source_WwtGkmR.constructor !== Array)
|
||||
{
|
||||
var temp_NvRTrqR = source_NvRTrqR;
|
||||
var source_NvRTrqR = [];
|
||||
source_NvRTrqR.push(temp_NvRTrqR);
|
||||
var temp_WwtGkmR = source_WwtGkmR;
|
||||
var source_WwtGkmR = [];
|
||||
source_WwtGkmR.push(temp_WwtGkmR);
|
||||
}
|
||||
else if (!isSet(source_NvRTrqR))
|
||||
else if (!isSet(source_WwtGkmR))
|
||||
{
|
||||
var source_NvRTrqR = [];
|
||||
var source_WwtGkmR = [];
|
||||
}
|
||||
var source = source_NvRTrqR.some(source_NvRTrqR_SomeFunc);
|
||||
var source = source_WwtGkmR.some(source_WwtGkmR_SomeFunc);
|
||||
|
||||
if (isSet(build_NvRTrqR) && build_NvRTrqR.constructor !== Array)
|
||||
if (isSet(build_WwtGkmR) && build_WwtGkmR.constructor !== Array)
|
||||
{
|
||||
var temp_NvRTrqR = build_NvRTrqR;
|
||||
var build_NvRTrqR = [];
|
||||
build_NvRTrqR.push(temp_NvRTrqR);
|
||||
var temp_WwtGkmR = build_WwtGkmR;
|
||||
var build_WwtGkmR = [];
|
||||
build_WwtGkmR.push(temp_WwtGkmR);
|
||||
}
|
||||
else if (!isSet(build_NvRTrqR))
|
||||
else if (!isSet(build_WwtGkmR))
|
||||
{
|
||||
var build_NvRTrqR = [];
|
||||
var build_WwtGkmR = [];
|
||||
}
|
||||
var build = build_NvRTrqR.some(build_NvRTrqR_SomeFunc);
|
||||
var build = build_WwtGkmR.some(build_WwtGkmR_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (source && build)
|
||||
{
|
||||
jQuery('.note_auto_dropbox').closest('.control-group').show();
|
||||
@ -154,67 +154,67 @@ function NvRTrqR(source_NvRTrqR,build_NvRTrqR)
|
||||
}
|
||||
}
|
||||
|
||||
// the NvRTrqR Some function
|
||||
function source_NvRTrqR_SomeFunc(source_NvRTrqR)
|
||||
// the WwtGkmR Some function
|
||||
function source_WwtGkmR_SomeFunc(source_WwtGkmR)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_NvRTrqR == 2)
|
||||
// [8225] set the function logic
|
||||
if (source_WwtGkmR == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the NvRTrqR Some function
|
||||
function build_NvRTrqR_SomeFunc(build_NvRTrqR)
|
||||
// the WwtGkmR Some function
|
||||
function build_WwtGkmR_SomeFunc(build_WwtGkmR)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (build_NvRTrqR == 2)
|
||||
// [8225] set the function logic
|
||||
if (build_WwtGkmR == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the UwNFZmF function
|
||||
function UwNFZmF(source_UwNFZmF,build_UwNFZmF)
|
||||
// the EnSYbTj function
|
||||
function EnSYbTj(source_EnSYbTj,build_EnSYbTj)
|
||||
{
|
||||
if (isSet(source_UwNFZmF) && source_UwNFZmF.constructor !== Array)
|
||||
if (isSet(source_EnSYbTj) && source_EnSYbTj.constructor !== Array)
|
||||
{
|
||||
var temp_UwNFZmF = source_UwNFZmF;
|
||||
var source_UwNFZmF = [];
|
||||
source_UwNFZmF.push(temp_UwNFZmF);
|
||||
var temp_EnSYbTj = source_EnSYbTj;
|
||||
var source_EnSYbTj = [];
|
||||
source_EnSYbTj.push(temp_EnSYbTj);
|
||||
}
|
||||
else if (!isSet(source_UwNFZmF))
|
||||
else if (!isSet(source_EnSYbTj))
|
||||
{
|
||||
var source_UwNFZmF = [];
|
||||
var source_EnSYbTj = [];
|
||||
}
|
||||
var source = source_UwNFZmF.some(source_UwNFZmF_SomeFunc);
|
||||
var source = source_EnSYbTj.some(source_EnSYbTj_SomeFunc);
|
||||
|
||||
if (isSet(build_UwNFZmF) && build_UwNFZmF.constructor !== Array)
|
||||
if (isSet(build_EnSYbTj) && build_EnSYbTj.constructor !== Array)
|
||||
{
|
||||
var temp_UwNFZmF = build_UwNFZmF;
|
||||
var build_UwNFZmF = [];
|
||||
build_UwNFZmF.push(temp_UwNFZmF);
|
||||
var temp_EnSYbTj = build_EnSYbTj;
|
||||
var build_EnSYbTj = [];
|
||||
build_EnSYbTj.push(temp_EnSYbTj);
|
||||
}
|
||||
else if (!isSet(build_UwNFZmF))
|
||||
else if (!isSet(build_EnSYbTj))
|
||||
{
|
||||
var build_UwNFZmF = [];
|
||||
var build_EnSYbTj = [];
|
||||
}
|
||||
var build = build_UwNFZmF.some(build_UwNFZmF_SomeFunc);
|
||||
var build = build_EnSYbTj.some(build_EnSYbTj_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (source && build)
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').show();
|
||||
if (jform_UwNFZmFkhM_required)
|
||||
if (jform_EnSYbTjjQc_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_UwNFZmFkhM_required = false;
|
||||
jform_EnSYbTjjQc_required = false;
|
||||
}
|
||||
|
||||
jQuery('.note_manual_dropbox').closest('.control-group').show();
|
||||
@ -222,79 +222,79 @@ function UwNFZmF(source_UwNFZmF,build_UwNFZmF)
|
||||
else
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').hide();
|
||||
if (!jform_UwNFZmFkhM_required)
|
||||
if (!jform_EnSYbTjjQc_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_UwNFZmFkhM_required = true;
|
||||
jform_EnSYbTjjQc_required = true;
|
||||
}
|
||||
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the UwNFZmF Some function
|
||||
function source_UwNFZmF_SomeFunc(source_UwNFZmF)
|
||||
// the EnSYbTj Some function
|
||||
function source_EnSYbTj_SomeFunc(source_EnSYbTj)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_UwNFZmF == 2)
|
||||
// [8225] set the function logic
|
||||
if (source_EnSYbTj == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the UwNFZmF Some function
|
||||
function build_UwNFZmF_SomeFunc(build_UwNFZmF)
|
||||
// the EnSYbTj Some function
|
||||
function build_EnSYbTj_SomeFunc(build_EnSYbTj)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (build_UwNFZmF == 1)
|
||||
// [8225] set the function logic
|
||||
if (build_EnSYbTj == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the XolZULN function
|
||||
function XolZULN(build_XolZULN,source_XolZULN)
|
||||
// the jqQIKTS function
|
||||
function jqQIKTS(build_jqQIKTS,source_jqQIKTS)
|
||||
{
|
||||
if (isSet(build_XolZULN) && build_XolZULN.constructor !== Array)
|
||||
if (isSet(build_jqQIKTS) && build_jqQIKTS.constructor !== Array)
|
||||
{
|
||||
var temp_XolZULN = build_XolZULN;
|
||||
var build_XolZULN = [];
|
||||
build_XolZULN.push(temp_XolZULN);
|
||||
var temp_jqQIKTS = build_jqQIKTS;
|
||||
var build_jqQIKTS = [];
|
||||
build_jqQIKTS.push(temp_jqQIKTS);
|
||||
}
|
||||
else if (!isSet(build_XolZULN))
|
||||
else if (!isSet(build_jqQIKTS))
|
||||
{
|
||||
var build_XolZULN = [];
|
||||
var build_jqQIKTS = [];
|
||||
}
|
||||
var build = build_XolZULN.some(build_XolZULN_SomeFunc);
|
||||
var build = build_jqQIKTS.some(build_jqQIKTS_SomeFunc);
|
||||
|
||||
if (isSet(source_XolZULN) && source_XolZULN.constructor !== Array)
|
||||
if (isSet(source_jqQIKTS) && source_jqQIKTS.constructor !== Array)
|
||||
{
|
||||
var temp_XolZULN = source_XolZULN;
|
||||
var source_XolZULN = [];
|
||||
source_XolZULN.push(temp_XolZULN);
|
||||
var temp_jqQIKTS = source_jqQIKTS;
|
||||
var source_jqQIKTS = [];
|
||||
source_jqQIKTS.push(temp_jqQIKTS);
|
||||
}
|
||||
else if (!isSet(source_XolZULN))
|
||||
else if (!isSet(source_jqQIKTS))
|
||||
{
|
||||
var source_XolZULN = [];
|
||||
var source_jqQIKTS = [];
|
||||
}
|
||||
var source = source_XolZULN.some(source_XolZULN_SomeFunc);
|
||||
var source = source_jqQIKTS.some(source_jqQIKTS_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (build && source)
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').show();
|
||||
if (jform_XolZULNBiI_required)
|
||||
if (jform_jqQIKTSzxn_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_XolZULNBiI_required = false;
|
||||
jform_jqQIKTSzxn_required = false;
|
||||
}
|
||||
|
||||
jQuery('.note_manual_dropbox').closest('.control-group').show();
|
||||
@ -302,155 +302,155 @@ function XolZULN(build_XolZULN,source_XolZULN)
|
||||
else
|
||||
{
|
||||
jQuery('#jform_manual_files').closest('.control-group').hide();
|
||||
if (!jform_XolZULNBiI_required)
|
||||
if (!jform_jqQIKTSzxn_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_XolZULNBiI_required = true;
|
||||
jform_jqQIKTSzxn_required = true;
|
||||
}
|
||||
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the XolZULN Some function
|
||||
function build_XolZULN_SomeFunc(build_XolZULN)
|
||||
// the jqQIKTS Some function
|
||||
function build_jqQIKTS_SomeFunc(build_jqQIKTS)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (build_XolZULN == 1)
|
||||
// [8225] set the function logic
|
||||
if (build_jqQIKTS == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the XolZULN Some function
|
||||
function source_XolZULN_SomeFunc(source_XolZULN)
|
||||
// the jqQIKTS Some function
|
||||
function source_jqQIKTS_SomeFunc(source_jqQIKTS)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_XolZULN == 2)
|
||||
// [8225] set the function logic
|
||||
if (source_jqQIKTS == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the BxTsmCr function
|
||||
function BxTsmCr(source_BxTsmCr)
|
||||
// the lAIfOHI function
|
||||
function lAIfOHI(source_lAIfOHI)
|
||||
{
|
||||
if (isSet(source_BxTsmCr) && source_BxTsmCr.constructor !== Array)
|
||||
if (isSet(source_lAIfOHI) && source_lAIfOHI.constructor !== Array)
|
||||
{
|
||||
var temp_BxTsmCr = source_BxTsmCr;
|
||||
var source_BxTsmCr = [];
|
||||
source_BxTsmCr.push(temp_BxTsmCr);
|
||||
var temp_lAIfOHI = source_lAIfOHI;
|
||||
var source_lAIfOHI = [];
|
||||
source_lAIfOHI.push(temp_lAIfOHI);
|
||||
}
|
||||
else if (!isSet(source_BxTsmCr))
|
||||
else if (!isSet(source_lAIfOHI))
|
||||
{
|
||||
var source_BxTsmCr = [];
|
||||
var source_lAIfOHI = [];
|
||||
}
|
||||
var source = source_BxTsmCr.some(source_BxTsmCr_SomeFunc);
|
||||
var source = source_lAIfOHI.some(source_lAIfOHI_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_local_files').closest('.control-group').show();
|
||||
if (jform_BxTsmCrfEH_required)
|
||||
if (jform_lAIfOHIxFe_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_BxTsmCrfEH_required = false;
|
||||
jform_lAIfOHIxFe_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_local_files').closest('.control-group').hide();
|
||||
if (!jform_BxTsmCrfEH_required)
|
||||
if (!jform_lAIfOHIxFe_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_BxTsmCrfEH_required = true;
|
||||
jform_lAIfOHIxFe_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the BxTsmCr Some function
|
||||
function source_BxTsmCr_SomeFunc(source_BxTsmCr)
|
||||
// the lAIfOHI Some function
|
||||
function source_lAIfOHI_SomeFunc(source_lAIfOHI)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_BxTsmCr == 1)
|
||||
// [8225] set the function logic
|
||||
if (source_lAIfOHI == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the DrXlXWE function
|
||||
function DrXlXWE(source_DrXlXWE)
|
||||
// the UkrHisG function
|
||||
function UkrHisG(source_UkrHisG)
|
||||
{
|
||||
if (isSet(source_DrXlXWE) && source_DrXlXWE.constructor !== Array)
|
||||
if (isSet(source_UkrHisG) && source_UkrHisG.constructor !== Array)
|
||||
{
|
||||
var temp_DrXlXWE = source_DrXlXWE;
|
||||
var source_DrXlXWE = [];
|
||||
source_DrXlXWE.push(temp_DrXlXWE);
|
||||
var temp_UkrHisG = source_UkrHisG;
|
||||
var source_UkrHisG = [];
|
||||
source_UkrHisG.push(temp_UkrHisG);
|
||||
}
|
||||
else if (!isSet(source_DrXlXWE))
|
||||
else if (!isSet(source_UkrHisG))
|
||||
{
|
||||
var source_DrXlXWE = [];
|
||||
var source_UkrHisG = [];
|
||||
}
|
||||
var source = source_DrXlXWE.some(source_DrXlXWE_SomeFunc);
|
||||
var source = source_UkrHisG.some(source_UkrHisG_SomeFunc);
|
||||
|
||||
|
||||
// [8226] set this function logic
|
||||
// [8238] set this function logic
|
||||
if (source)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_DrXlXWEDhG_required)
|
||||
if (jform_UkrHisGoCy_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_DrXlXWEDhG_required = false;
|
||||
jform_UkrHisGoCy_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_DrXlXWEDhG_required)
|
||||
if (!jform_UkrHisGoCy_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_DrXlXWEDhG_required = true;
|
||||
jform_UkrHisGoCy_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the DrXlXWE Some function
|
||||
function source_DrXlXWE_SomeFunc(source_DrXlXWE)
|
||||
// the UkrHisG Some function
|
||||
function source_UkrHisG_SomeFunc(source_UkrHisG)
|
||||
{
|
||||
// [8213] set the function logic
|
||||
if (source_DrXlXWE == 3)
|
||||
// [8225] set the function logic
|
||||
if (source_UkrHisG == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the jgbBgTf function
|
||||
function jgbBgTf(link_type_jgbBgTf)
|
||||
// the xJKoumd function
|
||||
function xJKoumd(link_type_xJKoumd)
|
||||
{
|
||||
// [8248] set the function logic
|
||||
if (link_type_jgbBgTf == 2)
|
||||
// [8260] set the function logic
|
||||
if (link_type_xJKoumd == 2)
|
||||
{
|
||||
jQuery('.note_link_directed').closest('.control-group').show();
|
||||
}
|
||||
@ -460,11 +460,11 @@ function jgbBgTf(link_type_jgbBgTf)
|
||||
}
|
||||
}
|
||||
|
||||
// the TvlDXQo function
|
||||
function TvlDXQo(link_type_TvlDXQo)
|
||||
// the oUuxich function
|
||||
function oUuxich(link_type_oUuxich)
|
||||
{
|
||||
// [8248] set the function logic
|
||||
if (link_type_TvlDXQo == 1)
|
||||
// [8260] set the function logic
|
||||
if (link_type_oUuxich == 1)
|
||||
{
|
||||
jQuery('.note_link_encrypted').closest('.control-group').show();
|
||||
}
|
||||
|
@ -4,15 +4,15 @@
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- [11263] Default Fields. -->
|
||||
<!-- [11264] Id Field. Type: Text (joomla) -->
|
||||
<!-- [11275] Default Fields. -->
|
||||
<!-- [11276] 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"
|
||||
/>
|
||||
<!-- [11271] Date Created Field. Type: Calendar (joomla) -->
|
||||
<!-- [11283] 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"
|
||||
/>
|
||||
<!-- [11282] User Created Field. Type: User (joomla) -->
|
||||
<!-- [11294] 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"
|
||||
/>
|
||||
<!-- [11290] Published Field. Type: List (joomla) -->
|
||||
<!-- [11302] 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>
|
||||
<!-- [11305] Date Modified Field. Type: Calendar (joomla) -->
|
||||
<!-- [11317] 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" />
|
||||
<!-- [11309] User Modified Field. Type: User (joomla) -->
|
||||
<!-- [11321] User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11319] Access Field. Type: Accesslevel (joomla) -->
|
||||
<!-- [11331] Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
@ -61,7 +61,7 @@
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11329] Ordering Field. Type: Numbers (joomla) -->
|
||||
<!-- [11341] Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
@ -72,7 +72,7 @@
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11341] Version Field. Type: Text (joomla) -->
|
||||
<!-- [11353] Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
@ -83,7 +83,7 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11355] Metakey Field. Type: Textarea (joomla) -->
|
||||
<!-- [11367] Metakey Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metakey"
|
||||
type="textarea"
|
||||
@ -92,7 +92,7 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11364] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<!-- [11376] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metadesc"
|
||||
type="textarea"
|
||||
@ -101,8 +101,8 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11374] Dynamic Fields. -->
|
||||
<!-- [11610] Name Field. Type: Text. (joomla) -->
|
||||
<!-- [11386] Dynamic Fields. -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11731] Preacher Field. Type: Preachers. (custom) -->
|
||||
<!-- [11743] Preacher Field. Type: Preachers. (custom) -->
|
||||
<field
|
||||
type="preachers"
|
||||
name="preacher"
|
||||
@ -129,7 +129,7 @@
|
||||
default="0"
|
||||
button="true"
|
||||
/>
|
||||
<!-- [11731] Series Field. Type: Series. (custom) -->
|
||||
<!-- [11743] Series Field. Type: Series. (custom) -->
|
||||
<field
|
||||
type="series"
|
||||
name="series"
|
||||
@ -140,7 +140,7 @@
|
||||
default="0"
|
||||
button="true"
|
||||
/>
|
||||
<!-- [11610] Short_description Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Catid Field. Type: Category. (joomla) -->
|
||||
<!-- [11622] Catid Field. Type: Category. (joomla) -->
|
||||
<field
|
||||
type="category"
|
||||
name="catid"
|
||||
@ -164,7 +164,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
<!-- [11524] Link_type Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] Option Set. -->
|
||||
<option value="1">
|
||||
COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED</option>
|
||||
<option value="2">
|
||||
COM_SERMONDISTRIBUTOR_SERMON_DIRECT</option>
|
||||
</field>
|
||||
<!-- [11524] Source Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Source Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="source"
|
||||
@ -189,7 +189,7 @@
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] 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>
|
||||
<!-- [11610] Icon Field. Type: Media. (joomla) -->
|
||||
<!-- [11622] Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon"
|
||||
@ -207,7 +207,7 @@
|
||||
description="COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- [11610] Tags Field. Type: Tag. (joomla) -->
|
||||
<!-- [11622] Tags Field. Type: Tag. (joomla) -->
|
||||
<field
|
||||
type="tag"
|
||||
name="tags"
|
||||
@ -218,7 +218,7 @@
|
||||
published="true"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- [11731] Local_files Field. Type: Localfiles. (custom) -->
|
||||
<!-- [11743] Local_files Field. Type: Localfiles. (custom) -->
|
||||
<field
|
||||
type="localfiles"
|
||||
name="local_files"
|
||||
@ -230,7 +230,7 @@
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
<!-- [11610] Description Field. Type: Editor. (joomla) -->
|
||||
<!-- [11622] Description Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="description"
|
||||
@ -242,9 +242,9 @@
|
||||
buttons="false"
|
||||
filter="safehtml"
|
||||
/>
|
||||
<!-- [11624] Note_auto_dropbox Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<!-- [11636] 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" />
|
||||
<!-- [11610] Alias Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Alias Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="alias"
|
||||
@ -253,19 +253,19 @@
|
||||
filter="STRING"
|
||||
hint="COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT"
|
||||
/>
|
||||
<!-- [11610] Not_required Field. Type: Hidden. (joomla) -->
|
||||
<!-- [11622] Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- [11624] Note_link_directed Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<!-- [11636] 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" />
|
||||
<!-- [11624] Note_manual_dropbox Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<!-- [11636] 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" />
|
||||
<!-- [11624] Note_link_encrypted Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<!-- [11636] 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" />
|
||||
<!-- [11731] Manual_files Field. Type: Dropboxfiles. (custom) -->
|
||||
<!-- [11743] Manual_files Field. Type: Dropboxfiles. (custom) -->
|
||||
<field
|
||||
type="dropboxfiles"
|
||||
name="manual_files"
|
||||
@ -277,7 +277,7 @@
|
||||
required="true"
|
||||
button="false"
|
||||
/>
|
||||
<!-- [11610] Scripture Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11610] Url Field. Type: Url. (joomla) -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11524] Build Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] Build Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="build"
|
||||
@ -317,13 +317,13 @@
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
required="true">
|
||||
<!-- [11596] Option Set. -->
|
||||
<!-- [11608] Option Set. -->
|
||||
<option value="1">
|
||||
COM_SERMONDISTRIBUTOR_SERMON_MANUAL</option>
|
||||
<option value="2">
|
||||
COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC</option>
|
||||
</field>
|
||||
<!-- [11610] Auto_sermons Field. Type: Hidden. (joomla) -->
|
||||
<!-- [11622] Auto_sermons Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="auto_sermons"
|
||||
@ -331,11 +331,11 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- [11393] Metadata Fields. -->
|
||||
<!-- [11405] Metadata Fields. -->
|
||||
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<fieldset name="vdmmetadata"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<!-- [11397] Robots Field. Type: List (joomla) -->
|
||||
<!-- [11409] 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>
|
||||
<!-- [11408] Author Field. Type: Text (joomla) -->
|
||||
<!-- [11420] Author Field. Type: Text (joomla) -->
|
||||
<field name="author"
|
||||
type="text"
|
||||
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
|
||||
size="20"
|
||||
/>
|
||||
<!-- [11414] Rights Field. Type: Textarea (joomla) -->
|
||||
<!-- [11426] 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>
|
||||
|
||||
<!-- [10296] Access Control Fields. -->
|
||||
<!-- [10308] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [10298] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [10310] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [10304] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [10316] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -4,15 +4,15 @@
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- [11263] Default Fields. -->
|
||||
<!-- [11264] Id Field. Type: Text (joomla) -->
|
||||
<!-- [11275] Default Fields. -->
|
||||
<!-- [11276] 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"
|
||||
/>
|
||||
<!-- [11271] Date Created Field. Type: Calendar (joomla) -->
|
||||
<!-- [11283] 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"
|
||||
/>
|
||||
<!-- [11282] User Created Field. Type: User (joomla) -->
|
||||
<!-- [11294] 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"
|
||||
/>
|
||||
<!-- [11290] Published Field. Type: List (joomla) -->
|
||||
<!-- [11302] 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>
|
||||
<!-- [11305] Date Modified Field. Type: Calendar (joomla) -->
|
||||
<!-- [11317] 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" />
|
||||
<!-- [11309] User Modified Field. Type: User (joomla) -->
|
||||
<!-- [11321] User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11319] Access Field. Type: Accesslevel (joomla) -->
|
||||
<!-- [11331] Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
@ -61,7 +61,7 @@
|
||||
default="1"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11329] Ordering Field. Type: Numbers (joomla) -->
|
||||
<!-- [11341] Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
@ -72,7 +72,7 @@
|
||||
size="6"
|
||||
required="false"
|
||||
/>
|
||||
<!-- [11341] Version Field. Type: Text (joomla) -->
|
||||
<!-- [11353] Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
@ -83,7 +83,7 @@
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [11355] Metakey Field. Type: Textarea (joomla) -->
|
||||
<!-- [11367] Metakey Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metakey"
|
||||
type="textarea"
|
||||
@ -92,7 +92,7 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11364] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<!-- [11376] Metadesc Field. Type: Textarea (joomla) -->
|
||||
<field
|
||||
name="metadesc"
|
||||
type="textarea"
|
||||
@ -101,8 +101,8 @@
|
||||
rows="3"
|
||||
cols="30"
|
||||
/>
|
||||
<!-- [11374] Dynamic Fields. -->
|
||||
<!-- [11610] Filename Field. Type: Text. (joomla) -->
|
||||
<!-- [11386] Dynamic Fields. -->
|
||||
<!-- [11622] 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"
|
||||
/>
|
||||
<!-- [11731] Sermon Field. Type: Sermon. (custom) -->
|
||||
<!-- [11743] Sermon Field. Type: Sermon. (custom) -->
|
||||
<field
|
||||
type="sermon"
|
||||
name="sermon"
|
||||
@ -127,7 +127,7 @@
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- [11731] Preacher Field. Type: Preachers. (custom) -->
|
||||
<!-- [11743] Preacher Field. Type: Preachers. (custom) -->
|
||||
<field
|
||||
type="preachers"
|
||||
name="preacher"
|
||||
@ -138,7 +138,7 @@
|
||||
default="0"
|
||||
button="true"
|
||||
/>
|
||||
<!-- [11731] Series Field. Type: Series. (custom) -->
|
||||
<!-- [11743] Series Field. Type: Series. (custom) -->
|
||||
<field
|
||||
type="series"
|
||||
name="series"
|
||||
@ -149,7 +149,7 @@
|
||||
default="0"
|
||||
button="true"
|
||||
/>
|
||||
<!-- [11610] Counter Field. Type: Text. (joomla) -->
|
||||
<!-- [11622] Counter Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="counter"
|
||||
@ -165,11 +165,11 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- [11393] Metadata Fields. -->
|
||||
<!-- [11405] Metadata Fields. -->
|
||||
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<fieldset name="vdmmetadata"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
|
||||
<!-- [11397] Robots Field. Type: List (joomla) -->
|
||||
<!-- [11409] 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>
|
||||
<!-- [11408] Author Field. Type: Text (joomla) -->
|
||||
<!-- [11420] Author Field. Type: Text (joomla) -->
|
||||
<field name="author"
|
||||
type="text"
|
||||
label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"
|
||||
size="20"
|
||||
/>
|
||||
<!-- [11414] Rights Field. Type: Textarea (joomla) -->
|
||||
<!-- [11426] 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>
|
||||
|
||||
<!-- [10296] Access Control Fields. -->
|
||||
<!-- [10308] Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- [10298] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<!-- [10310] Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- [10304] Rules Field. Type: Rules (joomla) -->
|
||||
<!-- [10316] Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
|
@ -97,7 +97,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
if (!empty($item->groups))
|
||||
{
|
||||
// [4211] JSON Decode groups.
|
||||
// [4223] JSON Decode groups.
|
||||
$item->groups = json_decode($item->groups,true);
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [9806] Get the form.
|
||||
{ // [9818] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -132,12 +132,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [9891] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [9903] 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');
|
||||
}
|
||||
// [9896] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [9908] 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');
|
||||
@ -145,34 +145,34 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9902] Check for existing item.
|
||||
// [9903] Modify the form based on Edit State access controls.
|
||||
// [9914] Check for existing item.
|
||||
// [9915] 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')))
|
||||
{
|
||||
// [9916] Disable fields for display.
|
||||
// [9928] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [9919] Disable fields while saving.
|
||||
// [9931] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [9924] Modify the form based on Edit Creaded By access controls.
|
||||
// [9936] Modify the form based on Edit Creaded By access controls.
|
||||
if (!$user->authorise('core.edit.created_by', 'com_sermondistributor'))
|
||||
{
|
||||
// [9936] Disable fields for display.
|
||||
// [9948] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [9938] Disable fields for display.
|
||||
// [9950] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [9940] Disable fields while saving.
|
||||
// [9952] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [9943] Modify the form based on Edit Creaded Date access controls.
|
||||
// [9955] Modify the form based on Edit Creaded Date access controls.
|
||||
if (!$user->authorise('core.edit.created', 'com_sermondistributor'))
|
||||
{
|
||||
// [9955] Disable fields for display.
|
||||
// [9967] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [9957] Disable fields while saving.
|
||||
// [9969] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [10107] The record has been set. Check the record permissions.
|
||||
// [10119] The record has been set. Check the record permissions.
|
||||
return $user->authorise('help_document.delete', 'com_sermondistributor.help_document.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -230,14 +230,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [10194] The record has been set. Check the record permissions.
|
||||
// [10206] 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;
|
||||
}
|
||||
}
|
||||
// [10211] In the absense of better information, revert to the component permissions.
|
||||
// [10223] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('help_document.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [10019] Check specific edit permission then general edit permission.
|
||||
// [10031] 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');
|
||||
@ -351,20 +351,20 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
*/
|
||||
public function validate($form, $data, $group = null)
|
||||
{
|
||||
// [9010] check if the not_required field is set
|
||||
// [9022] 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);
|
||||
// [9015] now change the required field attributes value
|
||||
// [9027] now change the required field attributes value
|
||||
foreach ($requiredFields as $requiredField)
|
||||
{
|
||||
// [9018] make sure there is a string value
|
||||
// [9030] make sure there is a string value
|
||||
if (SermondistributorHelper::checkString($requiredField))
|
||||
{
|
||||
// [9021] change to false
|
||||
// [9033] change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// [9023] also clear the data set
|
||||
// [9035] also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
}
|
||||
}
|
||||
@ -514,7 +514,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [5167] Set some needed variables.
|
||||
// [5179] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -528,12 +528,12 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5187] get list of uniqe fields
|
||||
// [5199] get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// [5189] remove move_copy from array
|
||||
// [5201] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5192] make sure published is set
|
||||
// [5204] make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
@ -545,21 +545,21 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// [5229] Parent exists so let's proceed
|
||||
// [5241] Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// [5232] Pop the first ID off the stack
|
||||
// [5244] Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// [5237] only allow copy if user may edit this item.
|
||||
// [5249] only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// [5247] Not fatal error
|
||||
// [5259] Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
@ -567,19 +567,19 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
}
|
||||
|
||||
// [5252] Check that the row actually exists
|
||||
// [5264] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5257] Fatal error
|
||||
// [5269] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5264] Not fatal error
|
||||
// [5276] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
@ -587,7 +587,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
|
||||
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
|
||||
|
||||
// [5300] insert all set values
|
||||
// [5312] insert all set values
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
@ -599,7 +599,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5312] update all uniqe fields
|
||||
// [5324] update all uniqe fields
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
@ -608,13 +608,13 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5321] Reset the ID because we are making a copy
|
||||
// [5333] Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// [5324] TODO: Deal with ordering?
|
||||
// [5325] $this->table->ordering = 1;
|
||||
// [5336] TODO: Deal with ordering?
|
||||
// [5337] $this->table->ordering = 1;
|
||||
|
||||
// [5327] Check the row.
|
||||
// [5339] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -627,7 +627,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5340] Store the row.
|
||||
// [5352] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -635,14 +635,14 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5348] Get the new item ID
|
||||
// [5360] Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// [5351] Add the new ID to the array
|
||||
// [5363] Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// [5355] Clean the cache
|
||||
// [5367] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
@ -663,7 +663,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [4969] Set some needed variables.
|
||||
// [4981] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -678,15 +678,15 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [4991] make sure published only updates if user has the permission.
|
||||
// [5003] make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('help_document.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// [5004] remove move_copy from array
|
||||
// [5016] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5025] Parent exists so we proceed
|
||||
// [5037] Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
|
||||
@ -696,30 +696,30 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5042] Check that the row actually exists
|
||||
// [5054] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5047] Fatal error
|
||||
// [5059] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5054] Not fatal error
|
||||
// [5066] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// [5060] insert all set values.
|
||||
// [5072] insert all set values.
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// [5065] Do special action for access.
|
||||
// [5077] Do special action for access.
|
||||
if ('access' == $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
@ -732,7 +732,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5077] Check the row.
|
||||
// [5089] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -745,7 +745,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5090] Store the row.
|
||||
// [5102] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -754,7 +754,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5099] Clean the cache
|
||||
// [5111] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
@ -784,7 +784,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
$data['metadata'] = (string) $metadata;
|
||||
}
|
||||
|
||||
// [4321] Set the groups string to JSON string.
|
||||
// [4333] Set the groups string to JSON string.
|
||||
if (isset($data['groups']))
|
||||
{
|
||||
$data['groups'] = (string) json_encode($data['groups']);
|
||||
@ -798,7 +798,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// [5381] Alter the title for save as copy
|
||||
// [5393] Alter the title for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
$origTable = clone $this->getTable();
|
||||
@ -821,7 +821,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
$data['published'] = 0;
|
||||
}
|
||||
|
||||
// [5408] Automatic handling of alias for empty fields
|
||||
// [5420] 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)
|
||||
@ -852,10 +852,10 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5447] Alter the uniqe field for save as copy
|
||||
// [5459] Alter the uniqe field for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
// [5450] Automatic handling of other uniqe fields
|
||||
// [5462] Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
@ -909,7 +909,7 @@ class SermondistributorModelHelp_document extends JModelAdmin
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
{
|
||||
|
||||
// [5481] Alter the title & alias
|
||||
// [5493] Alter the title & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
|
@ -113,16 +113,16 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [10780] check in items
|
||||
// [10792] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -133,7 +133,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [10926] decode groups
|
||||
// [10938] decode groups
|
||||
$groupsArray = json_decode($item->groups, true);
|
||||
if (SermondistributorHelper::checkArray($groupsArray))
|
||||
{
|
||||
@ -156,14 +156,14 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [11121] set selection value to a translatable value
|
||||
// [11133] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [11128] convert type
|
||||
// [11140] convert type
|
||||
$item->type = $this->selectionTranslation($item->type, 'type');
|
||||
// [11128] convert location
|
||||
// [11140] convert location
|
||||
$item->location = $this->selectionTranslation($item->location, 'location');
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// [11154] Array of type language strings
|
||||
// [11166] Array of type language strings
|
||||
if ($name == 'type')
|
||||
{
|
||||
$typeArray = array(
|
||||
@ -189,20 +189,20 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TEXT',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_URL'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($typeArray[$value]) && SermondistributorHelper::checkString($typeArray[$value]))
|
||||
{
|
||||
return $typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [11154] Array of location language strings
|
||||
// [11166] Array of location language strings
|
||||
if ($name == 'location')
|
||||
{
|
||||
$locationArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($locationArray[$value]) && SermondistributorHelper::checkString($locationArray[$value]))
|
||||
{
|
||||
return $locationArray[$value];
|
||||
@ -218,19 +218,19 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// [7637] Get the user object.
|
||||
// [7649] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7639] Create a new query object.
|
||||
// [7651] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7642] Select some fields
|
||||
// [7654] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7649] From the sermondistributor_item table
|
||||
// [7661] From the sermondistributor_item table
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
|
||||
|
||||
// [7663] Filter by published state
|
||||
// [7675] Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
@ -241,21 +241,21 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// [7675] Join over the asset groups.
|
||||
// [7687] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7678] Filter by access level.
|
||||
// [7690] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7683] Implement View Level Access
|
||||
// [7695] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
// [7760] Filter by search.
|
||||
// [7772] Filter by search.
|
||||
$search = $this->getState('filter.search');
|
||||
if (!empty($search))
|
||||
{
|
||||
@ -270,28 +270,28 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [8003] Filter by Type.
|
||||
// [8015] Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
|
||||
}
|
||||
// [8003] Filter by Location.
|
||||
// [8015] Filter by Location.
|
||||
if ($location = $this->getState('filter.location'))
|
||||
{
|
||||
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
|
||||
}
|
||||
// [8003] Filter by Admin_view.
|
||||
// [8015] Filter by Admin_view.
|
||||
if ($admin_view = $this->getState('filter.admin_view'))
|
||||
{
|
||||
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
|
||||
}
|
||||
// [8003] Filter by Site_view.
|
||||
// [8015] Filter by Site_view.
|
||||
if ($site_view = $this->getState('filter.site_view'))
|
||||
{
|
||||
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
|
||||
}
|
||||
|
||||
// [7719] Add the list ordering clause.
|
||||
// [7731] Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
@ -309,42 +309,42 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// [7427] setup the query
|
||||
// [7439] setup the query
|
||||
if (SermondistributorHelper::checkArray($pks))
|
||||
{
|
||||
// [7430] Get the user object.
|
||||
// [7442] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7432] Create a new query object.
|
||||
// [7444] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7435] Select some fields
|
||||
// [7447] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7437] From the sermondistributor_help_document table
|
||||
// [7449] From the sermondistributor_help_document table
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// [7447] Implement View Level Access
|
||||
// [7459] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7454] Order the results by ordering
|
||||
// [7466] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7456] Load the items
|
||||
// [7468] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -355,13 +355,13 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [11068] unset the values we don't want exported.
|
||||
// [11080] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [11077] Add headers to items array.
|
||||
// [11089] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -380,13 +380,13 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
public function getExImPortHeaders()
|
||||
{
|
||||
// [7476] Get a db connection.
|
||||
// [7488] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [7478] get the columns
|
||||
// [7490] get the columns
|
||||
$columns = $db->getTableColumns("#__sermondistributor_help_document");
|
||||
if (SermondistributorHelper::checkArray($columns))
|
||||
{
|
||||
// [7482] remove the headers you don't import/export.
|
||||
// [7494] remove the headers you don't import/export.
|
||||
unset($columns['asset_id']);
|
||||
unset($columns['checked_out']);
|
||||
unset($columns['checked_out_time']);
|
||||
@ -408,7 +408,7 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [10403] Compile the store id.
|
||||
// [10415] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -432,15 +432,15 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [10796] Get set check in time
|
||||
// [10808] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [10801] Get a db connection.
|
||||
// [10813] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [10803] reset query
|
||||
// [10815] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
@ -448,24 +448,24 @@ class SermondistributorModelHelp_documents extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [10811] Get Yesterdays date
|
||||
// [10823] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [10813] reset query
|
||||
// [10825] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [10815] Fields to update.
|
||||
// [10827] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [10820] Conditions for which records should be updated.
|
||||
// [10832] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [10825] Check table
|
||||
// [10837] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -101,7 +101,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_sermondistributor.preacher');
|
||||
}
|
||||
}
|
||||
$this->preachermfux = $item->id;
|
||||
$this->preacherrmkt = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -111,74 +111,74 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getJfzsermons()
|
||||
public function getPblsermons()
|
||||
{
|
||||
// [7185] Get the user object.
|
||||
// [7197] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7187] Create a new query object.
|
||||
// [7199] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7190] Select some fields
|
||||
// [7202] Select some fields
|
||||
$query->select('a.*');
|
||||
$query->select($db->quoteName('c.title','category_title'));
|
||||
|
||||
// [7197] From the sermondistributor_sermon table
|
||||
// [7209] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_preacher table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_series table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7213] Filter by preachermfux global.
|
||||
$preachermfux = $this->preachermfux;
|
||||
if (is_numeric($preachermfux ))
|
||||
// [7225] Filter by preacherrmkt global.
|
||||
$preacherrmkt = $this->preacherrmkt;
|
||||
if (is_numeric($preacherrmkt ))
|
||||
{
|
||||
$query->where('a.preacher = ' . (int) $preachermfux );
|
||||
$query->where('a.preacher = ' . (int) $preacherrmkt );
|
||||
}
|
||||
elseif (is_string($preachermfux))
|
||||
elseif (is_string($preacherrmkt))
|
||||
{
|
||||
$query->where('a.preacher = ' . $db->quote($preachermfux));
|
||||
$query->where('a.preacher = ' . $db->quote($preacherrmkt));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.preacher = -5');
|
||||
}
|
||||
|
||||
// [7230] Join over the asset groups.
|
||||
// [7242] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7233] Filter by access level.
|
||||
// [7245] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7238] Implement View Level Access
|
||||
// [7250] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7245] Order the results by ordering
|
||||
// [7257] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7247] Load the items
|
||||
// [7259] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -192,15 +192,15 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [11121] set selection value to a translatable value
|
||||
// [11133] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [11128] convert link_type
|
||||
$item->link_type = $this->selectionTranslationJfzsermons($item->link_type, 'link_type');
|
||||
// [11128] convert source
|
||||
$item->source = $this->selectionTranslationJfzsermons($item->source, 'source');
|
||||
// [11140] convert link_type
|
||||
$item->link_type = $this->selectionTranslationPblsermons($item->link_type, 'link_type');
|
||||
// [11140] convert source
|
||||
$item->source = $this->selectionTranslationPblsermons($item->source, 'source');
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,22 +214,22 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationJfzsermons($value,$name)
|
||||
public function selectionTranslationPblsermons($value,$name)
|
||||
{
|
||||
// [11154] Array of link_type language strings
|
||||
// [11166] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [11154] Array of source language strings
|
||||
// [11166] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -238,7 +238,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -258,7 +258,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [9806] Get the form.
|
||||
{ // [9818] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -268,12 +268,12 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [9891] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [9903] 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');
|
||||
}
|
||||
// [9896] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [9908] 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');
|
||||
@ -281,36 +281,36 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9902] Check for existing item.
|
||||
// [9903] Modify the form based on Edit State access controls.
|
||||
// [9914] Check for existing item.
|
||||
// [9915] 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')))
|
||||
{
|
||||
// [9916] Disable fields for display.
|
||||
// [9928] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [9919] Disable fields while saving.
|
||||
// [9931] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [9924] Modify the form based on Edit Creaded By access controls.
|
||||
// [9936] 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')))
|
||||
{
|
||||
// [9936] Disable fields for display.
|
||||
// [9948] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [9938] Disable fields for display.
|
||||
// [9950] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [9940] Disable fields while saving.
|
||||
// [9952] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [9943] Modify the form based on Edit Creaded Date access controls.
|
||||
// [9955] 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')))
|
||||
{
|
||||
// [9955] Disable fields for display.
|
||||
// [9967] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [9957] Disable fields while saving.
|
||||
// [9969] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [10107] The record has been set. Check the record permissions.
|
||||
// [10119] The record has been set. Check the record permissions.
|
||||
return $user->authorise('preacher.delete', 'com_sermondistributor.preacher.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -368,14 +368,14 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [10194] The record has been set. Check the record permissions.
|
||||
// [10206] 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;
|
||||
}
|
||||
}
|
||||
// [10211] In the absense of better information, revert to the component permissions.
|
||||
// [10223] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('preacher.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [10019] Check specific edit permission then general edit permission.
|
||||
// [10031] 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');
|
||||
@ -616,7 +616,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [5167] Set some needed variables.
|
||||
// [5179] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -630,12 +630,12 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5187] get list of uniqe fields
|
||||
// [5199] get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// [5189] remove move_copy from array
|
||||
// [5201] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5192] make sure published is set
|
||||
// [5204] make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
@ -647,21 +647,21 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// [5229] Parent exists so let's proceed
|
||||
// [5241] Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// [5232] Pop the first ID off the stack
|
||||
// [5244] Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// [5237] only allow copy if user may edit this item.
|
||||
// [5249] only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// [5247] Not fatal error
|
||||
// [5259] Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
@ -669,19 +669,19 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
}
|
||||
|
||||
// [5252] Check that the row actually exists
|
||||
// [5264] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5257] Fatal error
|
||||
// [5269] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5264] Not fatal error
|
||||
// [5276] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
@ -689,7 +689,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
|
||||
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
|
||||
|
||||
// [5300] insert all set values
|
||||
// [5312] insert all set values
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
@ -701,7 +701,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5312] update all uniqe fields
|
||||
// [5324] update all uniqe fields
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
@ -710,13 +710,13 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5321] Reset the ID because we are making a copy
|
||||
// [5333] Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// [5324] TODO: Deal with ordering?
|
||||
// [5325] $this->table->ordering = 1;
|
||||
// [5336] TODO: Deal with ordering?
|
||||
// [5337] $this->table->ordering = 1;
|
||||
|
||||
// [5327] Check the row.
|
||||
// [5339] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -729,7 +729,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5340] Store the row.
|
||||
// [5352] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -737,14 +737,14 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5348] Get the new item ID
|
||||
// [5360] Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// [5351] Add the new ID to the array
|
||||
// [5363] Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// [5355] Clean the cache
|
||||
// [5367] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
@ -765,7 +765,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [4969] Set some needed variables.
|
||||
// [4981] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -780,15 +780,15 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [4991] make sure published only updates if user has the permission.
|
||||
// [5003] make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('preacher.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// [5004] remove move_copy from array
|
||||
// [5016] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5025] Parent exists so we proceed
|
||||
// [5037] Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('preacher.edit', $contexts[$pk]))
|
||||
@ -798,30 +798,30 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5042] Check that the row actually exists
|
||||
// [5054] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5047] Fatal error
|
||||
// [5059] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5054] Not fatal error
|
||||
// [5066] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// [5060] insert all set values.
|
||||
// [5072] insert all set values.
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// [5065] Do special action for access.
|
||||
// [5077] Do special action for access.
|
||||
if ('access' == $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
@ -834,7 +834,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5077] Check the row.
|
||||
// [5089] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -847,7 +847,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5090] Store the row.
|
||||
// [5102] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -856,7 +856,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5099] Clean the cache
|
||||
// [5111] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
@ -894,7 +894,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// [5381] Alter the name for save as copy
|
||||
// [5393] Alter the name for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
$origTable = clone $this->getTable();
|
||||
@ -917,7 +917,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
$data['published'] = 0;
|
||||
}
|
||||
|
||||
// [5408] Automatic handling of alias for empty fields
|
||||
// [5420] 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)
|
||||
@ -948,10 +948,10 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5447] Alter the uniqe field for save as copy
|
||||
// [5459] Alter the uniqe field for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
// [5450] Automatic handling of other uniqe fields
|
||||
// [5462] Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
@ -1005,7 +1005,7 @@ class SermondistributorModelPreacher extends JModelAdmin
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
{
|
||||
|
||||
// [5481] Alter the title & alias
|
||||
// [5493] Alter the title & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
|
@ -101,16 +101,16 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [10780] check in items
|
||||
// [10792] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -135,19 +135,19 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// [7637] Get the user object.
|
||||
// [7649] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7639] Create a new query object.
|
||||
// [7651] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7642] Select some fields
|
||||
// [7654] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7649] From the sermondistributor_item table
|
||||
// [7661] From the sermondistributor_item table
|
||||
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
|
||||
|
||||
// [7663] Filter by published state
|
||||
// [7675] Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
@ -158,21 +158,21 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// [7675] Join over the asset groups.
|
||||
// [7687] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7678] Filter by access level.
|
||||
// [7690] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7683] Implement View Level Access
|
||||
// [7695] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
// [7760] Filter by search.
|
||||
// [7772] Filter by search.
|
||||
$search = $this->getState('filter.search');
|
||||
if (!empty($search))
|
||||
{
|
||||
@ -188,7 +188,7 @@ class SermondistributorModelPreachers extends JModelList
|
||||
}
|
||||
|
||||
|
||||
// [7719] Add the list ordering clause.
|
||||
// [7731] Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
@ -206,42 +206,42 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// [7427] setup the query
|
||||
// [7439] setup the query
|
||||
if (SermondistributorHelper::checkArray($pks))
|
||||
{
|
||||
// [7430] Get the user object.
|
||||
// [7442] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7432] Create a new query object.
|
||||
// [7444] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7435] Select some fields
|
||||
// [7447] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7437] From the sermondistributor_preacher table
|
||||
// [7449] From the sermondistributor_preacher table
|
||||
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// [7447] Implement View Level Access
|
||||
// [7459] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7454] Order the results by ordering
|
||||
// [7466] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7456] Load the items
|
||||
// [7468] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -252,13 +252,13 @@ class SermondistributorModelPreachers extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [11068] unset the values we don't want exported.
|
||||
// [11080] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [11077] Add headers to items array.
|
||||
// [11089] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -277,13 +277,13 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
public function getExImPortHeaders()
|
||||
{
|
||||
// [7476] Get a db connection.
|
||||
// [7488] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [7478] get the columns
|
||||
// [7490] get the columns
|
||||
$columns = $db->getTableColumns("#__sermondistributor_preacher");
|
||||
if (SermondistributorHelper::checkArray($columns))
|
||||
{
|
||||
// [7482] remove the headers you don't import/export.
|
||||
// [7494] remove the headers you don't import/export.
|
||||
unset($columns['asset_id']);
|
||||
unset($columns['checked_out']);
|
||||
unset($columns['checked_out_time']);
|
||||
@ -305,7 +305,7 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [10403] Compile the store id.
|
||||
// [10415] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -326,15 +326,15 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [10796] Get set check in time
|
||||
// [10808] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [10801] Get a db connection.
|
||||
// [10813] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [10803] reset query
|
||||
// [10815] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_preacher'));
|
||||
@ -342,24 +342,24 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [10811] Get Yesterdays date
|
||||
// [10823] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [10813] reset query
|
||||
// [10825] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [10815] Fields to update.
|
||||
// [10827] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [10820] Conditions for which records should be updated.
|
||||
// [10832] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [10825] Check table
|
||||
// [10837] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -101,7 +101,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_sermondistributor.series');
|
||||
}
|
||||
}
|
||||
$this->seriesqajj = $item->id;
|
||||
$this->seriesevcv = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -111,74 +111,74 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getEkusermons()
|
||||
public function getSkxsermons()
|
||||
{
|
||||
// [7185] Get the user object.
|
||||
// [7197] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7187] Create a new query object.
|
||||
// [7199] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7190] Select some fields
|
||||
// [7202] Select some fields
|
||||
$query->select('a.*');
|
||||
$query->select($db->quoteName('c.title','category_title'));
|
||||
|
||||
// [7197] From the sermondistributor_sermon table
|
||||
// [7209] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_preacher table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_series table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7213] Filter by seriesqajj global.
|
||||
$seriesqajj = $this->seriesqajj;
|
||||
if (is_numeric($seriesqajj ))
|
||||
// [7225] Filter by seriesevcv global.
|
||||
$seriesevcv = $this->seriesevcv;
|
||||
if (is_numeric($seriesevcv ))
|
||||
{
|
||||
$query->where('a.series = ' . (int) $seriesqajj );
|
||||
$query->where('a.series = ' . (int) $seriesevcv );
|
||||
}
|
||||
elseif (is_string($seriesqajj))
|
||||
elseif (is_string($seriesevcv))
|
||||
{
|
||||
$query->where('a.series = ' . $db->quote($seriesqajj));
|
||||
$query->where('a.series = ' . $db->quote($seriesevcv));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.series = -5');
|
||||
}
|
||||
|
||||
// [7230] Join over the asset groups.
|
||||
// [7242] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7233] Filter by access level.
|
||||
// [7245] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7238] Implement View Level Access
|
||||
// [7250] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7245] Order the results by ordering
|
||||
// [7257] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7247] Load the items
|
||||
// [7259] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -192,15 +192,15 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [11121] set selection value to a translatable value
|
||||
// [11133] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [11128] convert link_type
|
||||
$item->link_type = $this->selectionTranslationEkusermons($item->link_type, 'link_type');
|
||||
// [11128] convert source
|
||||
$item->source = $this->selectionTranslationEkusermons($item->source, 'source');
|
||||
// [11140] convert link_type
|
||||
$item->link_type = $this->selectionTranslationSkxsermons($item->link_type, 'link_type');
|
||||
// [11140] convert source
|
||||
$item->source = $this->selectionTranslationSkxsermons($item->source, 'source');
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,22 +214,22 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationEkusermons($value,$name)
|
||||
public function selectionTranslationSkxsermons($value,$name)
|
||||
{
|
||||
// [11154] Array of link_type language strings
|
||||
// [11166] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [11154] Array of source language strings
|
||||
// [11166] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -238,7 +238,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -258,7 +258,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [9806] Get the form.
|
||||
{ // [9818] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -268,12 +268,12 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [9891] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [9903] 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');
|
||||
}
|
||||
// [9896] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [9908] 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');
|
||||
@ -281,36 +281,36 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9902] Check for existing item.
|
||||
// [9903] Modify the form based on Edit State access controls.
|
||||
// [9914] Check for existing item.
|
||||
// [9915] 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')))
|
||||
{
|
||||
// [9916] Disable fields for display.
|
||||
// [9928] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [9919] Disable fields while saving.
|
||||
// [9931] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [9924] Modify the form based on Edit Creaded By access controls.
|
||||
// [9936] 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')))
|
||||
{
|
||||
// [9936] Disable fields for display.
|
||||
// [9948] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [9938] Disable fields for display.
|
||||
// [9950] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [9940] Disable fields while saving.
|
||||
// [9952] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [9943] Modify the form based on Edit Creaded Date access controls.
|
||||
// [9955] 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')))
|
||||
{
|
||||
// [9955] Disable fields for display.
|
||||
// [9967] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [9957] Disable fields while saving.
|
||||
// [9969] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [10107] The record has been set. Check the record permissions.
|
||||
// [10119] The record has been set. Check the record permissions.
|
||||
return $user->authorise('series.delete', 'com_sermondistributor.series.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -368,14 +368,14 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [10194] The record has been set. Check the record permissions.
|
||||
// [10206] 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;
|
||||
}
|
||||
}
|
||||
// [10211] In the absense of better information, revert to the component permissions.
|
||||
// [10223] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('series.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [10019] Check specific edit permission then general edit permission.
|
||||
// [10031] 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');
|
||||
@ -616,7 +616,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [5167] Set some needed variables.
|
||||
// [5179] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -630,12 +630,12 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5187] get list of uniqe fields
|
||||
// [5199] get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// [5189] remove move_copy from array
|
||||
// [5201] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5192] make sure published is set
|
||||
// [5204] make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
@ -647,21 +647,21 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// [5229] Parent exists so let's proceed
|
||||
// [5241] Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// [5232] Pop the first ID off the stack
|
||||
// [5244] Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// [5237] only allow copy if user may edit this item.
|
||||
// [5249] only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('series.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// [5247] Not fatal error
|
||||
// [5259] Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
@ -669,19 +669,19 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
}
|
||||
|
||||
// [5252] Check that the row actually exists
|
||||
// [5264] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5257] Fatal error
|
||||
// [5269] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5264] Not fatal error
|
||||
// [5276] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
@ -689,7 +689,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
|
||||
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
|
||||
|
||||
// [5300] insert all set values
|
||||
// [5312] insert all set values
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
@ -701,7 +701,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5312] update all uniqe fields
|
||||
// [5324] update all uniqe fields
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
@ -710,13 +710,13 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5321] Reset the ID because we are making a copy
|
||||
// [5333] Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// [5324] TODO: Deal with ordering?
|
||||
// [5325] $this->table->ordering = 1;
|
||||
// [5336] TODO: Deal with ordering?
|
||||
// [5337] $this->table->ordering = 1;
|
||||
|
||||
// [5327] Check the row.
|
||||
// [5339] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -729,7 +729,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5340] Store the row.
|
||||
// [5352] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -737,14 +737,14 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5348] Get the new item ID
|
||||
// [5360] Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// [5351] Add the new ID to the array
|
||||
// [5363] Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// [5355] Clean the cache
|
||||
// [5367] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
@ -765,7 +765,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [4969] Set some needed variables.
|
||||
// [4981] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -780,15 +780,15 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [4991] make sure published only updates if user has the permission.
|
||||
// [5003] make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('series.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// [5004] remove move_copy from array
|
||||
// [5016] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5025] Parent exists so we proceed
|
||||
// [5037] Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('series.edit', $contexts[$pk]))
|
||||
@ -798,30 +798,30 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5042] Check that the row actually exists
|
||||
// [5054] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5047] Fatal error
|
||||
// [5059] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5054] Not fatal error
|
||||
// [5066] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// [5060] insert all set values.
|
||||
// [5072] insert all set values.
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// [5065] Do special action for access.
|
||||
// [5077] Do special action for access.
|
||||
if ('access' == $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
@ -834,7 +834,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5077] Check the row.
|
||||
// [5089] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -847,7 +847,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5090] Store the row.
|
||||
// [5102] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -856,7 +856,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5099] Clean the cache
|
||||
// [5111] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
@ -894,7 +894,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// [5381] Alter the name for save as copy
|
||||
// [5393] Alter the name for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
$origTable = clone $this->getTable();
|
||||
@ -917,7 +917,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
$data['published'] = 0;
|
||||
}
|
||||
|
||||
// [5408] Automatic handling of alias for empty fields
|
||||
// [5420] 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)
|
||||
@ -948,10 +948,10 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5447] Alter the uniqe field for save as copy
|
||||
// [5459] Alter the uniqe field for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
// [5450] Automatic handling of other uniqe fields
|
||||
// [5462] Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
@ -1005,7 +1005,7 @@ class SermondistributorModelSeries extends JModelAdmin
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
{
|
||||
|
||||
// [5481] Alter the title & alias
|
||||
// [5493] Alter the title & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
|
@ -97,16 +97,16 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [10780] check in items
|
||||
// [10792] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -131,19 +131,19 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// [7637] Get the user object.
|
||||
// [7649] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7639] Create a new query object.
|
||||
// [7651] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7642] Select some fields
|
||||
// [7654] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7649] From the sermondistributor_item table
|
||||
// [7661] From the sermondistributor_item table
|
||||
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
|
||||
|
||||
// [7663] Filter by published state
|
||||
// [7675] Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
@ -154,21 +154,21 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// [7675] Join over the asset groups.
|
||||
// [7687] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7678] Filter by access level.
|
||||
// [7690] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7683] Implement View Level Access
|
||||
// [7695] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
// [7760] Filter by search.
|
||||
// [7772] Filter by search.
|
||||
$search = $this->getState('filter.search');
|
||||
if (!empty($search))
|
||||
{
|
||||
@ -184,7 +184,7 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
}
|
||||
|
||||
|
||||
// [7719] Add the list ordering clause.
|
||||
// [7731] Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
@ -202,42 +202,42 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// [7427] setup the query
|
||||
// [7439] setup the query
|
||||
if (SermondistributorHelper::checkArray($pks))
|
||||
{
|
||||
// [7430] Get the user object.
|
||||
// [7442] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7432] Create a new query object.
|
||||
// [7444] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7435] Select some fields
|
||||
// [7447] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7437] From the sermondistributor_series table
|
||||
// [7449] From the sermondistributor_series table
|
||||
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// [7447] Implement View Level Access
|
||||
// [7459] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7454] Order the results by ordering
|
||||
// [7466] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7456] Load the items
|
||||
// [7468] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -248,13 +248,13 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [11068] unset the values we don't want exported.
|
||||
// [11080] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [11077] Add headers to items array.
|
||||
// [11089] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -273,13 +273,13 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
public function getExImPortHeaders()
|
||||
{
|
||||
// [7476] Get a db connection.
|
||||
// [7488] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [7478] get the columns
|
||||
// [7490] get the columns
|
||||
$columns = $db->getTableColumns("#__sermondistributor_series");
|
||||
if (SermondistributorHelper::checkArray($columns))
|
||||
{
|
||||
// [7482] remove the headers you don't import/export.
|
||||
// [7494] remove the headers you don't import/export.
|
||||
unset($columns['asset_id']);
|
||||
unset($columns['checked_out']);
|
||||
unset($columns['checked_out_time']);
|
||||
@ -301,7 +301,7 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [10403] Compile the store id.
|
||||
// [10415] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -321,15 +321,15 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [10796] Get set check in time
|
||||
// [10808] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [10801] Get a db connection.
|
||||
// [10813] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [10803] reset query
|
||||
// [10815] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_series'));
|
||||
@ -337,24 +337,24 @@ class SermondistributorModelSeries_list extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [10811] Get Yesterdays date
|
||||
// [10823] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [10813] reset query
|
||||
// [10825] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [10815] Fields to update.
|
||||
// [10827] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [10820] Conditions for which records should be updated.
|
||||
// [10832] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [10825] Check table
|
||||
// [10837] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -97,13 +97,13 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
if (!empty($item->local_files))
|
||||
{
|
||||
// [4211] JSON Decode local_files.
|
||||
// [4223] JSON Decode local_files.
|
||||
$item->local_files = json_decode($item->local_files);
|
||||
}
|
||||
|
||||
if (!empty($item->manual_files))
|
||||
{
|
||||
// [4211] JSON Decode manual_files.
|
||||
// [4223] JSON Decode manual_files.
|
||||
$item->manual_files = json_decode($item->manual_files);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$item->tags->getTagIds($item->id, 'com_sermondistributor.sermon');
|
||||
}
|
||||
}
|
||||
$this->sermonhnee = $item->id;
|
||||
$this->sermonpyek = $item->id;
|
||||
|
||||
return $item;
|
||||
}
|
||||
@ -123,76 +123,76 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getQfostastics()
|
||||
public function getPomstastics()
|
||||
{
|
||||
// [7185] Get the user object.
|
||||
// [7197] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7187] Create a new query object.
|
||||
// [7199] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7190] Select some fields
|
||||
// [7202] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7197] From the sermondistributor_statistic table
|
||||
// [7209] From the sermondistributor_statistic table
|
||||
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
|
||||
|
||||
// [7790] From the sermondistributor_sermon table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_preacher table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_series table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7213] Filter by sermonhnee global.
|
||||
$sermonhnee = $this->sermonhnee;
|
||||
if (is_numeric($sermonhnee ))
|
||||
// [7225] Filter by sermonpyek global.
|
||||
$sermonpyek = $this->sermonpyek;
|
||||
if (is_numeric($sermonpyek ))
|
||||
{
|
||||
$query->where('a.sermon = ' . (int) $sermonhnee );
|
||||
$query->where('a.sermon = ' . (int) $sermonpyek );
|
||||
}
|
||||
elseif (is_string($sermonhnee))
|
||||
elseif (is_string($sermonpyek))
|
||||
{
|
||||
$query->where('a.sermon = ' . $db->quote($sermonhnee));
|
||||
$query->where('a.sermon = ' . $db->quote($sermonpyek));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.sermon = -5');
|
||||
}
|
||||
|
||||
// [7230] Join over the asset groups.
|
||||
// [7242] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7233] Filter by access level.
|
||||
// [7245] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7238] Implement View Level Access
|
||||
// [7250] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7245] Order the results by ordering
|
||||
// [7257] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7247] Load the items
|
||||
// [7259] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -221,7 +221,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [9806] Get the form.
|
||||
{ // [9818] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -231,17 +231,17 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [9833] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [9845] 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');
|
||||
}
|
||||
// [9838] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [9850] 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');
|
||||
}
|
||||
// [9843] Determine correct permissions to check.
|
||||
// [9855] Determine correct permissions to check.
|
||||
if ($this->getState('sermon.id'))
|
||||
{
|
||||
$id = $this->getState('sermon.id');
|
||||
@ -249,56 +249,56 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$catid = 0;
|
||||
if (isset($this->getItem($id)->catid))
|
||||
{
|
||||
// [9850] set catagory id
|
||||
// [9862] set catagory id
|
||||
$catid = $this->getItem($id)->catid;
|
||||
|
||||
// [9852] Existing record. Can only edit in selected categories.
|
||||
// [9864] Existing record. Can only edit in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.edit');
|
||||
|
||||
// [9854] Existing record. Can only edit own items in selected categories.
|
||||
// [9866] Existing record. Can only edit own items in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.edit.own');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// [9860] New record. Can only create in selected categories.
|
||||
// [9872] New record. Can only create in selected categories.
|
||||
$form->setFieldAttribute('catid', 'action', 'core.create');
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9864] Check for existing item.
|
||||
// [9865] Modify the form based on Edit State access controls.
|
||||
// [9876] Check for existing item.
|
||||
// [9877] 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')))
|
||||
{
|
||||
// [9880] Disable fields for display.
|
||||
// [9892] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
|
||||
// [9883] Disable fields while saving.
|
||||
// [9895] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [9924] Modify the form based on Edit Creaded By access controls.
|
||||
// [9936] 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')))
|
||||
{
|
||||
// [9936] Disable fields for display.
|
||||
// [9948] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [9938] Disable fields for display.
|
||||
// [9950] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [9940] Disable fields while saving.
|
||||
// [9952] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [9943] Modify the form based on Edit Creaded Date access controls.
|
||||
// [9955] 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')))
|
||||
{
|
||||
// [9955] Disable fields for display.
|
||||
// [9967] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [9957] Disable fields while saving.
|
||||
// [9969] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
if ($allow)
|
||||
{
|
||||
// [10078] The record has been set. Check the record permissions.
|
||||
// [10090] The record has been set. Check the record permissions.
|
||||
return $user->authorise('sermon.delete', 'com_sermondistributor.sermon.' . (int) $record->id);
|
||||
}
|
||||
return $allow;
|
||||
@ -362,14 +362,14 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [10151] The record has been set. Check the record permissions.
|
||||
// [10163] 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;
|
||||
}
|
||||
}
|
||||
// [10167] Check against the category.
|
||||
// [10179] Check against the category.
|
||||
if (!empty($record->catid))
|
||||
{
|
||||
$catpermission = $user->authorise('core.edit.state', 'com_sermondistributor.sermons.category.' . (int) $record->catid);
|
||||
@ -378,7 +378,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// [10178] In the absense of better information, revert to the component permissions.
|
||||
// [10190] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('sermon.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [10019] Check specific edit permission then general edit permission.
|
||||
// [10031] 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');
|
||||
@ -492,20 +492,20 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
*/
|
||||
public function validate($form, $data, $group = null)
|
||||
{
|
||||
// [9010] check if the not_required field is set
|
||||
// [9022] 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);
|
||||
// [9015] now change the required field attributes value
|
||||
// [9027] now change the required field attributes value
|
||||
foreach ($requiredFields as $requiredField)
|
||||
{
|
||||
// [9018] make sure there is a string value
|
||||
// [9030] make sure there is a string value
|
||||
if (SermondistributorHelper::checkString($requiredField))
|
||||
{
|
||||
// [9021] change to false
|
||||
// [9033] change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// [9023] also clear the data set
|
||||
// [9035] also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
}
|
||||
}
|
||||
@ -655,7 +655,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [5167] Set some needed variables.
|
||||
// [5179] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -669,12 +669,12 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5187] get list of uniqe fields
|
||||
// [5199] get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// [5189] remove move_copy from array
|
||||
// [5201] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5192] make sure published is set
|
||||
// [5204] make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
@ -690,7 +690,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
elseif (isset($values['category']) && (int) $values['category'] > 0)
|
||||
{
|
||||
// [5217] move the category value to correct field name
|
||||
// [5229] move the category value to correct field name
|
||||
$values['catid'] = $values['category'];
|
||||
unset($values['category']);
|
||||
}
|
||||
@ -701,21 +701,21 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// [5229] Parent exists so let's proceed
|
||||
// [5241] Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// [5232] Pop the first ID off the stack
|
||||
// [5244] Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// [5237] only allow copy if user may edit this item.
|
||||
// [5249] only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// [5247] Not fatal error
|
||||
// [5259] Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
@ -723,19 +723,19 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
|
||||
}
|
||||
|
||||
// [5252] Check that the row actually exists
|
||||
// [5264] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5257] Fatal error
|
||||
// [5269] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5264] Not fatal error
|
||||
// [5276] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
@ -750,7 +750,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
list($this->table->name, $this->table->alias) = $this->generateNewTitle($this->table->catid, $this->table->alias, $this->table->name);
|
||||
}
|
||||
|
||||
// [5300] insert all set values
|
||||
// [5312] insert all set values
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
@ -762,7 +762,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5312] update all uniqe fields
|
||||
// [5324] update all uniqe fields
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
@ -771,13 +771,13 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5321] Reset the ID because we are making a copy
|
||||
// [5333] Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// [5324] TODO: Deal with ordering?
|
||||
// [5325] $this->table->ordering = 1;
|
||||
// [5336] TODO: Deal with ordering?
|
||||
// [5337] $this->table->ordering = 1;
|
||||
|
||||
// [5327] Check the row.
|
||||
// [5339] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -790,7 +790,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5340] Store the row.
|
||||
// [5352] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -798,14 +798,14 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5348] Get the new item ID
|
||||
// [5360] Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// [5351] Add the new ID to the array
|
||||
// [5363] Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// [5355] Clean the cache
|
||||
// [5367] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
@ -826,7 +826,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [4969] Set some needed variables.
|
||||
// [4981] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -841,12 +841,12 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [4991] make sure published only updates if user has the permission.
|
||||
// [5003] make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('sermon.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// [5004] remove move_copy from array
|
||||
// [5016] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
if (isset($values['category']) && (int) $values['category'] > 0 && !static::checkCategoryId($values['category']))
|
||||
@ -855,7 +855,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
elseif (isset($values['category']) && (int) $values['category'] > 0)
|
||||
{
|
||||
// [5015] move the category value to correct field name
|
||||
// [5027] move the category value to correct field name
|
||||
$values['catid'] = $values['category'];
|
||||
unset($values['category']);
|
||||
}
|
||||
@ -865,7 +865,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5025] Parent exists so we proceed
|
||||
// [5037] Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('sermon.edit', $contexts[$pk]))
|
||||
@ -875,30 +875,30 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5042] Check that the row actually exists
|
||||
// [5054] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5047] Fatal error
|
||||
// [5059] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5054] Not fatal error
|
||||
// [5066] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// [5060] insert all set values.
|
||||
// [5072] insert all set values.
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// [5065] Do special action for access.
|
||||
// [5077] Do special action for access.
|
||||
if ('access' == $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
@ -911,7 +911,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5077] Check the row.
|
||||
// [5089] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -924,7 +924,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5090] Store the row.
|
||||
// [5102] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -933,7 +933,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5099] Clean the cache
|
||||
// [5111] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
@ -963,13 +963,13 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$data['metadata'] = (string) $metadata;
|
||||
}
|
||||
|
||||
// [4321] Set the local_files string to JSON string.
|
||||
// [4333] Set the local_files string to JSON string.
|
||||
if (isset($data['local_files']))
|
||||
{
|
||||
$data['local_files'] = (string) json_encode($data['local_files']);
|
||||
}
|
||||
|
||||
// [4321] Set the manual_files string to JSON string.
|
||||
// [4333] Set the manual_files string to JSON string.
|
||||
if (isset($data['manual_files']))
|
||||
{
|
||||
$data['manual_files'] = (string) json_encode($data['manual_files']);
|
||||
@ -983,7 +983,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// [5381] Alter the name for save as copy
|
||||
// [5393] Alter the name for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
$origTable = clone $this->getTable();
|
||||
@ -1006,7 +1006,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
$data['published'] = 0;
|
||||
}
|
||||
|
||||
// [5408] Automatic handling of alias for empty fields
|
||||
// [5420] 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)
|
||||
@ -1037,10 +1037,10 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5447] Alter the uniqe field for save as copy
|
||||
// [5459] Alter the uniqe field for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
// [5450] Automatic handling of other uniqe fields
|
||||
// [5462] Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
@ -1094,7 +1094,7 @@ class SermondistributorModelSermon extends JModelAdmin
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
{
|
||||
|
||||
// [5481] Alter the title & alias
|
||||
// [5493] Alter the title & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
|
@ -45,7 +45,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')
|
||||
);
|
||||
// [12426] view access array
|
||||
// [12438] view access array
|
||||
$viewAccess = array(
|
||||
'preacher.create' => 'preacher.create',
|
||||
'preachers.access' => 'preacher.access',
|
||||
|
@ -129,16 +129,16 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [10780] check in items
|
||||
// [10792] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -152,14 +152,14 @@ class SermondistributorModelSermons extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [11121] set selection value to a translatable value
|
||||
// [11133] set selection value to a translatable value
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [11128] convert link_type
|
||||
// [11140] convert link_type
|
||||
$item->link_type = $this->selectionTranslation($item->link_type, 'link_type');
|
||||
// [11128] convert source
|
||||
// [11140] convert source
|
||||
$item->source = $this->selectionTranslation($item->source, 'source');
|
||||
}
|
||||
}
|
||||
@ -176,20 +176,20 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// [11154] Array of link_type language strings
|
||||
// [11166] Array of link_type language strings
|
||||
if ($name == 'link_type')
|
||||
{
|
||||
$link_typeArray = array(
|
||||
1 => 'COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED',
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DIRECT'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($link_typeArray[$value]) && SermondistributorHelper::checkString($link_typeArray[$value]))
|
||||
{
|
||||
return $link_typeArray[$value];
|
||||
}
|
||||
}
|
||||
// [11154] Array of source language strings
|
||||
// [11166] Array of source language strings
|
||||
if ($name == 'source')
|
||||
{
|
||||
$sourceArray = array(
|
||||
@ -198,7 +198,7 @@ class SermondistributorModelSermons extends JModelList
|
||||
2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX',
|
||||
3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL'
|
||||
);
|
||||
// [11185] Now check if value is found in this array
|
||||
// [11197] Now check if value is found in this array
|
||||
if (isset($sourceArray[$value]) && SermondistributorHelper::checkString($sourceArray[$value]))
|
||||
{
|
||||
return $sourceArray[$value];
|
||||
@ -214,29 +214,29 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// [7637] Get the user object.
|
||||
// [7649] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7639] Create a new query object.
|
||||
// [7651] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7642] Select some fields
|
||||
// [7654] Select some fields
|
||||
$query->select('a.*');
|
||||
$query->select($db->quoteName('c.title','category_title'));
|
||||
|
||||
// [7649] From the sermondistributor_item table
|
||||
// [7661] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_preacher table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_series table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7663] Filter by published state
|
||||
// [7675] Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
@ -247,21 +247,21 @@ class SermondistributorModelSermons extends JModelList
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// [7675] Join over the asset groups.
|
||||
// [7687] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7678] Filter by access level.
|
||||
// [7690] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7683] Implement View Level Access
|
||||
// [7695] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
// [7760] Filter by search.
|
||||
// [7772] Filter by search.
|
||||
$search = $this->getState('filter.search');
|
||||
if (!empty($search))
|
||||
{
|
||||
@ -276,28 +276,28 @@ class SermondistributorModelSermons extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [7994] Filter by preacher.
|
||||
// [8006] Filter by preacher.
|
||||
if ($preacher = $this->getState('filter.preacher'))
|
||||
{
|
||||
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
|
||||
}
|
||||
// [7994] Filter by series.
|
||||
// [8006] Filter by series.
|
||||
if ($series = $this->getState('filter.series'))
|
||||
{
|
||||
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
|
||||
}
|
||||
// [8003] Filter by Link_type.
|
||||
// [8015] Filter by Link_type.
|
||||
if ($link_type = $this->getState('filter.link_type'))
|
||||
{
|
||||
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
|
||||
}
|
||||
// [8003] Filter by Source.
|
||||
// [8015] Filter by Source.
|
||||
if ($source = $this->getState('filter.source'))
|
||||
{
|
||||
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
|
||||
}
|
||||
|
||||
// [7697] Filter by a single or group of categories.
|
||||
// [7709] Filter by a single or group of categories.
|
||||
$baselevel = 1;
|
||||
$categoryId = $this->getState('filter.category_id');
|
||||
|
||||
@ -319,7 +319,7 @@ class SermondistributorModelSermons extends JModelList
|
||||
}
|
||||
|
||||
|
||||
// [7719] Add the list ordering clause.
|
||||
// [7731] Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
@ -337,42 +337,42 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// [7427] setup the query
|
||||
// [7439] setup the query
|
||||
if (SermondistributorHelper::checkArray($pks))
|
||||
{
|
||||
// [7430] Get the user object.
|
||||
// [7442] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7432] Create a new query object.
|
||||
// [7444] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7435] Select some fields
|
||||
// [7447] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7437] From the sermondistributor_sermon table
|
||||
// [7449] From the sermondistributor_sermon table
|
||||
$query->from($db->quoteName('#__sermondistributor_sermon', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// [7447] Implement View Level Access
|
||||
// [7459] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7454] Order the results by ordering
|
||||
// [7466] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7456] Load the items
|
||||
// [7468] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -383,13 +383,13 @@ class SermondistributorModelSermons extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [11068] unset the values we don't want exported.
|
||||
// [11080] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [11077] Add headers to items array.
|
||||
// [11089] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -408,13 +408,13 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
public function getExImPortHeaders()
|
||||
{
|
||||
// [7476] Get a db connection.
|
||||
// [7488] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [7478] get the columns
|
||||
// [7490] get the columns
|
||||
$columns = $db->getTableColumns("#__sermondistributor_sermon");
|
||||
if (SermondistributorHelper::checkArray($columns))
|
||||
{
|
||||
// [7482] remove the headers you don't import/export.
|
||||
// [7494] remove the headers you don't import/export.
|
||||
unset($columns['asset_id']);
|
||||
unset($columns['checked_out']);
|
||||
unset($columns['checked_out_time']);
|
||||
@ -436,7 +436,7 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [10403] Compile the store id.
|
||||
// [10415] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -464,15 +464,15 @@ class SermondistributorModelSermons extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [10796] Get set check in time
|
||||
// [10808] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [10801] Get a db connection.
|
||||
// [10813] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [10803] reset query
|
||||
// [10815] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_sermon'));
|
||||
@ -480,24 +480,24 @@ class SermondistributorModelSermons extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [10811] Get Yesterdays date
|
||||
// [10823] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [10813] reset query
|
||||
// [10825] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [10815] Fields to update.
|
||||
// [10827] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [10820] Conditions for which records should be updated.
|
||||
// [10832] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [10825] Check table
|
||||
// [10837] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -116,7 +116,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{ // [9806] Get the form.
|
||||
{ // [9818] Get the form.
|
||||
$form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
@ -126,12 +126,12 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
||||
// [9891] The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
|
||||
// [9903] 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');
|
||||
}
|
||||
// [9896] The back end uses id so we use that the rest of the time and set it to 0 by default.
|
||||
// [9908] 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');
|
||||
@ -139,36 +139,36 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// [9902] Check for existing item.
|
||||
// [9903] Modify the form based on Edit State access controls.
|
||||
// [9914] Check for existing item.
|
||||
// [9915] 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')))
|
||||
{
|
||||
// [9916] Disable fields for display.
|
||||
// [9928] Disable fields for display.
|
||||
$form->setFieldAttribute('ordering', 'disabled', 'true');
|
||||
$form->setFieldAttribute('published', 'disabled', 'true');
|
||||
// [9919] Disable fields while saving.
|
||||
// [9931] Disable fields while saving.
|
||||
$form->setFieldAttribute('ordering', 'filter', 'unset');
|
||||
$form->setFieldAttribute('published', 'filter', 'unset');
|
||||
}
|
||||
// [9924] Modify the form based on Edit Creaded By access controls.
|
||||
// [9936] 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')))
|
||||
{
|
||||
// [9936] Disable fields for display.
|
||||
// [9948] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'disabled', 'true');
|
||||
// [9938] Disable fields for display.
|
||||
// [9950] Disable fields for display.
|
||||
$form->setFieldAttribute('created_by', 'readonly', 'true');
|
||||
// [9940] Disable fields while saving.
|
||||
// [9952] Disable fields while saving.
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
// [9943] Modify the form based on Edit Creaded Date access controls.
|
||||
// [9955] 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')))
|
||||
{
|
||||
// [9955] Disable fields for display.
|
||||
// [9967] Disable fields for display.
|
||||
$form->setFieldAttribute('created', 'disabled', 'true');
|
||||
// [9957] Disable fields while saving.
|
||||
// [9969] Disable fields while saving.
|
||||
$form->setFieldAttribute('created', 'filter', 'unset');
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
// [10107] The record has been set. Check the record permissions.
|
||||
// [10119] The record has been set. Check the record permissions.
|
||||
return $user->authorise('statistic.delete', 'com_sermondistributor.statistic.' . (int) $record->id);
|
||||
}
|
||||
return false;
|
||||
@ -226,14 +226,14 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// [10194] The record has been set. Check the record permissions.
|
||||
// [10206] 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;
|
||||
}
|
||||
}
|
||||
// [10211] In the absense of better information, revert to the component permissions.
|
||||
// [10223] In the absense of better information, revert to the component permissions.
|
||||
return $user->authorise('statistic.edit.state', 'com_sermondistributor');
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// [10019] Check specific edit permission then general edit permission.
|
||||
// [10031] 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');
|
||||
@ -474,7 +474,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [5167] Set some needed variables.
|
||||
// [5179] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -488,12 +488,12 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5187] get list of uniqe fields
|
||||
// [5199] get list of uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
// [5189] remove move_copy from array
|
||||
// [5201] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5192] make sure published is set
|
||||
// [5204] make sure published is set
|
||||
if (!isset($values['published']))
|
||||
{
|
||||
$values['published'] = 0;
|
||||
@ -505,21 +505,21 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// [5229] Parent exists so let's proceed
|
||||
// [5241] Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
// [5232] Pop the first ID off the stack
|
||||
// [5244] Pop the first ID off the stack
|
||||
$pk = array_shift($pks);
|
||||
|
||||
$this->table->reset();
|
||||
|
||||
// [5237] only allow copy if user may edit this item.
|
||||
// [5249] only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// [5247] Not fatal error
|
||||
// [5259] Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
@ -527,19 +527,19 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
}
|
||||
|
||||
// [5252] Check that the row actually exists
|
||||
// [5264] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5257] Fatal error
|
||||
// [5269] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5264] Not fatal error
|
||||
// [5276] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
@ -547,7 +547,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
|
||||
$this->table->filename = $this->generateUniqe('filename',$this->table->filename);
|
||||
|
||||
// [5300] insert all set values
|
||||
// [5312] insert all set values
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
@ -559,7 +559,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5312] update all uniqe fields
|
||||
// [5324] update all uniqe fields
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
foreach ($uniqeFields as $uniqeField)
|
||||
@ -568,13 +568,13 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5321] Reset the ID because we are making a copy
|
||||
// [5333] Reset the ID because we are making a copy
|
||||
$this->table->id = 0;
|
||||
|
||||
// [5324] TODO: Deal with ordering?
|
||||
// [5325] $this->table->ordering = 1;
|
||||
// [5336] TODO: Deal with ordering?
|
||||
// [5337] $this->table->ordering = 1;
|
||||
|
||||
// [5327] Check the row.
|
||||
// [5339] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -587,7 +587,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5340] Store the row.
|
||||
// [5352] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -595,14 +595,14 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5348] Get the new item ID
|
||||
// [5360] Get the new item ID
|
||||
$newId = $this->table->get('id');
|
||||
|
||||
// [5351] Add the new ID to the array
|
||||
// [5363] Add the new ID to the array
|
||||
$newIds[$pk] = $newId;
|
||||
}
|
||||
|
||||
// [5355] Clean the cache
|
||||
// [5367] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return $newIds;
|
||||
@ -623,7 +623,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
{
|
||||
if (empty($this->batchSet))
|
||||
{
|
||||
// [4969] Set some needed variables.
|
||||
// [4981] Set some needed variables.
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
@ -638,15 +638,15 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [4991] make sure published only updates if user has the permission.
|
||||
// [5003] make sure published only updates if user has the permission.
|
||||
if (isset($values['published']) && !$this->canDo->get('statistic.edit.state'))
|
||||
{
|
||||
unset($values['published']);
|
||||
}
|
||||
// [5004] remove move_copy from array
|
||||
// [5016] remove move_copy from array
|
||||
unset($values['move_copy']);
|
||||
|
||||
// [5025] Parent exists so we proceed
|
||||
// [5037] Parent exists so we proceed
|
||||
foreach ($pks as $pk)
|
||||
{
|
||||
if (!$this->user->authorise('statistic.edit', $contexts[$pk]))
|
||||
@ -656,30 +656,30 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
return false;
|
||||
}
|
||||
|
||||
// [5042] Check that the row actually exists
|
||||
// [5054] Check that the row actually exists
|
||||
if (!$this->table->load($pk))
|
||||
{
|
||||
if ($error = $this->table->getError())
|
||||
{
|
||||
// [5047] Fatal error
|
||||
// [5059] Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [5054] Not fatal error
|
||||
// [5066] Not fatal error
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// [5060] insert all set values.
|
||||
// [5072] insert all set values.
|
||||
if (SermondistributorHelper::checkArray($values))
|
||||
{
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
// [5065] Do special action for access.
|
||||
// [5077] Do special action for access.
|
||||
if ('access' == $key && strlen($value) > 0)
|
||||
{
|
||||
$this->table->$key = $value;
|
||||
@ -692,7 +692,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
|
||||
|
||||
// [5077] Check the row.
|
||||
// [5089] Check the row.
|
||||
if (!$this->table->check())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -705,7 +705,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
|
||||
}
|
||||
|
||||
// [5090] Store the row.
|
||||
// [5102] Store the row.
|
||||
if (!$this->table->store())
|
||||
{
|
||||
$this->setError($this->table->getError());
|
||||
@ -714,7 +714,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// [5099] Clean the cache
|
||||
// [5111] Clean the cache
|
||||
$this->cleanCache();
|
||||
|
||||
return true;
|
||||
@ -752,10 +752,10 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
$data['params'] = (string) $params;
|
||||
}
|
||||
|
||||
// [5447] Alter the uniqe field for save as copy
|
||||
// [5459] Alter the uniqe field for save as copy
|
||||
if ($input->get('task') == 'save2copy')
|
||||
{
|
||||
// [5450] Automatic handling of other uniqe fields
|
||||
// [5462] Automatic handling of other uniqe fields
|
||||
$uniqeFields = $this->getUniqeFields();
|
||||
if (SermondistributorHelper::checkArray($uniqeFields))
|
||||
{
|
||||
@ -808,7 +808,7 @@ class SermondistributorModelStatistic extends JModelAdmin
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
// [5505] Alter the title
|
||||
// [5517] Alter the title
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('title' => $title)))
|
||||
|
@ -113,16 +113,16 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// [10780] check in items
|
||||
// [10792] check in items
|
||||
$this->checkInNow();
|
||||
|
||||
// load parent items
|
||||
$items = parent::getItems();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -147,31 +147,31 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// [7637] Get the user object.
|
||||
// [7649] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7639] Create a new query object.
|
||||
// [7651] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7642] Select some fields
|
||||
// [7654] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7649] From the sermondistributor_item table
|
||||
// [7661] From the sermondistributor_item table
|
||||
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
|
||||
|
||||
// [7790] From the sermondistributor_sermon table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_preacher table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7790] From the sermondistributor_series table.
|
||||
// [7802] 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') . ')');
|
||||
|
||||
// [7663] Filter by published state
|
||||
// [7675] Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
{
|
||||
@ -182,21 +182,21 @@ class SermondistributorModelStatistics extends JModelList
|
||||
$query->where('(a.published = 0 OR a.published = 1)');
|
||||
}
|
||||
|
||||
// [7675] Join over the asset groups.
|
||||
// [7687] Join over the asset groups.
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// [7678] Filter by access level.
|
||||
// [7690] Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
}
|
||||
// [7683] Implement View Level Access
|
||||
// [7695] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
// [7760] Filter by search.
|
||||
// [7772] Filter by search.
|
||||
$search = $this->getState('filter.search');
|
||||
if (!empty($search))
|
||||
{
|
||||
@ -211,23 +211,23 @@ class SermondistributorModelStatistics extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// [7994] Filter by sermon.
|
||||
// [8006] Filter by sermon.
|
||||
if ($sermon = $this->getState('filter.sermon'))
|
||||
{
|
||||
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
|
||||
}
|
||||
// [7994] Filter by preacher.
|
||||
// [8006] Filter by preacher.
|
||||
if ($preacher = $this->getState('filter.preacher'))
|
||||
{
|
||||
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
|
||||
}
|
||||
// [7994] Filter by series.
|
||||
// [8006] Filter by series.
|
||||
if ($series = $this->getState('filter.series'))
|
||||
{
|
||||
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
|
||||
}
|
||||
|
||||
// [7719] Add the list ordering clause.
|
||||
// [7731] Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
if ($orderCol != '')
|
||||
@ -245,42 +245,42 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// [7427] setup the query
|
||||
// [7439] setup the query
|
||||
if (SermondistributorHelper::checkArray($pks))
|
||||
{
|
||||
// [7430] Get the user object.
|
||||
// [7442] Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
// [7432] Create a new query object.
|
||||
// [7444] Create a new query object.
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [7435] Select some fields
|
||||
// [7447] Select some fields
|
||||
$query->select('a.*');
|
||||
|
||||
// [7437] From the sermondistributor_statistic table
|
||||
// [7449] From the sermondistributor_statistic table
|
||||
$query->from($db->quoteName('#__sermondistributor_statistic', 'a'));
|
||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
||||
// [7447] Implement View Level Access
|
||||
// [7459] Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_sermondistributor'))
|
||||
{
|
||||
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||
$query->where('a.access IN (' . $groups . ')');
|
||||
}
|
||||
|
||||
// [7454] Order the results by ordering
|
||||
// [7466] Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [7456] Load the items
|
||||
// [7468] Load the items
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [10855] set values to display correctly.
|
||||
// [10867] set values to display correctly.
|
||||
if (SermondistributorHelper::checkArray($items))
|
||||
{
|
||||
// [10858] get user object.
|
||||
// [10870] get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
@ -291,13 +291,13 @@ class SermondistributorModelStatistics extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// [11068] unset the values we don't want exported.
|
||||
// [11080] unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
unset($item->checked_out_time);
|
||||
}
|
||||
}
|
||||
// [11077] Add headers to items array.
|
||||
// [11089] Add headers to items array.
|
||||
$headers = $this->getExImPortHeaders();
|
||||
if (SermondistributorHelper::checkObject($headers))
|
||||
{
|
||||
@ -316,13 +316,13 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
public function getExImPortHeaders()
|
||||
{
|
||||
// [7476] Get a db connection.
|
||||
// [7488] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [7478] get the columns
|
||||
// [7490] get the columns
|
||||
$columns = $db->getTableColumns("#__sermondistributor_statistic");
|
||||
if (SermondistributorHelper::checkArray($columns))
|
||||
{
|
||||
// [7482] remove the headers you don't import/export.
|
||||
// [7494] remove the headers you don't import/export.
|
||||
unset($columns['asset_id']);
|
||||
unset($columns['checked_out']);
|
||||
unset($columns['checked_out_time']);
|
||||
@ -344,7 +344,7 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// [10403] Compile the store id.
|
||||
// [10415] Compile the store id.
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
@ -368,15 +368,15 @@ class SermondistributorModelStatistics extends JModelList
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// [10796] Get set check in time
|
||||
// [10808] Get set check in time
|
||||
$time = JComponentHelper::getParams('com_sermondistributor')->get('check_in');
|
||||
|
||||
if ($time)
|
||||
{
|
||||
|
||||
// [10801] Get a db connection.
|
||||
// [10813] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// [10803] reset query
|
||||
// [10815] reset query
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('*');
|
||||
$query->from($db->quoteName('#__sermondistributor_statistic'));
|
||||
@ -384,24 +384,24 @@ class SermondistributorModelStatistics extends JModelList
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// [10811] Get Yesterdays date
|
||||
// [10823] Get Yesterdays date
|
||||
$date = JFactory::getDate()->modify($time)->toSql();
|
||||
// [10813] reset query
|
||||
// [10825] reset query
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [10815] Fields to update.
|
||||
// [10827] Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
|
||||
$db->quoteName('checked_out') . '=0'
|
||||
);
|
||||
|
||||
// [10820] Conditions for which records should be updated.
|
||||
// [10832] Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('checked_out') . '!=0',
|
||||
$db->quoteName('checked_out_time') . '<\''.$date.'\''
|
||||
);
|
||||
|
||||
// [10825] Check table
|
||||
// [10837] Check table
|
||||
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
@ -53,7 +53,7 @@ class SermondistributorTableHelp_document extends JTable
|
||||
{
|
||||
parent::__construct('#__sermondistributor_help_document', 'id', $db);
|
||||
|
||||
// [4429] Adding History Options
|
||||
// [4441] Adding History Options
|
||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.help_document'));
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class SermondistributorTablePreacher extends JTable
|
||||
{
|
||||
parent::__construct('#__sermondistributor_preacher', 'id', $db);
|
||||
|
||||
// [4429] Adding History Options
|
||||
// [4441] Adding History Options
|
||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.preacher'));
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class SermondistributorTableSeries extends JTable
|
||||
{
|
||||
parent::__construct('#__sermondistributor_series', 'id', $db);
|
||||
|
||||
// [4429] Adding History Options
|
||||
// [4441] Adding History Options
|
||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.series'));
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,10 @@ class SermondistributorTableSermon extends JTable
|
||||
{
|
||||
parent::__construct('#__sermondistributor_sermon', 'id', $db);
|
||||
|
||||
// [4423] Adding Tag Options
|
||||
// [4435] Adding Tag Options
|
||||
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
|
||||
|
||||
// [4429] Adding History Options
|
||||
// [4441] Adding History Options
|
||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.sermon'));
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class SermondistributorTableStatistic extends JTable
|
||||
{
|
||||
parent::__construct('#__sermondistributor_statistic', 'id', $db);
|
||||
|
||||
// [4429] Adding History Options
|
||||
// [4441] Adding History Options
|
||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.statistic'));
|
||||
}
|
||||
|
||||
|
@ -100,93 +100,93 @@ $componentParams = JComponentHelper::getParams('com_sermondistributor');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_pLIjTGg function
|
||||
// #jform_location listeners for location_VcFiOMv function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_pLIjTGg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
pLIjTGg(location_pLIjTGg);
|
||||
var location_VcFiOMv = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
VcFiOMv(location_VcFiOMv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_pLIjTGg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
pLIjTGg(location_pLIjTGg);
|
||||
var location_VcFiOMv = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
VcFiOMv(location_VcFiOMv);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_Ajshqyg function
|
||||
// #jform_location listeners for location_nbWIzGw function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_Ajshqyg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
Ajshqyg(location_Ajshqyg);
|
||||
var location_nbWIzGw = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nbWIzGw(location_nbWIzGw);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_Ajshqyg = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
Ajshqyg(location_Ajshqyg);
|
||||
var location_nbWIzGw = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
nbWIzGw(location_nbWIzGw);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_PDcWyEn function
|
||||
// #jform_type listeners for type_KVFJfFj function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_PDcWyEn = jQuery("#jform_type").val();
|
||||
PDcWyEn(type_PDcWyEn);
|
||||
var type_KVFJfFj = jQuery("#jform_type").val();
|
||||
KVFJfFj(type_KVFJfFj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_PDcWyEn = jQuery("#jform_type").val();
|
||||
PDcWyEn(type_PDcWyEn);
|
||||
var type_KVFJfFj = jQuery("#jform_type").val();
|
||||
KVFJfFj(type_KVFJfFj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_oNdbymx function
|
||||
// #jform_type listeners for type_PVcvKoR function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_oNdbymx = jQuery("#jform_type").val();
|
||||
oNdbymx(type_oNdbymx);
|
||||
var type_PVcvKoR = jQuery("#jform_type").val();
|
||||
PVcvKoR(type_PVcvKoR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_oNdbymx = jQuery("#jform_type").val();
|
||||
oNdbymx(type_oNdbymx);
|
||||
var type_PVcvKoR = jQuery("#jform_type").val();
|
||||
PVcvKoR(type_PVcvKoR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_QQNYqXl function
|
||||
// #jform_type listeners for type_Raenogl function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_QQNYqXl = jQuery("#jform_type").val();
|
||||
QQNYqXl(type_QQNYqXl);
|
||||
var type_Raenogl = jQuery("#jform_type").val();
|
||||
Raenogl(type_Raenogl);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_QQNYqXl = jQuery("#jform_type").val();
|
||||
QQNYqXl(type_QQNYqXl);
|
||||
var type_Raenogl = jQuery("#jform_type").val();
|
||||
Raenogl(type_Raenogl);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_xgjGfFe function
|
||||
// #jform_target listeners for target_roNdXRB function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_xgjGfFe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
xgjGfFe(target_xgjGfFe);
|
||||
var target_roNdXRB = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
roNdXRB(target_roNdXRB);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_xgjGfFe = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
xgjGfFe(target_xgjGfFe);
|
||||
var target_roNdXRB = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
roNdXRB(target_roNdXRB);
|
||||
|
||||
});
|
||||
|
||||
|
@ -92,27 +92,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');
|
||||
// [10513] Built the actions for new and existing records.
|
||||
// [10525] Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('help_document.create') && $isNew)
|
||||
{
|
||||
// [10525] We can create the record.
|
||||
// [10537] We can create the record.
|
||||
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('help_document.edit'))
|
||||
{
|
||||
// [10537] We can save the record.
|
||||
// [10549] We can save the record.
|
||||
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// [10542] Do not creat but cancel.
|
||||
// [10554] Do not creat but cancel.
|
||||
JToolBarHelper::cancel('help_document.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// [10547] We can close it.
|
||||
// [10559] We can close it.
|
||||
JToolBarHelper::cancel('help_document.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ class SermondistributorViewHelp_document extends JViewLegacy
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// [10555] For new records, check the create permission.
|
||||
// [10567] For new records, check the create permission.
|
||||
if ($this->canDo->get('help_document.create'))
|
||||
{
|
||||
JToolBarHelper::apply('help_document.apply', 'JTOOLBAR_APPLY');
|
||||
@ -133,11 +133,11 @@ class SermondistributorViewHelp_document extends JViewLegacy
|
||||
{
|
||||
if ($this->canDo->get('help_document.edit'))
|
||||
{
|
||||
// [10582] We can save the new record
|
||||
// [10594] We can save the new record
|
||||
JToolBarHelper::apply('help_document.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('help_document.save', 'JTOOLBAR_SAVE');
|
||||
// [10585] We can save this record, but check the create permission to see
|
||||
// [10586] if we can return to make a new one.
|
||||
// [10597] We can save this record, but check the create permission to see
|
||||
// [10598] 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);
|
||||
@ -156,7 +156,7 @@ class SermondistributorViewHelp_document extends JViewLegacy
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// [10622] set help url for this view if found
|
||||
// [10634] set help url for this view if found
|
||||
$help_url = SermondistributorHelper::getHelpUrl('help_document');
|
||||
if (SermondistributorHelper::checkString($help_url))
|
||||
{
|
||||
|
@ -202,11 +202,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// [9381] Set Type Selection
|
||||
// [9393] Set Type Selection
|
||||
$this->typeOptions = $this->getTheTypeSelections();
|
||||
if ($this->typeOptions)
|
||||
{
|
||||
// [9385] Type Filter
|
||||
// [9397] Type Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -',
|
||||
'filter_type',
|
||||
@ -215,7 +215,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Type Batch Selection
|
||||
// [9406] Type Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_TYPE_LABEL').' -',
|
||||
'batch[type]',
|
||||
@ -224,11 +224,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9381] Set Location Selection
|
||||
// [9393] Set Location Selection
|
||||
$this->locationOptions = $this->getTheLocationSelections();
|
||||
if ($this->locationOptions)
|
||||
{
|
||||
// [9385] Location Filter
|
||||
// [9397] Location Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -',
|
||||
'filter_location',
|
||||
@ -237,7 +237,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Location Batch Selection
|
||||
// [9406] Location Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_LOCATION_LABEL').' -',
|
||||
'batch[location]',
|
||||
@ -246,11 +246,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9381] Set Admin View Selection
|
||||
// [9393] Set Admin View Selection
|
||||
$this->admin_viewOptions = $this->getTheAdmin_viewSelections();
|
||||
if ($this->admin_viewOptions)
|
||||
{
|
||||
// [9385] Admin View Filter
|
||||
// [9397] Admin View Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -',
|
||||
'filter_admin_view',
|
||||
@ -259,7 +259,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Admin View Batch Selection
|
||||
// [9406] Admin View Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL').' -',
|
||||
'batch[admin_view]',
|
||||
@ -268,11 +268,11 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9381] Set Site View Selection
|
||||
// [9393] Set Site View Selection
|
||||
$this->site_viewOptions = $this->getTheSite_viewSelections();
|
||||
if ($this->site_viewOptions)
|
||||
{
|
||||
// [9385] Site View Filter
|
||||
// [9397] Site View Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -',
|
||||
'filter_site_view',
|
||||
@ -281,7 +281,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Site View Batch Selection
|
||||
// [9406] Site View Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL').' -',
|
||||
'batch[site_view]',
|
||||
@ -342,33 +342,33 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
protected function getTheTypeSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('type'));
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
$query->order($db->quoteName('type') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// [9273] get model
|
||||
// [9285] get model
|
||||
$model = $this->getModel();
|
||||
$results = array_unique($results);
|
||||
$filter = array();
|
||||
foreach ($results as $type)
|
||||
{
|
||||
// [9284] Translate the type selection
|
||||
// [9296] Translate the type selection
|
||||
$text = $model->selectionTranslation($type,'type');
|
||||
// [9286] Now add the type and its text to the options array
|
||||
// [9298] Now add the type and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $type, JText::_($text));
|
||||
}
|
||||
return $filter;
|
||||
@ -378,33 +378,33 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
protected function getTheLocationSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('location'));
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
$query->order($db->quoteName('location') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// [9273] get model
|
||||
// [9285] get model
|
||||
$model = $this->getModel();
|
||||
$results = array_unique($results);
|
||||
$filter = array();
|
||||
foreach ($results as $location)
|
||||
{
|
||||
// [9284] Translate the location selection
|
||||
// [9296] Translate the location selection
|
||||
$text = $model->selectionTranslation($location,'location');
|
||||
// [9286] Now add the location and its text to the options array
|
||||
// [9298] Now add the location and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $location, JText::_($text));
|
||||
}
|
||||
return $filter;
|
||||
@ -414,18 +414,18 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
protected function getTheAdmin_viewSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('admin_view'));
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
$query->order($db->quoteName('admin_view') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
@ -436,7 +436,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
$filter = array();
|
||||
foreach ($results as $admin_view)
|
||||
{
|
||||
// [9291] Now add the admin_view and its text to the options array
|
||||
// [9303] Now add the admin_view and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $admin_view, $admin_view);
|
||||
}
|
||||
return $filter;
|
||||
@ -446,18 +446,18 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
|
||||
protected function getTheSite_viewSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('site_view'));
|
||||
$query->from($db->quoteName('#__sermondistributor_help_document'));
|
||||
$query->order($db->quoteName('site_view') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
@ -468,7 +468,7 @@ class SermondistributorViewHelp_documents extends JViewLegacy
|
||||
$filter = array();
|
||||
foreach ($results as $site_view)
|
||||
{
|
||||
// [9291] Now add the site_view and its text to the options array
|
||||
// [9303] Now add the site_view and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $site_view, $site_view);
|
||||
}
|
||||
return $filter;
|
||||
|
@ -70,8 +70,8 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// [6719] Get Linked view data
|
||||
$this->jfzsermons = $this->get('Jfzsermons');
|
||||
// [6731] Get Linked view data
|
||||
$this->pblsermons = $this->get('Pblsermons');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -95,27 +95,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');
|
||||
// [10513] Built the actions for new and existing records.
|
||||
// [10525] Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('preacher.create') && $isNew)
|
||||
{
|
||||
// [10525] We can create the record.
|
||||
// [10537] We can create the record.
|
||||
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('preacher.edit'))
|
||||
{
|
||||
// [10537] We can save the record.
|
||||
// [10549] We can save the record.
|
||||
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// [10542] Do not creat but cancel.
|
||||
// [10554] Do not creat but cancel.
|
||||
JToolBarHelper::cancel('preacher.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// [10547] We can close it.
|
||||
// [10559] We can close it.
|
||||
JToolBarHelper::cancel('preacher.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// [10555] For new records, check the create permission.
|
||||
// [10567] For new records, check the create permission.
|
||||
if ($this->canDo->get('preacher.create'))
|
||||
{
|
||||
JToolBarHelper::apply('preacher.apply', 'JTOOLBAR_APPLY');
|
||||
@ -136,11 +136,11 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
{
|
||||
if ($this->canDo->get('preacher.edit'))
|
||||
{
|
||||
// [10582] We can save the new record
|
||||
// [10594] We can save the new record
|
||||
JToolBarHelper::apply('preacher.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('preacher.save', 'JTOOLBAR_SAVE');
|
||||
// [10585] We can save this record, but check the create permission to see
|
||||
// [10586] if we can return to make a new one.
|
||||
// [10597] We can save this record, but check the create permission to see
|
||||
// [10598] 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);
|
||||
@ -159,7 +159,7 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// [10622] set help url for this view if found
|
||||
// [10634] set help url for this view if found
|
||||
$help_url = SermondistributorHelper::getHelpUrl('preacher');
|
||||
if (SermondistributorHelper::checkString($help_url))
|
||||
{
|
||||
@ -197,21 +197,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");
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] Use the Metro Style
|
||||
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] Use the Legacy Style.
|
||||
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
|
@ -70,8 +70,8 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// [6719] Get Linked view data
|
||||
$this->ekusermons = $this->get('Ekusermons');
|
||||
// [6731] Get Linked view data
|
||||
$this->skxsermons = $this->get('Skxsermons');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -95,27 +95,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');
|
||||
// [10513] Built the actions for new and existing records.
|
||||
// [10525] Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('series.create') && $isNew)
|
||||
{
|
||||
// [10525] We can create the record.
|
||||
// [10537] We can create the record.
|
||||
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('series.edit'))
|
||||
{
|
||||
// [10537] We can save the record.
|
||||
// [10549] We can save the record.
|
||||
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// [10542] Do not creat but cancel.
|
||||
// [10554] Do not creat but cancel.
|
||||
JToolBarHelper::cancel('series.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// [10547] We can close it.
|
||||
// [10559] We can close it.
|
||||
JToolBarHelper::cancel('series.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// [10555] For new records, check the create permission.
|
||||
// [10567] For new records, check the create permission.
|
||||
if ($this->canDo->get('series.create'))
|
||||
{
|
||||
JToolBarHelper::apply('series.apply', 'JTOOLBAR_APPLY');
|
||||
@ -136,11 +136,11 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
{
|
||||
if ($this->canDo->get('series.edit'))
|
||||
{
|
||||
// [10582] We can save the new record
|
||||
// [10594] We can save the new record
|
||||
JToolBarHelper::apply('series.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('series.save', 'JTOOLBAR_SAVE');
|
||||
// [10585] We can save this record, but check the create permission to see
|
||||
// [10586] if we can return to make a new one.
|
||||
// [10597] We can save this record, but check the create permission to see
|
||||
// [10598] 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);
|
||||
@ -159,7 +159,7 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// [10622] set help url for this view if found
|
||||
// [10634] set help url for this view if found
|
||||
$help_url = SermondistributorHelper::getHelpUrl('series');
|
||||
if (SermondistributorHelper::checkString($help_url))
|
||||
{
|
||||
@ -197,21 +197,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");
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] Use the Metro Style
|
||||
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] Use the Legacy Style.
|
||||
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
|
@ -120,180 +120,180 @@ $componentParams = JComponentHelper::getParams('com_sermondistributor');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_source listeners for source_pRjJkFb function
|
||||
// #jform_source listeners for source_iZRZzQy function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var source_pRjJkFb = jQuery("#jform_source").val();
|
||||
pRjJkFb(source_pRjJkFb);
|
||||
var source_iZRZzQy = jQuery("#jform_source").val();
|
||||
iZRZzQy(source_iZRZzQy);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_pRjJkFb = jQuery("#jform_source").val();
|
||||
pRjJkFb(source_pRjJkFb);
|
||||
var source_iZRZzQy = jQuery("#jform_source").val();
|
||||
iZRZzQy(source_iZRZzQy);
|
||||
|
||||
});
|
||||
|
||||
// #jform_source listeners for source_NvRTrqR function
|
||||
// #jform_source listeners for source_WwtGkmR function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var source_NvRTrqR = jQuery("#jform_source").val();
|
||||
var build_NvRTrqR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
NvRTrqR(source_NvRTrqR,build_NvRTrqR);
|
||||
var source_WwtGkmR = jQuery("#jform_source").val();
|
||||
var build_WwtGkmR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
WwtGkmR(source_WwtGkmR,build_WwtGkmR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_NvRTrqR = jQuery("#jform_source").val();
|
||||
var build_NvRTrqR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
NvRTrqR(source_NvRTrqR,build_NvRTrqR);
|
||||
var source_WwtGkmR = jQuery("#jform_source").val();
|
||||
var build_WwtGkmR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
WwtGkmR(source_WwtGkmR,build_WwtGkmR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_build listeners for build_NvRTrqR function
|
||||
// #jform_build listeners for build_WwtGkmR function
|
||||
jQuery('#jform_build').on('keyup',function()
|
||||
{
|
||||
var source_NvRTrqR = jQuery("#jform_source").val();
|
||||
var build_NvRTrqR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
NvRTrqR(source_NvRTrqR,build_NvRTrqR);
|
||||
var source_WwtGkmR = jQuery("#jform_source").val();
|
||||
var build_WwtGkmR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
WwtGkmR(source_WwtGkmR,build_WwtGkmR);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_build',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_NvRTrqR = jQuery("#jform_source").val();
|
||||
var build_NvRTrqR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
NvRTrqR(source_NvRTrqR,build_NvRTrqR);
|
||||
var source_WwtGkmR = jQuery("#jform_source").val();
|
||||
var build_WwtGkmR = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
WwtGkmR(source_WwtGkmR,build_WwtGkmR);
|
||||
|
||||
});
|
||||
|
||||
// #jform_source listeners for source_UwNFZmF function
|
||||
// #jform_source listeners for source_EnSYbTj function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var source_UwNFZmF = jQuery("#jform_source").val();
|
||||
var build_UwNFZmF = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
UwNFZmF(source_UwNFZmF,build_UwNFZmF);
|
||||
var source_EnSYbTj = jQuery("#jform_source").val();
|
||||
var build_EnSYbTj = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
EnSYbTj(source_EnSYbTj,build_EnSYbTj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_UwNFZmF = jQuery("#jform_source").val();
|
||||
var build_UwNFZmF = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
UwNFZmF(source_UwNFZmF,build_UwNFZmF);
|
||||
var source_EnSYbTj = jQuery("#jform_source").val();
|
||||
var build_EnSYbTj = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
EnSYbTj(source_EnSYbTj,build_EnSYbTj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_build listeners for build_UwNFZmF function
|
||||
// #jform_build listeners for build_EnSYbTj function
|
||||
jQuery('#jform_build').on('keyup',function()
|
||||
{
|
||||
var source_UwNFZmF = jQuery("#jform_source").val();
|
||||
var build_UwNFZmF = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
UwNFZmF(source_UwNFZmF,build_UwNFZmF);
|
||||
var source_EnSYbTj = jQuery("#jform_source").val();
|
||||
var build_EnSYbTj = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
EnSYbTj(source_EnSYbTj,build_EnSYbTj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_build',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_UwNFZmF = jQuery("#jform_source").val();
|
||||
var build_UwNFZmF = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
UwNFZmF(source_UwNFZmF,build_UwNFZmF);
|
||||
var source_EnSYbTj = jQuery("#jform_source").val();
|
||||
var build_EnSYbTj = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
EnSYbTj(source_EnSYbTj,build_EnSYbTj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_build listeners for build_XolZULN function
|
||||
// #jform_build listeners for build_jqQIKTS function
|
||||
jQuery('#jform_build').on('keyup',function()
|
||||
{
|
||||
var build_XolZULN = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_XolZULN = jQuery("#jform_source").val();
|
||||
XolZULN(build_XolZULN,source_XolZULN);
|
||||
var build_jqQIKTS = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_jqQIKTS = jQuery("#jform_source").val();
|
||||
jqQIKTS(build_jqQIKTS,source_jqQIKTS);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_build',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var build_XolZULN = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_XolZULN = jQuery("#jform_source").val();
|
||||
XolZULN(build_XolZULN,source_XolZULN);
|
||||
var build_jqQIKTS = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_jqQIKTS = jQuery("#jform_source").val();
|
||||
jqQIKTS(build_jqQIKTS,source_jqQIKTS);
|
||||
|
||||
});
|
||||
|
||||
// #jform_source listeners for source_XolZULN function
|
||||
// #jform_source listeners for source_jqQIKTS function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var build_XolZULN = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_XolZULN = jQuery("#jform_source").val();
|
||||
XolZULN(build_XolZULN,source_XolZULN);
|
||||
var build_jqQIKTS = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_jqQIKTS = jQuery("#jform_source").val();
|
||||
jqQIKTS(build_jqQIKTS,source_jqQIKTS);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var build_XolZULN = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_XolZULN = jQuery("#jform_source").val();
|
||||
XolZULN(build_XolZULN,source_XolZULN);
|
||||
var build_jqQIKTS = jQuery("#jform_build input[type='radio']:checked").val();
|
||||
var source_jqQIKTS = jQuery("#jform_source").val();
|
||||
jqQIKTS(build_jqQIKTS,source_jqQIKTS);
|
||||
|
||||
});
|
||||
|
||||
// #jform_source listeners for source_BxTsmCr function
|
||||
// #jform_source listeners for source_lAIfOHI function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var source_BxTsmCr = jQuery("#jform_source").val();
|
||||
BxTsmCr(source_BxTsmCr);
|
||||
var source_lAIfOHI = jQuery("#jform_source").val();
|
||||
lAIfOHI(source_lAIfOHI);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_BxTsmCr = jQuery("#jform_source").val();
|
||||
BxTsmCr(source_BxTsmCr);
|
||||
var source_lAIfOHI = jQuery("#jform_source").val();
|
||||
lAIfOHI(source_lAIfOHI);
|
||||
|
||||
});
|
||||
|
||||
// #jform_source listeners for source_DrXlXWE function
|
||||
// #jform_source listeners for source_UkrHisG function
|
||||
jQuery('#jform_source').on('keyup',function()
|
||||
{
|
||||
var source_DrXlXWE = jQuery("#jform_source").val();
|
||||
DrXlXWE(source_DrXlXWE);
|
||||
var source_UkrHisG = jQuery("#jform_source").val();
|
||||
UkrHisG(source_UkrHisG);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var source_DrXlXWE = jQuery("#jform_source").val();
|
||||
DrXlXWE(source_DrXlXWE);
|
||||
var source_UkrHisG = jQuery("#jform_source").val();
|
||||
UkrHisG(source_UkrHisG);
|
||||
|
||||
});
|
||||
|
||||
// #jform_link_type listeners for link_type_jgbBgTf function
|
||||
// #jform_link_type listeners for link_type_xJKoumd function
|
||||
jQuery('#jform_link_type').on('keyup',function()
|
||||
{
|
||||
var link_type_jgbBgTf = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
jgbBgTf(link_type_jgbBgTf);
|
||||
var link_type_xJKoumd = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
xJKoumd(link_type_xJKoumd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_link_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var link_type_jgbBgTf = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
jgbBgTf(link_type_jgbBgTf);
|
||||
var link_type_xJKoumd = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
xJKoumd(link_type_xJKoumd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_link_type listeners for link_type_TvlDXQo function
|
||||
// #jform_link_type listeners for link_type_oUuxich function
|
||||
jQuery('#jform_link_type').on('keyup',function()
|
||||
{
|
||||
var link_type_TvlDXQo = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
TvlDXQo(link_type_TvlDXQo);
|
||||
var link_type_oUuxich = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
oUuxich(link_type_oUuxich);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_link_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var link_type_TvlDXQo = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
TvlDXQo(link_type_TvlDXQo);
|
||||
var link_type_oUuxich = jQuery("#jform_link_type input[type='radio']:checked").val();
|
||||
oUuxich(link_type_oUuxich);
|
||||
|
||||
});
|
||||
|
||||
|
@ -70,8 +70,8 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// [6719] Get Linked view data
|
||||
$this->qfostastics = $this->get('Qfostastics');
|
||||
// [6731] Get Linked view data
|
||||
$this->pomstastics = $this->get('Pomstastics');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -95,27 +95,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');
|
||||
// [10513] Built the actions for new and existing records.
|
||||
// [10525] Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('sermon.create') && $isNew)
|
||||
{
|
||||
// [10525] We can create the record.
|
||||
// [10537] We can create the record.
|
||||
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('sermon.edit'))
|
||||
{
|
||||
// [10537] We can save the record.
|
||||
// [10549] We can save the record.
|
||||
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// [10542] Do not creat but cancel.
|
||||
// [10554] Do not creat but cancel.
|
||||
JToolBarHelper::cancel('sermon.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// [10547] We can close it.
|
||||
// [10559] We can close it.
|
||||
JToolBarHelper::cancel('sermon.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// [10555] For new records, check the create permission.
|
||||
// [10567] For new records, check the create permission.
|
||||
if ($this->canDo->get('sermon.create'))
|
||||
{
|
||||
JToolBarHelper::apply('sermon.apply', 'JTOOLBAR_APPLY');
|
||||
@ -136,11 +136,11 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
{
|
||||
if ($this->canDo->get('sermon.edit'))
|
||||
{
|
||||
// [10582] We can save the new record
|
||||
// [10594] We can save the new record
|
||||
JToolBarHelper::apply('sermon.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('sermon.save', 'JTOOLBAR_SAVE');
|
||||
// [10585] We can save this record, but check the create permission to see
|
||||
// [10586] if we can return to make a new one.
|
||||
// [10597] We can save this record, but check the create permission to see
|
||||
// [10598] 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);
|
||||
@ -159,7 +159,7 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// [10622] set help url for this view if found
|
||||
// [10634] set help url for this view if found
|
||||
$help_url = SermondistributorHelper::getHelpUrl('sermon');
|
||||
if (SermondistributorHelper::checkString($help_url))
|
||||
{
|
||||
@ -197,21 +197,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");
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] Use the Metro Style
|
||||
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.metro.min.css');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] Use the Legacy Style.
|
||||
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
|
||||
{
|
||||
$document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.standalone.min.css');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
|
@ -202,7 +202,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// [9432] Category Filter.
|
||||
// [9444] Category Filter.
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_CATEGORY'),
|
||||
'filter_category_id',
|
||||
@ -211,7 +211,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9442] Category Batch selection.
|
||||
// [9454] Category Batch selection.
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY'),
|
||||
'batch[category]',
|
||||
@ -219,11 +219,11 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// [9347] Set Preacher Name Selection
|
||||
// [9359] Set Preacher Name Selection
|
||||
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->getOptions();
|
||||
if ($this->preacherNameOptions)
|
||||
{
|
||||
// [9351] Preacher Name Filter
|
||||
// [9363] Preacher Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -',
|
||||
'filter_preacher',
|
||||
@ -232,7 +232,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9360] Preacher Name Batch Selection
|
||||
// [9372] Preacher Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL').' -',
|
||||
'batch[preacher]',
|
||||
@ -241,11 +241,11 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9347] Set Series Name Selection
|
||||
// [9359] Set Series Name Selection
|
||||
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->getOptions();
|
||||
if ($this->seriesNameOptions)
|
||||
{
|
||||
// [9351] Series Name Filter
|
||||
// [9363] Series Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -',
|
||||
'filter_series',
|
||||
@ -254,7 +254,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9360] Series Name Batch Selection
|
||||
// [9372] Series Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL').' -',
|
||||
'batch[series]',
|
||||
@ -263,11 +263,11 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9381] Set Link Type Selection
|
||||
// [9393] Set Link Type Selection
|
||||
$this->link_typeOptions = $this->getTheLink_typeSelections();
|
||||
if ($this->link_typeOptions)
|
||||
{
|
||||
// [9385] Link Type Filter
|
||||
// [9397] Link Type Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -',
|
||||
'filter_link_type',
|
||||
@ -276,7 +276,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Link Type Batch Selection
|
||||
// [9406] Link Type Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL').' -',
|
||||
'batch[link_type]',
|
||||
@ -285,11 +285,11 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9381] Set Source Selection
|
||||
// [9393] Set Source Selection
|
||||
$this->sourceOptions = $this->getTheSourceSelections();
|
||||
if ($this->sourceOptions)
|
||||
{
|
||||
// [9385] Source Filter
|
||||
// [9397] Source Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -',
|
||||
'filter_source',
|
||||
@ -298,7 +298,7 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9394] Source Batch Selection
|
||||
// [9406] Source Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL').' -',
|
||||
'batch[source]',
|
||||
@ -361,33 +361,33 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
protected function getTheLink_typeSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('link_type'));
|
||||
$query->from($db->quoteName('#__sermondistributor_sermon'));
|
||||
$query->order($db->quoteName('link_type') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// [9273] get model
|
||||
// [9285] get model
|
||||
$model = $this->getModel();
|
||||
$results = array_unique($results);
|
||||
$filter = array();
|
||||
foreach ($results as $link_type)
|
||||
{
|
||||
// [9284] Translate the link_type selection
|
||||
// [9296] Translate the link_type selection
|
||||
$text = $model->selectionTranslation($link_type,'link_type');
|
||||
// [9286] Now add the link_type and its text to the options array
|
||||
// [9298] Now add the link_type and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $link_type, JText::_($text));
|
||||
}
|
||||
return $filter;
|
||||
@ -397,33 +397,33 @@ class SermondistributorViewSermons extends JViewLegacy
|
||||
|
||||
protected function getTheSourceSelections()
|
||||
{
|
||||
// [9257] Get a db connection.
|
||||
// [9269] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [9259] Create a new query object.
|
||||
// [9271] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [9261] Select the text.
|
||||
// [9273] Select the text.
|
||||
$query->select($db->quoteName('source'));
|
||||
$query->from($db->quoteName('#__sermondistributor_sermon'));
|
||||
$query->order($db->quoteName('source') . ' ASC');
|
||||
|
||||
// [9265] Reset the query using our newly populated query object.
|
||||
// [9277] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// [9273] get model
|
||||
// [9285] get model
|
||||
$model = $this->getModel();
|
||||
$results = array_unique($results);
|
||||
$filter = array();
|
||||
foreach ($results as $source)
|
||||
{
|
||||
// [9284] Translate the source selection
|
||||
// [9296] Translate the source selection
|
||||
$text = $model->selectionTranslation($source,'source');
|
||||
// [9286] Now add the source and its text to the options array
|
||||
// [9298] Now add the source and its text to the options array
|
||||
$filter[] = JHtml::_('select.option', $source, JText::_($text));
|
||||
}
|
||||
return $filter;
|
||||
|
@ -92,27 +92,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');
|
||||
// [10513] Built the actions for new and existing records.
|
||||
// [10525] Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('statistic.create') && $isNew)
|
||||
{
|
||||
// [10525] We can create the record.
|
||||
// [10537] We can create the record.
|
||||
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('statistic.edit'))
|
||||
{
|
||||
// [10537] We can save the record.
|
||||
// [10549] We can save the record.
|
||||
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// [10542] Do not creat but cancel.
|
||||
// [10554] Do not creat but cancel.
|
||||
JToolBarHelper::cancel('statistic.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// [10547] We can close it.
|
||||
// [10559] We can close it.
|
||||
JToolBarHelper::cancel('statistic.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ class SermondistributorViewStatistic extends JViewLegacy
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// [10555] For new records, check the create permission.
|
||||
// [10567] For new records, check the create permission.
|
||||
if ($this->canDo->get('statistic.create'))
|
||||
{
|
||||
JToolBarHelper::apply('statistic.apply', 'JTOOLBAR_APPLY');
|
||||
@ -133,11 +133,11 @@ class SermondistributorViewStatistic extends JViewLegacy
|
||||
{
|
||||
if ($this->canDo->get('statistic.edit'))
|
||||
{
|
||||
// [10582] We can save the new record
|
||||
// [10594] We can save the new record
|
||||
JToolBarHelper::apply('statistic.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('statistic.save', 'JTOOLBAR_SAVE');
|
||||
// [10585] We can save this record, but check the create permission to see
|
||||
// [10586] if we can return to make a new one.
|
||||
// [10597] We can save this record, but check the create permission to see
|
||||
// [10598] 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);
|
||||
@ -156,7 +156,7 @@ class SermondistributorViewStatistic extends JViewLegacy
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// [10622] set help url for this view if found
|
||||
// [10634] set help url for this view if found
|
||||
$help_url = SermondistributorHelper::getHelpUrl('statistic');
|
||||
if (SermondistributorHelper::checkString($help_url))
|
||||
{
|
||||
|
@ -202,11 +202,11 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// [9347] Set Sermon Name Selection
|
||||
// [9359] Set Sermon Name Selection
|
||||
$this->sermonNameOptions = JFormHelper::loadFieldType('Sermon')->getOptions();
|
||||
if ($this->sermonNameOptions)
|
||||
{
|
||||
// [9351] Sermon Name Filter
|
||||
// [9363] Sermon Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -',
|
||||
'filter_sermon',
|
||||
@ -215,7 +215,7 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9360] Sermon Name Batch Selection
|
||||
// [9372] Sermon Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL').' -',
|
||||
'batch[sermon]',
|
||||
@ -224,11 +224,11 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9347] Set Preacher Name Selection
|
||||
// [9359] Set Preacher Name Selection
|
||||
$this->preacherNameOptions = JFormHelper::loadFieldType('Preachers')->getOptions();
|
||||
if ($this->preacherNameOptions)
|
||||
{
|
||||
// [9351] Preacher Name Filter
|
||||
// [9363] Preacher Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -',
|
||||
'filter_preacher',
|
||||
@ -237,7 +237,7 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9360] Preacher Name Batch Selection
|
||||
// [9372] Preacher Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL').' -',
|
||||
'batch[preacher]',
|
||||
@ -246,11 +246,11 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [9347] Set Series Name Selection
|
||||
// [9359] Set Series Name Selection
|
||||
$this->seriesNameOptions = JFormHelper::loadFieldType('Series')->getOptions();
|
||||
if ($this->seriesNameOptions)
|
||||
{
|
||||
// [9351] Series Name Filter
|
||||
// [9363] Series Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -',
|
||||
'filter_series',
|
||||
@ -259,7 +259,7 @@ class SermondistributorViewStatistics extends JViewLegacy
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// [9360] Series Name Batch Selection
|
||||
// [9372] Series Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL').' -',
|
||||
'batch[series]',
|
||||
|
344
script.php
344
script.php
@ -53,536 +53,536 @@ class com_sermondistributorInstallerScript
|
||||
*/
|
||||
function uninstall($parent)
|
||||
{
|
||||
// [4454] Get Application object
|
||||
// [4466] Get Application object
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// [4456] Get The Database object
|
||||
// [4468] Get The Database object
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Preacher alias is found
|
||||
// [4482] Where Preacher alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$preacher_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($preacher_found)
|
||||
{
|
||||
// [4479] Since there are load the needed preacher type ids
|
||||
// [4491] Since there are load the needed preacher type ids
|
||||
$preacher_ids = $db->loadColumn();
|
||||
// [4483] Remove Preacher from the content type table
|
||||
// [4495] Remove Preacher from the content type table
|
||||
$preacher_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($preacher_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Preacher items
|
||||
// [4502] Execute the query to remove Preacher items
|
||||
$preacher_done = $db->execute();
|
||||
if ($preacher_done);
|
||||
{
|
||||
// [4494] If succesfully remove Preacher add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Preacher items from the contentitem tag map table
|
||||
// [4512] Remove Preacher items from the contentitem tag map table
|
||||
$preacher_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.preacher') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($preacher_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Preacher items
|
||||
// [4519] Execute the query to remove Preacher items
|
||||
$preacher_done = $db->execute();
|
||||
if ($preacher_done);
|
||||
{
|
||||
// [4511] If succesfully remove Preacher add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Preacher items from the ucm content table
|
||||
// [4529] Remove Preacher items from the ucm content table
|
||||
$preacher_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.preacher') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($preacher_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Preacher items
|
||||
// [4536] Execute the query to remove Preacher items
|
||||
$preacher_done = $db->execute();
|
||||
if ($preacher_done);
|
||||
{
|
||||
// [4528] If succesfully remove Preacher add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Preacher items are cleared from DB
|
||||
// [4546] Make sure that all the Preacher items are cleared from DB
|
||||
foreach ($preacher_ids as $preacher_id)
|
||||
{
|
||||
// [4539] Remove Preacher items from the ucm base table
|
||||
// [4551] Remove Preacher items from the ucm base table
|
||||
$preacher_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $preacher_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($preacher_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Preacher items
|
||||
// [4558] Execute the query to remove Preacher items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Preacher items from the ucm history table
|
||||
// [4562] Remove Preacher items from the ucm history table
|
||||
$preacher_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $preacher_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($preacher_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Preacher items
|
||||
// [4569] Execute the query to remove Preacher items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Sermon alias is found
|
||||
// [4482] Where Sermon alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$sermon_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($sermon_found)
|
||||
{
|
||||
// [4479] Since there are load the needed sermon type ids
|
||||
// [4491] Since there are load the needed sermon type ids
|
||||
$sermon_ids = $db->loadColumn();
|
||||
// [4483] Remove Sermon from the content type table
|
||||
// [4495] Remove Sermon from the content type table
|
||||
$sermon_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($sermon_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Sermon items
|
||||
// [4502] Execute the query to remove Sermon items
|
||||
$sermon_done = $db->execute();
|
||||
if ($sermon_done);
|
||||
{
|
||||
// [4494] If succesfully remove Sermon add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Sermon items from the contentitem tag map table
|
||||
// [4512] Remove Sermon items from the contentitem tag map table
|
||||
$sermon_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermon') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($sermon_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Sermon items
|
||||
// [4519] Execute the query to remove Sermon items
|
||||
$sermon_done = $db->execute();
|
||||
if ($sermon_done);
|
||||
{
|
||||
// [4511] If succesfully remove Sermon add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Sermon items from the ucm content table
|
||||
// [4529] Remove Sermon items from the ucm content table
|
||||
$sermon_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.sermon') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($sermon_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Sermon items
|
||||
// [4536] Execute the query to remove Sermon items
|
||||
$sermon_done = $db->execute();
|
||||
if ($sermon_done);
|
||||
{
|
||||
// [4528] If succesfully remove Sermon add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Sermon items are cleared from DB
|
||||
// [4546] Make sure that all the Sermon items are cleared from DB
|
||||
foreach ($sermon_ids as $sermon_id)
|
||||
{
|
||||
// [4539] Remove Sermon items from the ucm base table
|
||||
// [4551] Remove Sermon items from the ucm base table
|
||||
$sermon_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($sermon_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Sermon items
|
||||
// [4558] Execute the query to remove Sermon items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Sermon items from the ucm history table
|
||||
// [4562] Remove Sermon items from the ucm history table
|
||||
$sermon_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($sermon_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Sermon items
|
||||
// [4569] Execute the query to remove Sermon items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Sermon catid alias is found
|
||||
// [4482] Where Sermon catid alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$sermon_catid_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($sermon_catid_found)
|
||||
{
|
||||
// [4479] Since there are load the needed sermon_catid type ids
|
||||
// [4491] Since there are load the needed sermon_catid type ids
|
||||
$sermon_catid_ids = $db->loadColumn();
|
||||
// [4483] Remove Sermon catid from the content type table
|
||||
// [4495] Remove Sermon catid from the content type table
|
||||
$sermon_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($sermon_catid_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Sermon catid items
|
||||
// [4502] Execute the query to remove Sermon catid items
|
||||
$sermon_catid_done = $db->execute();
|
||||
if ($sermon_catid_done);
|
||||
{
|
||||
// [4494] If succesfully remove Sermon catid add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Sermon catid items from the contentitem tag map table
|
||||
// [4512] Remove Sermon catid items from the contentitem tag map table
|
||||
$sermon_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.sermons.category') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($sermon_catid_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Sermon catid items
|
||||
// [4519] Execute the query to remove Sermon catid items
|
||||
$sermon_catid_done = $db->execute();
|
||||
if ($sermon_catid_done);
|
||||
{
|
||||
// [4511] If succesfully remove Sermon catid add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Sermon catid items from the ucm content table
|
||||
// [4529] Remove Sermon catid items from the ucm content table
|
||||
$sermon_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.sermons.category') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($sermon_catid_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Sermon catid items
|
||||
// [4536] Execute the query to remove Sermon catid items
|
||||
$sermon_catid_done = $db->execute();
|
||||
if ($sermon_catid_done);
|
||||
{
|
||||
// [4528] If succesfully remove Sermon catid add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Sermon catid items are cleared from DB
|
||||
// [4546] Make sure that all the Sermon catid items are cleared from DB
|
||||
foreach ($sermon_catid_ids as $sermon_catid_id)
|
||||
{
|
||||
// [4539] Remove Sermon catid items from the ucm base table
|
||||
// [4551] Remove Sermon catid items from the ucm base table
|
||||
$sermon_catid_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_catid_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($sermon_catid_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Sermon catid items
|
||||
// [4558] Execute the query to remove Sermon catid items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Sermon catid items from the ucm history table
|
||||
// [4562] Remove Sermon catid items from the ucm history table
|
||||
$sermon_catid_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $sermon_catid_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($sermon_catid_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Sermon catid items
|
||||
// [4569] Execute the query to remove Sermon catid items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Series alias is found
|
||||
// [4482] Where Series alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$series_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($series_found)
|
||||
{
|
||||
// [4479] Since there are load the needed series type ids
|
||||
// [4491] Since there are load the needed series type ids
|
||||
$series_ids = $db->loadColumn();
|
||||
// [4483] Remove Series from the content type table
|
||||
// [4495] Remove Series from the content type table
|
||||
$series_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($series_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Series items
|
||||
// [4502] Execute the query to remove Series items
|
||||
$series_done = $db->execute();
|
||||
if ($series_done);
|
||||
{
|
||||
// [4494] If succesfully remove Series add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Series items from the contentitem tag map table
|
||||
// [4512] Remove Series items from the contentitem tag map table
|
||||
$series_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.series') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($series_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Series items
|
||||
// [4519] Execute the query to remove Series items
|
||||
$series_done = $db->execute();
|
||||
if ($series_done);
|
||||
{
|
||||
// [4511] If succesfully remove Series add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Series items from the ucm content table
|
||||
// [4529] Remove Series items from the ucm content table
|
||||
$series_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.series') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($series_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Series items
|
||||
// [4536] Execute the query to remove Series items
|
||||
$series_done = $db->execute();
|
||||
if ($series_done);
|
||||
{
|
||||
// [4528] If succesfully remove Series add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Series items are cleared from DB
|
||||
// [4546] Make sure that all the Series items are cleared from DB
|
||||
foreach ($series_ids as $series_id)
|
||||
{
|
||||
// [4539] Remove Series items from the ucm base table
|
||||
// [4551] Remove Series items from the ucm base table
|
||||
$series_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $series_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($series_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Series items
|
||||
// [4558] Execute the query to remove Series items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Series items from the ucm history table
|
||||
// [4562] Remove Series items from the ucm history table
|
||||
$series_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $series_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($series_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Series items
|
||||
// [4569] Execute the query to remove Series items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Statistic alias is found
|
||||
// [4482] Where Statistic alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$statistic_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($statistic_found)
|
||||
{
|
||||
// [4479] Since there are load the needed statistic type ids
|
||||
// [4491] Since there are load the needed statistic type ids
|
||||
$statistic_ids = $db->loadColumn();
|
||||
// [4483] Remove Statistic from the content type table
|
||||
// [4495] Remove Statistic from the content type table
|
||||
$statistic_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($statistic_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Statistic items
|
||||
// [4502] Execute the query to remove Statistic items
|
||||
$statistic_done = $db->execute();
|
||||
if ($statistic_done);
|
||||
{
|
||||
// [4494] If succesfully remove Statistic add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Statistic items from the contentitem tag map table
|
||||
// [4512] Remove Statistic items from the contentitem tag map table
|
||||
$statistic_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.statistic') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($statistic_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Statistic items
|
||||
// [4519] Execute the query to remove Statistic items
|
||||
$statistic_done = $db->execute();
|
||||
if ($statistic_done);
|
||||
{
|
||||
// [4511] If succesfully remove Statistic add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Statistic items from the ucm content table
|
||||
// [4529] Remove Statistic items from the ucm content table
|
||||
$statistic_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.statistic') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($statistic_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Statistic items
|
||||
// [4536] Execute the query to remove Statistic items
|
||||
$statistic_done = $db->execute();
|
||||
if ($statistic_done);
|
||||
{
|
||||
// [4528] If succesfully remove Statistic add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Statistic items are cleared from DB
|
||||
// [4546] Make sure that all the Statistic items are cleared from DB
|
||||
foreach ($statistic_ids as $statistic_id)
|
||||
{
|
||||
// [4539] Remove Statistic items from the ucm base table
|
||||
// [4551] Remove Statistic items from the ucm base table
|
||||
$statistic_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $statistic_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($statistic_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Statistic items
|
||||
// [4558] Execute the query to remove Statistic items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Statistic items from the ucm history table
|
||||
// [4562] Remove Statistic items from the ucm history table
|
||||
$statistic_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $statistic_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($statistic_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Statistic items
|
||||
// [4569] Execute the query to remove Statistic items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4465] Create a new query object.
|
||||
// [4477] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// [4467] Select id from content type table
|
||||
// [4479] Select id from content type table
|
||||
$query->select($db->quoteName('type_id'));
|
||||
$query->from($db->quoteName('#__content_types'));
|
||||
// [4470] Where Help_document alias is found
|
||||
// [4482] Where Help_document alias is found
|
||||
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
|
||||
$db->setQuery($query);
|
||||
// [4473] Execute query to see if alias is found
|
||||
// [4485] Execute query to see if alias is found
|
||||
$db->execute();
|
||||
$help_document_found = $db->getNumRows();
|
||||
// [4476] Now check if there were any rows
|
||||
// [4488] Now check if there were any rows
|
||||
if ($help_document_found)
|
||||
{
|
||||
// [4479] Since there are load the needed help_document type ids
|
||||
// [4491] Since there are load the needed help_document type ids
|
||||
$help_document_ids = $db->loadColumn();
|
||||
// [4483] Remove Help_document from the content type table
|
||||
// [4495] Remove Help_document from the content type table
|
||||
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
|
||||
// [4485] Create a new query object.
|
||||
// [4497] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__content_types'));
|
||||
$query->where($help_document_condition);
|
||||
$db->setQuery($query);
|
||||
// [4490] Execute the query to remove Help_document items
|
||||
// [4502] Execute the query to remove Help_document items
|
||||
$help_document_done = $db->execute();
|
||||
if ($help_document_done);
|
||||
{
|
||||
// [4494] If succesfully remove Help_document add queued success message.
|
||||
// [4506] 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'));
|
||||
}
|
||||
|
||||
// [4500] Remove Help_document items from the contentitem tag map table
|
||||
// [4512] Remove Help_document items from the contentitem tag map table
|
||||
$help_document_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_sermondistributor.help_document') );
|
||||
// [4502] Create a new query object.
|
||||
// [4514] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__contentitem_tag_map'));
|
||||
$query->where($help_document_condition);
|
||||
$db->setQuery($query);
|
||||
// [4507] Execute the query to remove Help_document items
|
||||
// [4519] Execute the query to remove Help_document items
|
||||
$help_document_done = $db->execute();
|
||||
if ($help_document_done);
|
||||
{
|
||||
// [4511] If succesfully remove Help_document add queued success message.
|
||||
// [4523] 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'));
|
||||
}
|
||||
|
||||
// [4517] Remove Help_document items from the ucm content table
|
||||
// [4529] Remove Help_document items from the ucm content table
|
||||
$help_document_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_sermondistributor.help_document') );
|
||||
// [4519] Create a new query object.
|
||||
// [4531] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_content'));
|
||||
$query->where($help_document_condition);
|
||||
$db->setQuery($query);
|
||||
// [4524] Execute the query to remove Help_document items
|
||||
// [4536] Execute the query to remove Help_document items
|
||||
$help_document_done = $db->execute();
|
||||
if ($help_document_done);
|
||||
{
|
||||
// [4528] If succesfully remove Help_document add queued success message.
|
||||
// [4540] 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'));
|
||||
}
|
||||
|
||||
// [4534] Make sure that all the Help_document items are cleared from DB
|
||||
// [4546] Make sure that all the Help_document items are cleared from DB
|
||||
foreach ($help_document_ids as $help_document_id)
|
||||
{
|
||||
// [4539] Remove Help_document items from the ucm base table
|
||||
// [4551] Remove Help_document items from the ucm base table
|
||||
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
|
||||
// [4541] Create a new query object.
|
||||
// [4553] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_base'));
|
||||
$query->where($help_document_condition);
|
||||
$db->setQuery($query);
|
||||
// [4546] Execute the query to remove Help_document items
|
||||
// [4558] Execute the query to remove Help_document items
|
||||
$db->execute();
|
||||
|
||||
// [4550] Remove Help_document items from the ucm history table
|
||||
// [4562] Remove Help_document items from the ucm history table
|
||||
$help_document_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $help_document_id);
|
||||
// [4552] Create a new query object.
|
||||
// [4564] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__ucm_history'));
|
||||
$query->where($help_document_condition);
|
||||
$db->setQuery($query);
|
||||
// [4557] Execute the query to remove Help_document items
|
||||
// [4569] Execute the query to remove Help_document items
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// [4565] If All related items was removed queued success message.
|
||||
// [4577] 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'));
|
||||
|
||||
// [4570] Remove sermondistributor assets from the assets table
|
||||
// [4582] Remove sermondistributor assets from the assets table
|
||||
$sermondistributor_condition = array( $db->quoteName('name') . ' LIKE ' . $db->quote('com_sermondistributor%') );
|
||||
|
||||
// [4572] Create a new query object.
|
||||
// [4584] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->delete($db->quoteName('#__assets'));
|
||||
$query->where($sermondistributor_condition);
|
||||
@ -590,7 +590,7 @@ class com_sermondistributorInstallerScript
|
||||
$help_document_done = $db->execute();
|
||||
if ($help_document_done);
|
||||
{
|
||||
// [4580] If succesfully remove sermondistributor add queued success message.
|
||||
// [4592] If succesfully remove sermondistributor add queued success message.
|
||||
$app->enqueueMessage(JText::_('All related items was removed from the <b>#__assets</b> table'));
|
||||
}
|
||||
|
||||
@ -644,11 +644,11 @@ class com_sermondistributorInstallerScript
|
||||
if ($type == 'install')
|
||||
{
|
||||
|
||||
// [4626] Get The Database object
|
||||
// [4638] Get The Database object
|
||||
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [4633] Create the preacher content type object.
|
||||
// [4645] Create the preacher content type object.
|
||||
$preacher = new stdClass();
|
||||
$preacher->type_title = 'Sermondistributor Preacher';
|
||||
$preacher->type_alias = 'com_sermondistributor.preacher';
|
||||
@ -657,10 +657,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"}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$preacherInserted = $db->insertObject('#__content_types', $preacher);
|
||||
|
||||
// [4633] Create the sermon content type object.
|
||||
// [4645] Create the sermon content type object.
|
||||
$sermon = new stdClass();
|
||||
$sermon->type_title = 'Sermondistributor Sermon';
|
||||
$sermon->type_alias = 'com_sermondistributor.sermon';
|
||||
@ -669,10 +669,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": ""}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$sermonInserted = $db->insertObject('#__content_types', $sermon);
|
||||
|
||||
// [4633] Create the sermon catagory content type object.
|
||||
// [4645] 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';
|
||||
@ -681,10 +681,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"}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$sermon_catagoryInserted = $db->insertObject('#__content_types', $sermon_catagory);
|
||||
|
||||
// [4633] Create the series content type object.
|
||||
// [4645] Create the series content type object.
|
||||
$series = new stdClass();
|
||||
$series->type_title = 'Sermondistributor Series';
|
||||
$series->type_alias = 'com_sermondistributor.series';
|
||||
@ -693,10 +693,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"}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$seriesInserted = $db->insertObject('#__content_types', $series);
|
||||
|
||||
// [4633] Create the statistic content type object.
|
||||
// [4645] Create the statistic content type object.
|
||||
$statistic = new stdClass();
|
||||
$statistic->type_title = 'Sermondistributor Statistic';
|
||||
$statistic->type_alias = 'com_sermondistributor.statistic';
|
||||
@ -705,10 +705,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"}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$statisticInserted = $db->insertObject('#__content_types', $statistic);
|
||||
|
||||
// [4633] Create the help_document content type object.
|
||||
// [4645] 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';
|
||||
@ -717,19 +717,19 @@ 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"}]}';
|
||||
|
||||
// [4639] Insert the object into the content types table.
|
||||
// [4651] Insert the object into the content types table.
|
||||
$help_documentInserted = $db->insertObject('#__content_types', $help_document);
|
||||
|
||||
|
||||
// [4651] Install the global extenstion params.
|
||||
// [4663] Install the global extenstion params.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [4659] Field to update.
|
||||
// [4671] 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":""}'),
|
||||
);
|
||||
|
||||
// [4663] Condition.
|
||||
// [4675] Condition.
|
||||
$conditions = array(
|
||||
$db->quoteName('element') . ' = ' . $db->quote('com_sermondistributor')
|
||||
);
|
||||
|
@ -44,18 +44,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'sermon' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=sermon&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=sermon';
|
||||
}
|
||||
if ($catid > 1)
|
||||
@ -85,18 +85,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'preachers' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=preachers&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=preachers';
|
||||
}
|
||||
if ($catid > 1)
|
||||
@ -126,18 +126,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'preacher' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=preacher&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=preacher';
|
||||
}
|
||||
if ($catid > 1)
|
||||
@ -167,18 +167,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'categories' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=categories&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=categories';
|
||||
}
|
||||
|
||||
@ -197,18 +197,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'category' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=category&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=category';
|
||||
}
|
||||
|
||||
@ -227,18 +227,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'serieslist' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=serieslist&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=serieslist';
|
||||
}
|
||||
if ($catid > 1)
|
||||
@ -268,18 +268,18 @@ abstract class SermondistributorHelperRoute
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
// [4813] Initialize the needel array.
|
||||
// [4825] Initialize the needel array.
|
||||
$needles = array(
|
||||
'series' => array((int) $id)
|
||||
);
|
||||
// [4817] Create the link
|
||||
// [4829] Create the link
|
||||
$link = 'index.php?option=com_sermondistributor&view=series&id='. $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [4822] Initialize the needel array.
|
||||
// [4834] Initialize the needel array.
|
||||
$needles = array();
|
||||
// [4824]Create the link but don't add the id.
|
||||
// [4836]Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_sermondistributor&view=series';
|
||||
}
|
||||
if ($catid > 1)
|
||||
|
@ -561,23 +561,23 @@ abstract class SermondistributorHelper
|
||||
$targetgroups = json_decode($help->groups, true);
|
||||
if (!array_intersect($targetgroups, $groups))
|
||||
{
|
||||
// [1470] if user not in those target groups then remove the item
|
||||
// [1482] if user not in those target groups then remove the item
|
||||
unset($helps[$nr]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// [1475] set the return type
|
||||
// [1487] set the return type
|
||||
switch ($help->type)
|
||||
{
|
||||
// [1478] set joomla article
|
||||
// [1490] set joomla article
|
||||
case 1:
|
||||
return self::loadArticleLink($help->article);
|
||||
break;
|
||||
// [1482] set help text
|
||||
// [1494] set help text
|
||||
case 2:
|
||||
return self::loadHelpTextLink($help->id);
|
||||
break;
|
||||
// [1486] set Link
|
||||
// [1498] set Link
|
||||
case 3:
|
||||
return $help->url;
|
||||
break;
|
||||
@ -827,7 +827,7 @@ abstract class SermondistributorHelper
|
||||
{
|
||||
if (strpos($content,'class="uk-') !== false)
|
||||
{
|
||||
// [2714] reset
|
||||
// [2726] reset
|
||||
$temp = array();
|
||||
foreach (self::$uk_components as $looking => $add)
|
||||
{
|
||||
@ -836,15 +836,15 @@ abstract class SermondistributorHelper
|
||||
$temp[] = $looking;
|
||||
}
|
||||
}
|
||||
// [2723] make sure uikit is loaded to config
|
||||
// [2735] make sure uikit is loaded to config
|
||||
if (strpos($content,'class="uk-') !== false)
|
||||
{
|
||||
self::$uikit = true;
|
||||
}
|
||||
// [2728] sorter
|
||||
// [2740] sorter
|
||||
if (self::checkArray($temp))
|
||||
{
|
||||
// [2731] merger
|
||||
// [2743] merger
|
||||
if (self::checkArray($classes))
|
||||
{
|
||||
$newTemp = array_merge($temp,$classes);
|
||||
|
@ -43,7 +43,7 @@ class SermondistributorModelAjax extends JModelList
|
||||
|
||||
}
|
||||
|
||||
// [9156] Used in sermon
|
||||
// [9168] Used in sermon
|
||||
/**
|
||||
* Check and Set Dropbox local listing
|
||||
**/
|
||||
|
@ -65,13 +65,13 @@ class SermondistributorModelCategories extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__categories as a
|
||||
// [1901] 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')));
|
||||
@ -81,7 +81,7 @@ class SermondistributorModelCategories extends JModelList
|
||||
$query->where('a.extension = "com_sermondistributor.sermons"');
|
||||
$query->order('a.title ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -107,12 +107,12 @@ class SermondistributorModelCategories extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
// [2139] set idCatidSermonB to the $item object.
|
||||
// [2151] set idCatidSermonB to the $item object.
|
||||
$item->idCatidSermonB = $this->getIdCatidSermonBced_B($item->id);
|
||||
}
|
||||
|
||||
@ -128,13 +128,13 @@ class SermondistributorModelCategories extends JModelList
|
||||
*/
|
||||
public function getIdCatidSermonBced_B($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_sermon as b
|
||||
// [2835] Get from #__sermondistributor_sermon as b
|
||||
$query->select($db->quoteName(
|
||||
array('b.id'),
|
||||
array('id')));
|
||||
@ -143,11 +143,11 @@ class SermondistributorModelCategories extends JModelList
|
||||
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
|
||||
$query->where('b.published = 1');
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
|
@ -65,37 +65,37 @@ class SermondistributorModelCategory extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as c
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as d
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__categories as b
|
||||
// [1901] 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) . ')');
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -112,7 +112,7 @@ class SermondistributorModelCategory extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -138,26 +138,26 @@ class SermondistributorModelCategory extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] 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))
|
||||
{
|
||||
// [2091] Decode local_files
|
||||
// [2103] Decode local_files
|
||||
$item->local_files = json_decode($item->local_files, true);
|
||||
}
|
||||
if (SermondistributorHelper::checkString($item->manual_files))
|
||||
{
|
||||
// [2091] Decode manual_files
|
||||
// [2103] Decode manual_files
|
||||
$item->manual_files = json_decode($item->manual_files, true);
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$item->description = JHtml::_('content.prepare',$item->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
|
||||
// [2139] set idSermonStatisticE to the $item object.
|
||||
// [2151] set idSermonStatisticE to the $item object.
|
||||
$item->idSermonStatisticE = $this->getIdSermonStatisticBcea_E($item->id);
|
||||
}
|
||||
|
||||
@ -210,24 +210,24 @@ class SermondistributorModelCategory extends JModelList
|
||||
*/
|
||||
public function getIdSermonStatisticBcea_E($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_statistic as e
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
@ -255,18 +255,18 @@ class SermondistributorModelCategory extends JModelList
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
}
|
||||
// [2439] Get a db connection.
|
||||
// [2451] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2441] Create a new query object.
|
||||
// [2453] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__categories as a
|
||||
// [1901] 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'));
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -283,19 +283,19 @@ class SermondistributorModelCategory extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.title ASC');
|
||||
|
||||
// [2452] Reset the query using our newly populated query object.
|
||||
// [2464] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
// [2454] Load the results as a stdClass object.
|
||||
// [2466] Load the results as a stdClass object.
|
||||
$data = $db->loadObject();
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [2139] set idCatidSermonB to the $data object.
|
||||
// [2151] set idCatidSermonB to the $data object.
|
||||
$data->idCatidSermonB = $this->getIdCatidSermonFbdf_B($data->id);
|
||||
|
||||
// [2553] return data object.
|
||||
// [2565] return data object.
|
||||
return $data;
|
||||
}
|
||||
|
||||
@ -307,32 +307,32 @@ class SermondistributorModelCategory extends JModelList
|
||||
*/
|
||||
public function getIdCatidSermonFbdf_B($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_sermon as b
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// [2933] Convert the parameter fields into objects.
|
||||
// [2945] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [2127] set idSermonStatisticC to the $item object.
|
||||
// [2139] set idSermonStatisticC to the $item object.
|
||||
$item->idSermonStatisticC = $this->getIdSermonStatisticFbdf_C($item->id);
|
||||
}
|
||||
return $items;
|
||||
@ -348,24 +348,24 @@ class SermondistributorModelCategory extends JModelList
|
||||
*/
|
||||
public function getIdSermonStatisticFbdf_C($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_statistic as c
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
|
@ -65,36 +65,36 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as c
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as d
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__categories as b
|
||||
// [1901] 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') . ')');
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -112,7 +112,7 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -138,26 +138,26 @@ class SermondistributorModelPreacher extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] 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))
|
||||
{
|
||||
// [2091] Decode local_files
|
||||
// [2103] Decode local_files
|
||||
$item->local_files = json_decode($item->local_files, true);
|
||||
}
|
||||
if (SermondistributorHelper::checkString($item->manual_files))
|
||||
{
|
||||
// [2091] Decode manual_files
|
||||
// [2103] Decode manual_files
|
||||
$item->manual_files = json_decode($item->manual_files, true);
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$item->description = JHtml::_('content.prepare',$item->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
|
||||
// [2139] set idSermonStatisticE to the $item object.
|
||||
// [2151] set idSermonStatisticE to the $item object.
|
||||
$item->idSermonStatisticE = $this->getIdSermonStatisticFcff_E($item->id);
|
||||
}
|
||||
|
||||
@ -210,24 +210,24 @@ class SermondistributorModelPreacher extends JModelList
|
||||
*/
|
||||
public function getIdSermonStatisticFcff_E($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_statistic as e
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
@ -255,19 +255,19 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
}
|
||||
// [2439] Get a db connection.
|
||||
// [2451] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2441] Create a new query object.
|
||||
// [2453] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as a
|
||||
// [1901] 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) . ')');
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -284,21 +284,21 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2452] Reset the query using our newly populated query object.
|
||||
// [2464] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
// [2454] Load the results as a stdClass object.
|
||||
// [2466] Load the results as a stdClass object.
|
||||
$data = $db->loadObject();
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$data->description = JHtml::_('content.prepare',$data->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
|
||||
|
||||
// [2553] return data object.
|
||||
// [2565] return data object.
|
||||
return $data;
|
||||
}
|
||||
|
||||
@ -323,20 +323,20 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$this->initSet = true;
|
||||
}
|
||||
|
||||
// [2609] Get the global params
|
||||
// [2621] Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_statistic as a
|
||||
// [1901] 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'));
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -353,7 +353,7 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2614] Reset the query using our newly populated query object.
|
||||
// [2626] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
@ -362,13 +362,13 @@ class SermondistributorModelPreacher extends JModelList
|
||||
return false;
|
||||
}
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
}
|
||||
// [2623] return items
|
||||
// [2635] return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
@ -393,20 +393,20 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$this->initSet = true;
|
||||
}
|
||||
|
||||
// [2609] Get the global params
|
||||
// [2621] Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -424,7 +424,7 @@ class SermondistributorModelPreacher extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2614] Reset the query using our newly populated query object.
|
||||
// [2626] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
@ -433,13 +433,13 @@ class SermondistributorModelPreacher extends JModelList
|
||||
return false;
|
||||
}
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
}
|
||||
// [2623] return items
|
||||
// [2635] return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
@ -65,13 +65,13 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as a
|
||||
// [1901] 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')));
|
||||
@ -80,7 +80,7 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -106,16 +106,16 @@ class SermondistributorModelPreachers extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$item->description = JHtml::_('content.prepare',$item->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
|
||||
// [2139] set idPreacherSermonB to the $item object.
|
||||
// [2151] set idPreacherSermonB to the $item object.
|
||||
$item->idPreacherSermonB = $this->getIdPreacherSermonDcaa_B($item->id);
|
||||
}
|
||||
|
||||
@ -131,13 +131,13 @@ class SermondistributorModelPreachers extends JModelList
|
||||
*/
|
||||
public function getIdPreacherSermonDcaa_B($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_sermon as b
|
||||
// [2835] Get from #__sermondistributor_sermon as b
|
||||
$query->select($db->quoteName(
|
||||
array('b.id'),
|
||||
array('id')));
|
||||
@ -146,11 +146,11 @@ class SermondistributorModelPreachers extends JModelList
|
||||
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
|
||||
$query->where('b.published = 1');
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
|
@ -65,37 +65,37 @@ class SermondistributorModelSeries extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as c
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as d
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__categories as b
|
||||
// [1901] 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) . ')');
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -112,7 +112,7 @@ class SermondistributorModelSeries extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -138,26 +138,26 @@ class SermondistributorModelSeries extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] 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))
|
||||
{
|
||||
// [2091] Decode local_files
|
||||
// [2103] Decode local_files
|
||||
$item->local_files = json_decode($item->local_files, true);
|
||||
}
|
||||
if (SermondistributorHelper::checkString($item->manual_files))
|
||||
{
|
||||
// [2091] Decode manual_files
|
||||
// [2103] Decode manual_files
|
||||
$item->manual_files = json_decode($item->manual_files, true);
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$item->description = JHtml::_('content.prepare',$item->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
|
||||
// [2139] set idSermonStatisticE to the $item object.
|
||||
// [2151] set idSermonStatisticE to the $item object.
|
||||
$item->idSermonStatisticE = $this->getIdSermonStatisticEfeb_E($item->id);
|
||||
}
|
||||
|
||||
@ -210,24 +210,24 @@ class SermondistributorModelSeries extends JModelList
|
||||
*/
|
||||
public function getIdSermonStatisticEfeb_E($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_statistic as e
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
@ -255,19 +255,19 @@ class SermondistributorModelSeries extends JModelList
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
}
|
||||
// [2439] Get a db connection.
|
||||
// [2451] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2441] Create a new query object.
|
||||
// [2453] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as a
|
||||
// [1901] 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) . ')');
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -284,21 +284,21 @@ class SermondistributorModelSeries extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2452] Reset the query using our newly populated query object.
|
||||
// [2464] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
// [2454] Load the results as a stdClass object.
|
||||
// [2466] Load the results as a stdClass object.
|
||||
$data = $db->loadObject();
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$data->description = JHtml::_('content.prepare',$data->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
|
||||
|
||||
// [2553] return data object.
|
||||
// [2565] return data object.
|
||||
return $data;
|
||||
}
|
||||
|
||||
@ -323,20 +323,20 @@ class SermondistributorModelSeries extends JModelList
|
||||
$this->initSet = true;
|
||||
}
|
||||
|
||||
// [2609] Get the global params
|
||||
// [2621] Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_statistic as a
|
||||
// [1901] 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'));
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -353,7 +353,7 @@ class SermondistributorModelSeries extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2614] Reset the query using our newly populated query object.
|
||||
// [2626] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
@ -362,13 +362,13 @@ class SermondistributorModelSeries extends JModelList
|
||||
return false;
|
||||
}
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
}
|
||||
// [2623] return items
|
||||
// [2635] return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
@ -393,20 +393,20 @@ class SermondistributorModelSeries extends JModelList
|
||||
$this->initSet = true;
|
||||
}
|
||||
|
||||
// [2609] Get the global params
|
||||
// [2621] Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
// [2234] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
// [2246] Check if JRequest::getInt('id') is a string or numeric value.
|
||||
$checkValue = JRequest::getInt('id');
|
||||
if (isset($checkValue) && SermondistributorHelper::checkString($checkValue))
|
||||
{
|
||||
@ -424,7 +424,7 @@ class SermondistributorModelSeries extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2614] Reset the query using our newly populated query object.
|
||||
// [2626] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
@ -433,13 +433,13 @@ class SermondistributorModelSeries extends JModelList
|
||||
return false;
|
||||
}
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
}
|
||||
// [2623] return items
|
||||
// [2635] return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
@ -65,13 +65,13 @@ class SermondistributorModelSerieslist extends JModelList
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// [3017] Get a db connection.
|
||||
// [3029] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [3026] Create a new query object.
|
||||
// [3038] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as a
|
||||
// [1901] 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')));
|
||||
@ -80,7 +80,7 @@ class SermondistributorModelSerieslist extends JModelList
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [3039] return the query object
|
||||
// [3051] return the query object
|
||||
return $query;
|
||||
}
|
||||
|
||||
@ -106,16 +106,16 @@ class SermondistributorModelSerieslist extends JModelList
|
||||
// Get the global params
|
||||
$globalParams = JComponentHelper::getParams('com_sermondistributor', true);
|
||||
|
||||
// [3054] Convert the parameter fields into objects.
|
||||
// [3066] Convert the parameter fields into objects.
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// [3057] Always create a slug for sef URL's
|
||||
// [3069] Always create a slug for sef URL's
|
||||
$item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id;
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$item->description = JHtml::_('content.prepare',$item->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
|
||||
// [2139] set idSeriesSermonB to the $item object.
|
||||
// [2151] set idSeriesSermonB to the $item object.
|
||||
$item->idSeriesSermonB = $this->getIdSeriesSermonBcae_B($item->id);
|
||||
}
|
||||
|
||||
@ -131,13 +131,13 @@ class SermondistributorModelSerieslist extends JModelList
|
||||
*/
|
||||
public function getIdSeriesSermonBcae_B($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_sermon as b
|
||||
// [2835] Get from #__sermondistributor_sermon as b
|
||||
$query->select($db->quoteName(
|
||||
array('b.id'),
|
||||
array('id')));
|
||||
@ -146,11 +146,11 @@ class SermondistributorModelSerieslist extends JModelList
|
||||
$query->where('b.access IN (' . implode(',', $this->levels) . ')');
|
||||
$query->where('b.published = 1');
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
|
@ -119,31 +119,31 @@ class SermondistributorModelSermon extends JModelItem
|
||||
{
|
||||
try
|
||||
{
|
||||
// [2439] Get a db connection.
|
||||
// [2451] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2441] Create a new query object.
|
||||
// [2453] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [1889] Get from #__sermondistributor_sermon as a
|
||||
// [1901] 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'));
|
||||
|
||||
// [1889] Get from #__sermondistributor_series as b
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__sermondistributor_preacher as c
|
||||
// [1901] 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') . ')');
|
||||
|
||||
// [1889] Get from #__categories as e
|
||||
// [1901] Get from #__categories as e
|
||||
$query->select($db->quoteName(
|
||||
array('e.alias','e.title'),
|
||||
array('category_alias','category')));
|
||||
@ -153,38 +153,38 @@ class SermondistributorModelSermon extends JModelItem
|
||||
$query->where('a.published = 1');
|
||||
$query->order('a.ordering ASC');
|
||||
|
||||
// [2452] Reset the query using our newly populated query object.
|
||||
// [2464] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
// [2454] Load the results as a stdClass object.
|
||||
// [2466] Load the results as a stdClass object.
|
||||
$data = $db->loadObject();
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
// [2465] If no data is found redirect to default page and show warning.
|
||||
// [2477] 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))
|
||||
{
|
||||
// [2091] Decode local_files
|
||||
// [2103] Decode local_files
|
||||
$data->local_files = json_decode($data->local_files, true);
|
||||
}
|
||||
if (SermondistributorHelper::checkString($data->manual_files))
|
||||
{
|
||||
// [2091] Decode manual_files
|
||||
// [2103] Decode manual_files
|
||||
$data->manual_files = json_decode($data->manual_files, true);
|
||||
}
|
||||
// [2106] Make sure the content prepare plugins fire on description.
|
||||
// [2118] Make sure the content prepare plugins fire on description.
|
||||
$data->description = JHtml::_('content.prepare',$data->description);
|
||||
// [2108] Checking if description has uikit components that must be loaded.
|
||||
// [2120] Checking if description has uikit components that must be loaded.
|
||||
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
|
||||
// [2411] set the global sermon value.
|
||||
// [2423] set the global sermon value.
|
||||
$this->a_sermon = $data->id;
|
||||
// [2139] set idSermonStatisticD to the $data object.
|
||||
// [2151] set idSermonStatisticD to the $data object.
|
||||
$data->idSermonStatisticD = $this->getIdSermonStatisticEbbd_D($data->id);
|
||||
|
||||
// [2559] set data object to item.
|
||||
// [2571] set data object to item.
|
||||
$this->_item[$pk] = $data;
|
||||
}
|
||||
catch (Exception $e)
|
||||
@ -265,24 +265,24 @@ class SermondistributorModelSermon extends JModelItem
|
||||
*/
|
||||
public function getIdSermonStatisticEbbd_D($id)
|
||||
{
|
||||
// [2819] Get a db connection.
|
||||
// [2831] Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// [2821] Create a new query object.
|
||||
// [2833] Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// [2823] Get from #__sermondistributor_statistic as d
|
||||
// [2835] 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));
|
||||
|
||||
// [2877] Reset the query using our newly populated query object.
|
||||
// [2889] Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// [2880] check if there was data returned
|
||||
// [2892] check if there was data returned
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadObjectList();
|
||||
|
@ -5,10 +5,10 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] Categories_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Categories_list_style Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="categories_list_style"
|
||||
@ -36,7 +36,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Categories_table_color Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="categories_table_color"
|
||||
@ -58,7 +58,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Categories_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,11 +43,11 @@ class SermondistributorViewCategories extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -76,10 +76,10 @@ class SermondistributorViewCategories extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -91,96 +91,96 @@ class SermondistributorViewCategories extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-tooltip';
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3512] load the meta description
|
||||
// [3524] load the meta description
|
||||
if ($this->params->get('menu-meta_description'))
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3517] load the key words if set
|
||||
// [3529] load the key words if set
|
||||
if ($this->params->get('menu-meta_keywords'))
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3522] check the robot params
|
||||
// [3534] check the robot params
|
||||
if ($this->params->get('robots'))
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
|
@ -5,12 +5,12 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_CATEGORY_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1815] Add fields to the request variables for the layout. -->
|
||||
<!-- [1827] Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
|
||||
|
||||
<!-- [11610] Category_request_id Field. Type: Category. (joomla) -->
|
||||
<!-- [11622] Category_request_id Field. Type: Category. (joomla) -->
|
||||
<field
|
||||
type="category"
|
||||
name="id"
|
||||
@ -22,10 +22,10 @@
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] Category_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_box_contrast Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Category_list_style Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="category_list_style"
|
||||
@ -69,7 +69,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11624] Spacer_hr_g Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<!-- [11636] Spacer_hr_g Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_g" hr="true" class="spacer_hr_g" />
|
||||
<!-- [11524] Category_sermons_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_preacher Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_series Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_download_counter Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_downloads Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Category_sermons_open Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,12 +43,12 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->category = $this->get('Category');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -92,10 +92,10 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -139,39 +139,39 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -187,52 +187,52 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3461] load the meta description
|
||||
// [3473] load the meta description
|
||||
if (isset($this->category->metadesc) && $this->category->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->category->metadesc);
|
||||
@ -241,7 +241,7 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3470] load the key words if set
|
||||
// [3482] load the key words if set
|
||||
if (isset($this->category->metakey) && $this->category->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->category->metakey);
|
||||
@ -250,7 +250,7 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3479] check the robot params
|
||||
// [3491] check the robot params
|
||||
if (isset($this->category->robots) && $this->category->robots)
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->category->robots);
|
||||
@ -259,12 +259,12 @@ class SermondistributorViewCategory extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
// [3488] check if autor is to be set
|
||||
// [3500] 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);
|
||||
}
|
||||
// [3493] check if metadata is available
|
||||
// [3505] check if metadata is available
|
||||
if (isset($this->category->metadata) && $this->category->metadata)
|
||||
{
|
||||
$mdata = json_decode($this->category->metadata,true);
|
||||
|
@ -5,12 +5,12 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_PREACHER_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1815] Add fields to the request variables for the layout. -->
|
||||
<!-- [1827] Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
|
||||
|
||||
<!-- [11731] Preacher_request_id Field. Type: Preachers. (custom) -->
|
||||
<!-- [11743] Preacher_request_id Field. Type: Preachers. (custom) -->
|
||||
<field
|
||||
type="preachers"
|
||||
name="id"
|
||||
@ -24,10 +24,10 @@
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] Preacher_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_box_contrast Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Preacher_list_style Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="preacher_list_style"
|
||||
@ -71,7 +71,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_email Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_website Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11624] Spacer_hr_f Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<!-- [11636] Spacer_hr_f Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_f" hr="true" class="spacer_hr_f" />
|
||||
<!-- [11524] Preacher_sermons_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_series Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_category Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_download_counter Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_downloads Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preacher_sermons_open Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,14 +43,14 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] 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');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -86,10 +86,10 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -133,40 +133,40 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-tooltip';
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -182,52 +182,52 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3461] load the meta description
|
||||
// [3473] load the meta description
|
||||
if (isset($this->preacher->metadesc) && $this->preacher->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->preacher->metadesc);
|
||||
@ -236,7 +236,7 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3470] load the key words if set
|
||||
// [3482] load the key words if set
|
||||
if (isset($this->preacher->metakey) && $this->preacher->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->preacher->metakey);
|
||||
@ -245,7 +245,7 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3479] check the robot params
|
||||
// [3491] check the robot params
|
||||
if (isset($this->preacher->robots) && $this->preacher->robots)
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->preacher->robots);
|
||||
@ -254,12 +254,12 @@ class SermondistributorViewPreacher extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
// [3488] check if autor is to be set
|
||||
// [3500] 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);
|
||||
}
|
||||
// [3493] check if metadata is available
|
||||
// [3505] check if metadata is available
|
||||
if (isset($this->preacher->metadata) && $this->preacher->metadata)
|
||||
{
|
||||
$mdata = json_decode($this->preacher->metadata,true);
|
||||
|
@ -5,10 +5,10 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_PREACHERS_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] Preachers_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Preachers_list_style Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="preachers_list_style"
|
||||
@ -36,7 +36,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Preachers_table_color Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="preachers_table_color"
|
||||
@ -58,7 +58,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_website Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Preachers_email Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,11 +43,11 @@ class SermondistributorViewPreachers extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -76,10 +76,10 @@ class SermondistributorViewPreachers extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -91,40 +91,40 @@ class SermondistributorViewPreachers extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-tooltip';
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -140,62 +140,62 @@ class SermondistributorViewPreachers extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3512] load the meta description
|
||||
// [3524] load the meta description
|
||||
if ($this->params->get('menu-meta_description'))
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3517] load the key words if set
|
||||
// [3529] load the key words if set
|
||||
if ($this->params->get('menu-meta_keywords'))
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3522] check the robot params
|
||||
// [3534] check the robot params
|
||||
if ($this->params->get('robots'))
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
|
@ -5,12 +5,12 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_SERIES_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1815] Add fields to the request variables for the layout. -->
|
||||
<!-- [1827] Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_sermondistributor/models/fields">
|
||||
|
||||
<!-- [11731] Series_request_id Field. Type: Series. (custom) -->
|
||||
<!-- [11743] Series_request_id Field. Type: Series. (custom) -->
|
||||
<field
|
||||
type="series"
|
||||
name="id"
|
||||
@ -23,10 +23,10 @@
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] Series_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_box_contrast Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] Series_list_style Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="series_list_style"
|
||||
@ -70,7 +70,7 @@
|
||||
multiple="false"
|
||||
filter="string"
|
||||
default="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11624] Spacer_hr_h Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<!-- [11636] Spacer_hr_h Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_h" hr="true" class="spacer_hr_h" />
|
||||
<!-- [11524] Series_sermons_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_preacher Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_category Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_download_counter Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_downloads Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] Series_sermons_open Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,14 +43,14 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] 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');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -86,10 +86,10 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -133,39 +133,39 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -181,52 +181,52 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3461] load the meta description
|
||||
// [3473] load the meta description
|
||||
if (isset($this->series->metadesc) && $this->series->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->series->metadesc);
|
||||
@ -235,7 +235,7 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3470] load the key words if set
|
||||
// [3482] load the key words if set
|
||||
if (isset($this->series->metakey) && $this->series->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->series->metakey);
|
||||
@ -244,7 +244,7 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3479] check the robot params
|
||||
// [3491] check the robot params
|
||||
if (isset($this->series->robots) && $this->series->robots)
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->series->robots);
|
||||
@ -253,12 +253,12 @@ class SermondistributorViewSeries extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
// [3488] check if autor is to be set
|
||||
// [3500] 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);
|
||||
}
|
||||
// [3493] check if metadata is available
|
||||
// [3505] check if metadata is available
|
||||
if (isset($this->series->metadata) && $this->series->metadata)
|
||||
{
|
||||
$mdata = json_decode($this->series->metadata,true);
|
||||
|
@ -5,10 +5,10 @@
|
||||
<![CDATA[COM_SERMONDISTRIBUTOR_MENU_SERIESLIST_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<!-- [1830] Adding page parameters -->
|
||||
<!-- [1842] Adding page parameters -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_SERMONDISTRIBUTOR">
|
||||
<!-- [11524] List_series_display Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_list_style Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_table_color Field. Type: List. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_icon Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_desc Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_sermon_count Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] 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>
|
||||
<!-- [11524] List_series_hits Field. Type: Radio. (joomla) -->
|
||||
<!-- [11536] 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="">
|
||||
<!-- [11596] [1853] Global & Option Set. -->
|
||||
<!-- [11608] [1865] Global & Option Set. -->
|
||||
<option value="">
|
||||
JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="1">
|
||||
|
@ -43,11 +43,11 @@ class SermondistributorViewSerieslist extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3152] Initialise variables.
|
||||
// [3164] Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -76,10 +76,10 @@ class SermondistributorViewSerieslist extends JViewLegacy
|
||||
$this->fooTableStyle = 2;
|
||||
}
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -91,40 +91,40 @@ class SermondistributorViewSerieslist extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-tooltip';
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -140,62 +140,62 @@ class SermondistributorViewSerieslist extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [6754] Add the CSS for Footable.
|
||||
// [6766] Add the CSS for Footable.
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_sermondistributor/footable/css/footable.core.min.css');
|
||||
|
||||
// [6756] Use the Metro Style
|
||||
// [6768] 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');
|
||||
}
|
||||
// [6761] Use the Legacy Style.
|
||||
// [6773] 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');
|
||||
}
|
||||
|
||||
// [6766] Add the JavaScript for Footable
|
||||
// [6778] 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');
|
||||
// [3512] load the meta description
|
||||
// [3524] load the meta description
|
||||
if ($this->params->get('menu-meta_description'))
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3517] load the key words if set
|
||||
// [3529] load the key words if set
|
||||
if ($this->params->get('menu-meta_keywords'))
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3522] check the robot params
|
||||
// [3534] check the robot params
|
||||
if ($this->params->get('robots'))
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
|
@ -43,10 +43,10 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// [3146] Initialise variables.
|
||||
// [3158] Initialise variables.
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
// [3181] Check for errors.
|
||||
// [3193] Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
@ -60,10 +60,10 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
// set view key
|
||||
$this->item->viewKey = 'sermon';
|
||||
|
||||
// [3198] Set the toolbar
|
||||
// [3210] Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// [3200] set the document
|
||||
// [3212] set the document
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
@ -107,40 +107,40 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
|
||||
// [3554] always make sure jquery is loaded.
|
||||
// [3566] always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
// [3556] Load the header checker class.
|
||||
// [3568] Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' );
|
||||
// [3558] Initialize the header checker.
|
||||
// [3570] Initialize the header checker.
|
||||
$HeaderCheck = new HeaderCheck;
|
||||
|
||||
// [3563] Load uikit options.
|
||||
// [3575] Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
// [3565] Set script size.
|
||||
// [3577] Set script size.
|
||||
$size = $this->params->get('uikit_min');
|
||||
// [3567] Set css style.
|
||||
// [3579] Set css style.
|
||||
$style = $this->params->get('uikit_style');
|
||||
|
||||
// [3570] The uikit css.
|
||||
// [3582] 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');
|
||||
}
|
||||
// [3575] The uikit js.
|
||||
// [3587] 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');
|
||||
}
|
||||
|
||||
// [3584] Load the script to find all uikit components needed.
|
||||
// [3596] Load the script to find all uikit components needed.
|
||||
if ($uikit != 2)
|
||||
{
|
||||
// [3587] Set the default uikit components in this view.
|
||||
// [3599] Set the default uikit components in this view.
|
||||
$uikitComp = array();
|
||||
$uikitComp[] = 'data-uk-tooltip';
|
||||
$uikitComp[] = 'data-uk-grid';
|
||||
|
||||
// [3596] Get field uikit components needed in this view.
|
||||
// [3608] Get field uikit components needed in this view.
|
||||
$uikitFieldComp = $this->get('UikitComp');
|
||||
if (isset($uikitFieldComp) && SermondistributorHelper::checkArray($uikitFieldComp))
|
||||
{
|
||||
@ -156,32 +156,32 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
// [3612] Load the needed uikit components in this view.
|
||||
// [3624] Load the needed uikit components in this view.
|
||||
if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp))
|
||||
{
|
||||
// [3615] load just in case.
|
||||
// [3627] load just in case.
|
||||
jimport('joomla.filesystem.file');
|
||||
// [3617] loading...
|
||||
// [3629] loading...
|
||||
foreach ($uikitComp as $class)
|
||||
{
|
||||
foreach (SermondistributorHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// [3622] check if the CSS file exists.
|
||||
// [3634] check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// [3625] load the css.
|
||||
// [3637] load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css');
|
||||
}
|
||||
// [3628] check if the JavaScript file exists.
|
||||
// [3640] check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// [3631] load the js.
|
||||
// [3643] load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// [3461] load the meta description
|
||||
// [3473] load the meta description
|
||||
if (isset($this->item->metadesc) && $this->item->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->item->metadesc);
|
||||
@ -190,7 +190,7 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
// [3470] load the key words if set
|
||||
// [3482] load the key words if set
|
||||
if (isset($this->item->metakey) && $this->item->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->item->metakey);
|
||||
@ -199,7 +199,7 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
// [3479] check the robot params
|
||||
// [3491] check the robot params
|
||||
if (isset($this->item->robots) && $this->item->robots)
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->item->robots);
|
||||
@ -208,12 +208,12 @@ class SermondistributorViewSermon extends JViewLegacy
|
||||
{
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
// [3488] check if autor is to be set
|
||||
// [3500] 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);
|
||||
}
|
||||
// [3493] check if metadata is available
|
||||
// [3505] check if metadata is available
|
||||
if (isset($this->item->metadata) && $this->item->metadata)
|
||||
{
|
||||
$mdata = json_decode($this->item->metadata,true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user