This commit is contained in:
Llewellyn van der Merwe 2022-03-03 05:49:35 +02:00
parent 02a60ab714
commit 2aa520e444
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
77 changed files with 340 additions and 282 deletions

View File

@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 16th August, 2021
+ *Last Build*: 2nd March, 2022
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**204 Hours** or **26 Eight Hour Days** (actual time the author saved -
**206 Hours** or **26 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **73073**
+ *File count*: **460**
+ *Folder count*: **93**
+ *Line count*: **73932**
+ *File count*: **472**
+ *Folder count*: **99**
**134 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**136 Hours** or **17 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @51hours** = codingtime / 4;
> **debugging @52hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10;
> **mapping @21hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;)
**338 Hours** or **42 Eight Hour Days**
**342 Hours** or **43 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **8.4 weeks** or **1.8 months**
Project duration: **8.6 weeks** or **1.8 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 16th August, 2021
+ *Last Build*: 2nd March, 2022
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**204 Hours** or **26 Eight Hour Days** (actual time the author saved -
**206 Hours** or **26 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **73073**
+ *File count*: **460**
+ *Folder count*: **93**
+ *Line count*: **73932**
+ *File count*: **472**
+ *Folder count*: **99**
**134 Hours** or **16 Eight Hour Days** (the actual time the author spent)
**136 Hours** or **17 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @51hours** = codingtime / 4;
> **debugging @52hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10;
> **mapping @21hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;)
**338 Hours** or **42 Eight Hour Days**
**342 Hours** or **43 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **8.4 weeks** or **1.8 months**
Project duration: **8.6 weeks** or **1.8 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -60,8 +60,8 @@
last="50000"
step="10"
/>
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<!-- Spacer_hr_4 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_4" hr="true" class="spacer_hr_4" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
@ -393,7 +393,7 @@
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option>
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC</option>
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC</option>
</field>
</fieldset>
<fieldset
@ -917,8 +917,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1352,8 +1352,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -1787,8 +1787,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -37,8 +37,10 @@ class SermondistributorControllerAjax extends JControllerLegacy
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
JResponse::setHeader("Access-Control-Allow-Origin", "*");
// get the application
$app = JFactory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
@ -50,20 +52,26 @@ class SermondistributorControllerAjax extends JControllerLegacy
public function ajax()
{
// get the user for later use
$user = JFactory::getUser();
// get the input values
$jinput = JFactory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
$task = $this->getTask();
switch($task)
{
case 'isNew':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
@ -73,7 +81,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -88,10 +96,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -101,7 +113,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'isRead':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
@ -111,7 +122,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -126,10 +137,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -139,7 +154,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getBuildTable':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idNameValue = $jinput->get('idName', NULL, 'WORD');
$ojectValue = $jinput->get('oject', NULL, 'STRING');
if($idNameValue && $user->id != 0 && $ojectValue)
@ -150,7 +164,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -165,10 +179,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -178,7 +196,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getSourceStatus':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
@ -188,7 +205,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -203,10 +220,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -216,7 +237,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getCronPath':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0)
{
@ -226,7 +246,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -241,10 +261,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -254,7 +278,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'updateLocalListingExternal':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
@ -267,7 +290,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -282,10 +305,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -296,10 +323,15 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
else
{
if($callback = $jinput->get('callback', null, 'CMD'))
// return to a callback function
if($callback)
{
echo $callback."(".json_encode(false).");";
}
elseif($returnRaw)
{
echo json_encode(false);
}
else
{
echo "(".json_encode(false).");";

View File

@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Sermondistributor Controller
*/

View File

@ -136,7 +136,7 @@ COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_LABEL="Global"
COM_SERMONDISTRIBUTOR_CONFIG_GRADIANT_LOAD="Gradient"
COM_SERMONDISTRIBUTOR_CONFIG_GREEN="Green"
COM_SERMONDISTRIBUTOR_CONFIG_GRID="Grid"
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC="HTML 5 (basic)"
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC="HTML 5 (basic)"
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER="jPlayer"
COM_SERMONDISTRIBUTOR_CONFIG_LEGACY="Legacy"
COM_SERMONDISTRIBUTOR_CONFIG_LINES="Lines"
@ -415,6 +415,8 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNPUBLISHED="%s External Sources
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNPUBLISHED_1="%s External Source unpublished."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_SUBMENU="External Sources Submenu"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_SUBMENU_DESC="Allows the users in this group to submenu of external source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3G2=".3g2"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3GP=".3gp"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APICRONJOB_NOTE_DESCRIPTION="You must setup a cronjob that will update your local listing with the external sources.<br /><br /><b>USE THE FOLLOWING:</b> <span id='cronjob-externalUpdate'>loading...<span class='loading-dots' ></span></span><br /><br />Please note that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677
<script type='text/javascript'>
jQuery(document).ready(function($) {
@ -509,18 +511,18 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_GIF=".gif"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ID="Id"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_JPEG=".jpeg"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_JPG=".jpg"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4A=".m4a"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4V=".m4v"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MANUAL="Manual"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MANUAL_LOCAL_SELECTION="Manual Local Selection"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURA=".m4a"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURV=".m4v"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MODIFIED_BY_DESC="The last user that modified this External Source."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MODIFIED_BY_LABEL="Modified By"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MODIFIED_DATE_DESC="The date this External Source was modified."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MODIFIED_DATE_LABEL="Modified Date"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MOV=".mov"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPFOUR=".mp4"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP3=".mp3"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP4=".mp4"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPG=".mpg"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE=".mp3"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW="A New External Source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_EXTERNALSOURCE_DESCRIPTION="<b>To integrate auto External Source with your system you need to do the following:</b> <ul>
<li>Create main/first auto folder in External Source. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.</li>
@ -634,8 +636,6 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_DESCRIPTION="Enter the folder to t
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_HINT="any/folder/in/your/Dropbox"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_LABEL="Folder"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_MESSAGE="Error! Please add folder here."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGP=".3gp"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGTWO=".3g2"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_DESCRIPTION="Enter the shared-url of the main folder to target. The shared-url must be from the account where you generated the access token."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TSHAREDURL_LABEL="Shared-url"

View File

@ -137,7 +137,7 @@ class SermondistributorModelExternal_sources extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -233,19 +233,19 @@ class SermondistributorModelExternal_sources extends JModelList
if ($name === 'filetypes')
{
$filetypesArray = array(
'.mp3' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE',
'.m4a' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURA',
'.mp3' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP3',
'.m4a' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4A',
'.ogg' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGG',
'.wav' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WAV',
'.mp4' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPFOUR',
'.m4v' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURV',
'.mp4' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP4',
'.m4v' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4V',
'.mov' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MOV',
'.wmv' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WMV',
'.avi' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AVI',
'.mpg' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPG',
'.ogv' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGV',
'.3gp' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGP',
'.3g2' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGTWO',
'.3gp' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3GP',
'.3g2' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3G2',
'.pdf' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PDF',
'.doc' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOC',
'.docx' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOCX',
@ -557,17 +557,19 @@ class SermondistributorModelExternal_sources extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_external_source'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -582,7 +584,7 @@ class SermondistributorModelExternal_sources extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_external_source'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -146,17 +146,17 @@
default="0">
<!-- Option Set. -->
<option value=".mp3">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP3</option>
<option value=".m4a">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURA</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4A</option>
<option value=".ogg">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGG</option>
<option value=".wav">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WAV</option>
<option value=".mp4">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPFOUR</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MP4</option>
<option value=".m4v">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURV</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_M4V</option>
<option value=".mov">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MOV</option>
<option value=".wmv">
@ -168,9 +168,9 @@
<option value=".ogv">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGV</option>
<option value=".3gp">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGP</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3GP</option>
<option value=".3g2">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_THREEGTWO</option>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_3G2</option>
<option value=".pdf">
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PDF</option>
<option value=".doc">

View File

@ -146,7 +146,7 @@ class SermondistributorModelHelp_documents extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -560,17 +560,19 @@ class SermondistributorModelHelp_documents extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_help_document'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -585,7 +587,7 @@ class SermondistributorModelHelp_documents extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -145,7 +145,7 @@ class SermondistributorModelLocal_listings extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -471,17 +471,19 @@ class SermondistributorModelLocal_listings extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_local_listing'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -496,7 +498,7 @@ class SermondistributorModelLocal_listings extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_local_listing'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -122,7 +122,7 @@ class SermondistributorModelPreachers extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -403,17 +403,19 @@ class SermondistributorModelPreachers extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_preacher'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -428,7 +430,7 @@ class SermondistributorModelPreachers extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_preacher'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -114,7 +114,7 @@ class SermondistributorModelSeries_list extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -394,17 +394,19 @@ class SermondistributorModelSeries_list extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_series'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -419,7 +421,7 @@ class SermondistributorModelSeries_list extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_series'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Sermondistributor Model
*/
@ -292,7 +294,7 @@ class SermondistributorModelSermondistributor extends JModelList
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<img alt=\"@" + issue.user.login + "\" style=\"vertical-align: baseline;\" src=\"" + issue.user.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + issue.user.html_url + "\" target=\"_blank\">" + issue.user.login + "</a> '.JText::_('COM_SERMONDISTRIBUTOR_OPENED_THIS').' <a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_SERMONDISTRIBUTOR_ISSUE').'-" + issue.number + "</a> (" + timeago + ")</em> ")
.append(marked(issue.body))
.append(marked.parse(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
@ -305,7 +307,7 @@ class SermondistributorModelSermondistributor extends JModelList
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<img alt=\"@" + issue.user.login + "\" style=\"vertical-align: baseline;\" src=\"" + issue.user.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + issue.user.html_url + "\" target=\"_blank\">" + issue.user.login + "</a> '.JText::_('COM_SERMONDISTRIBUTOR_OPENED').' <a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_SERMONDISTRIBUTOR_ISSUE').'-" + issue.number + "</a> (" + timeago + ")</em>")
.append(marked(issue.body))
.append(marked.parse(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
@ -344,7 +346,7 @@ class SermondistributorModelSermondistributor extends JModelList
.append(activeNotice)
.append("<img alt=\"@" + tagrelease.author.login + "\" style=\"vertical-align: baseline;\" src=\"" + tagrelease.author.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + tagrelease.author.html_url + "\" target=\"_blank\">" + tagrelease.author.login + "</a> '.JText::_('COM_SERMONDISTRIBUTOR_RELEASED_THIS').'<em> <b><span class=\'icon-tag-2\'></span>" + tagrelease.tag_name+ "</b> (" + timeago + ")")
.append(marked(tagrelease.body))
.append(marked.parse(tagrelease.body))
.append(" <a class=\"hasTooltip\" href=\"" + tagrelease.assets[0].browser_download_url + "\" title=\"'.JText::_('COM_SERMONDISTRIBUTOR_DOWNLOAD').' " + tagrelease.assets[0].name + "\" target=\"_self\"><span class=\'icon-download\'></span>" + tagrelease.assets[0].name + "</a> (<a class=\"hasTooltip\" href=\"" + tagrelease.assets[0].browser_download_url + "\" title=\"'.JText::_('COM_SERMONDISTRIBUTOR_TOTAL_DOWNLOADS').'\"><small>" + tagrelease.assets[0].download_count + "</small></a>) ")
.append("| <a href=\"" + tagrelease.html_url + "\" target=\"_blank\" title=\"'.JText::_('COM_SERMONDISTRIBUTOR_OPEN').' " + tagrelease.name + " '.JText::_('COM_SERMONDISTRIBUTOR_ON_GITHUB').'\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_SERMONDISTRIBUTOR_OPEN_ON_GITHUB').'</a>...<hr />");
});
@ -372,7 +374,7 @@ class SermondistributorModelSermondistributor extends JModelList
jQuery(document).ready(function () {
jQuery.get(gewiki)
.success(function(wiki) {
jQuery("#wiki-md").html(marked(wiki));
jQuery("#wiki-md").html(marked.parse(wiki));
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#wiki-md").html("'.JText::_('COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER').'");
@ -396,7 +398,7 @@ class SermondistributorModelSermondistributor extends JModelList
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery("#noticeboard-md").html(marked(board));
jQuery("#noticeboard-md").html(marked.parse(board));
getIS(1,board).done(function(result) {
if (result){
jQuery("#cpanel_tabTabs a").each(function() {

View File

@ -170,7 +170,7 @@ class SermondistributorModelSermons extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -744,17 +744,19 @@ class SermondistributorModelSermons extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_sermon'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -769,7 +771,7 @@ class SermondistributorModelSermons extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_sermon'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -146,7 +146,7 @@ class SermondistributorModelStatistics extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -493,17 +493,19 @@ class SermondistributorModelStatistics extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__sermondistributor_statistic'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -518,7 +520,7 @@ class SermondistributorModelStatistics extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__sermondistributor_statistic'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -25,7 +25,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_sermondistributor'))
@ -39,8 +39,8 @@ $document->addStyleSheet('components/com_sermondistributor/assets/css/admin.css'
$document->addScript('components/com_sermondistributor/assets/js/admin.js');
// require helper files
JLoader::register('SermondistributorHelper', __DIR__ . '/helpers/sermondistributor.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
JLoader::register('SermondistributorHelper', __DIR__ . '/helpers/sermondistributor.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
// Get an instance of the controller prefixed by Sermondistributor
$controller = JControllerLegacy::getInstance('Sermondistributor');

View File

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`website` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`source` TINYINT(1) NOT NULL DEFAULT 0,
`tags` TEXT NOT NULL,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`scripture` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -123,7 +123,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` (
`preacher` INT(11) NOT NULL DEFAULT 0,
`series` INT(11) NOT NULL DEFAULT 0,
`sermon` INT(11) NOT NULL DEFAULT 0,
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -165,7 +165,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` (
`sharedurl` TEXT NOT NULL,
`update_method` TINYINT NOT NULL DEFAULT 0,
`update_timer` INT(1) NOT NULL DEFAULT 0,
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -198,7 +198,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` (
`name` VARCHAR(255) NOT NULL DEFAULT '',
`size` INT(50) NOT NULL DEFAULT 0,
`url` TEXT NOT NULL,
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -233,7 +233,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`title` CHAR(64) NOT NULL DEFAULT '',
`type` TINYINT(1) NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
`params` text NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,

View File

@ -336,7 +336,7 @@ class SermondistributorTableHelp_document extends JTable
$this->alias = $this->title;
}
$this->alias = JApplication::stringURLSafe($this->alias);
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{

View File

@ -336,7 +336,7 @@ class SermondistributorTablePreacher extends JTable
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{

View File

@ -336,7 +336,7 @@ class SermondistributorTableSeries extends JTable
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{

View File

@ -339,7 +339,7 @@ class SermondistributorTableSermon extends JTable
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
$this->alias = JApplicationHelper::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -172,10 +172,10 @@ class SermondistributorViewExternal_source extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('external_source');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('external_source');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');

View File

@ -159,10 +159,10 @@ class SermondistributorViewExternal_sources extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('external_sources');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('external_sources');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -162,10 +162,10 @@ class SermondistributorViewHelp_document extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('help_document');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('help_document');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_ACCESS') . ' -'));

View File

@ -159,10 +159,10 @@ class SermondistributorViewHelp_documents extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('help_documents');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('help_documents');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -97,10 +97,10 @@ class SermondistributorViewImport extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('import');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('import');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -162,10 +162,10 @@ class SermondistributorViewLocal_listing extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('local_listing');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('local_listing');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');

View File

@ -159,10 +159,10 @@ class SermondistributorViewLocal_listings extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('local_listings');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('local_listings');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');

View File

@ -174,10 +174,10 @@ class SermondistributorViewManual_updater extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('manual_updater');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('manual_updater');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -167,10 +167,10 @@ class SermondistributorViewPreacher extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preacher');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('preacher');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_ACCESS') . ' -'));

View File

@ -161,10 +161,10 @@ class SermondistributorViewPreachers extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preachers');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('preachers');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -167,10 +167,10 @@ class SermondistributorViewSeries extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('series');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('series');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_ACCESS') . ' -'));

View File

@ -159,10 +159,10 @@ class SermondistributorViewSeries_list extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('series_list');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('series_list');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -167,10 +167,10 @@ class SermondistributorViewSermon extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermon');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('sermon');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
?>
<div id="j-main-container">

View File

@ -25,6 +25,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Sermondistributor View class
*/
@ -72,10 +74,10 @@ class SermondistributorViewSermondistributor extends JViewLegacy
JToolBarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_DASHBOARD'), 'grid-2');
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermondistributor');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('sermondistributor');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
if ($canDo->get('core.admin') || $canDo->get('core.options'))

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multiplePreachers', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_PREACHER') . ' -'));

View File

@ -159,10 +159,10 @@ class SermondistributorViewSermons extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermons');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('sermons');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -26,8 +26,7 @@
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead

View File

@ -162,10 +162,10 @@ class SermondistributorViewStatistic extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('statistic');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('statistic');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -25,7 +25,6 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_SERMONDISTRIBUTOR_FILTER_SELECT_ACCESS') . ' -'));

View File

@ -159,10 +159,10 @@ class SermondistributorViewStatistics extends JViewLegacy
}
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('statistics');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('statistics');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,8 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
JHTML::_('behavior.modal');
use Joomla\CMS\Installer\Adapter\ComponentAdapter;
JHTML::_('bootstrap.renderModal');
/**
* Script File of Sermondistributor Component
@ -39,23 +40,23 @@ class com_sermondistributorInstallerScript
*
* @param JAdapterInstance $parent The object responsible for running this script
*/
public function __construct(JAdapterInstance $parent) {}
public function __construct(ComponentAdapter $parent) {}
/**
* Called on installation
*
* @param JAdapterInstance $parent The object responsible for running this script
* @param ComponentAdapter $parent The object responsible for running this script
*
* @return boolean True on success
*/
public function install(JAdapterInstance $parent) {}
public function install(ComponentAdapter $parent) {}
/**
* Called on uninstallation
*
* @param JAdapterInstance $parent The object responsible for running this script
* @param ComponentAdapter $parent The object responsible for running this script
*/
public function uninstall(JAdapterInstance $parent)
public function uninstall(ComponentAdapter $parent)
{
// Get Application object
$app = JFactory::getApplication();
@ -1002,21 +1003,21 @@ class com_sermondistributorInstallerScript
/**
* Called on update
*
* @param JAdapterInstance $parent The object responsible for running this script
* @param ComponentAdapter $parent The object responsible for running this script
*
* @return boolean True on success
*/
public function update(JAdapterInstance $parent){}
public function update(ComponentAdapter $parent){}
/**
* Called before any type of action
*
* @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script
* @param ComponentAdapter $parent The object responsible for running this script
*
* @return boolean True on success
*/
public function preflight($type, JAdapterInstance $parent)
public function preflight($type, ComponentAdapter $parent)
{
// get application
$app = JFactory::getApplication();
@ -1216,11 +1217,11 @@ class com_sermondistributorInstallerScript
* Called after any type of action
*
* @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script
* @param ComponentAdapter $parent The object responsible for running this script
*
* @return boolean True on success
*/
public function postflight($type, JAdapterInstance $parent)
public function postflight($type, ComponentAdapter $parent)
{
// get application
$app = JFactory::getApplication();
@ -1344,7 +1345,7 @@ class com_sermondistributorInstallerScript
$db->setQuery($query);
$allDone = $db->execute();
// Install the global extenstion params.
// Install the global extension params.
$query = $db->getQuery(true);
// Field to update.
$fields = array(

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<extension type="component" version="4" method="upgrade">
<name>COM_SERMONDISTRIBUTOR</name>
<creationDate>16th August, 2021</creationDate>
<creationDate>2nd March, 2022</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -37,8 +37,10 @@ class SermondistributorControllerAjax extends JControllerLegacy
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
JResponse::setHeader("Access-Control-Allow-Origin", "*");
// get the application
$app = JFactory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
$this->registerTask('theQueue', 'ajax');
$this->registerTask('countDownload', 'ajax');
@ -46,20 +48,26 @@ class SermondistributorControllerAjax extends JControllerLegacy
public function ajax()
{
// get the user for later use
$user = JFactory::getUser();
// get the input values
$jinput = JFactory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
$task = $this->getTask();
switch($task)
{
case 'theQueue':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$listValue = $jinput->get('list', NULL, 'INT');
$tarValue = $jinput->get('tar', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
@ -71,7 +79,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -86,10 +94,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -99,7 +111,6 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'countDownload':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$keyValue = $jinput->get('key', NULL, 'BASE64');
$filenameValue = $jinput->get('filename', NULL, 'CMD');
if($keyValue && $filenameValue)
@ -110,7 +121,7 @@ class SermondistributorControllerAjax extends JControllerLegacy
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
@ -125,10 +136,14 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
@ -139,10 +154,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
else
{
if($callback = $jinput->get('callback', null, 'CMD'))
// return to a callback function
if($callback)
{
echo $callback."(".json_encode(false).");";
}
// return raw
elseif($returnRaw)
{
echo json_encode(false);
}
else
{
echo "(".json_encode(false).");";

View File

@ -143,7 +143,7 @@ class SermondistributorModelCategory extends JModelList
{
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
foreach ($items as $nr => &$item)
{
// Always create a slug for sef URL's
@ -166,7 +166,7 @@ class SermondistributorModelCategory extends JModelList
$_description = new stdClass();
$_description->text =& $item->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.category.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.category.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// set idSermonStatisticE to the $item object.

View File

@ -143,7 +143,7 @@ class SermondistributorModelPreacher extends JModelList
{
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
foreach ($items as $nr => &$item)
{
// Always create a slug for sef URL's
@ -166,7 +166,7 @@ class SermondistributorModelPreacher extends JModelList
$_description = new stdClass();
$_description->text =& $item->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// set idSermonStatisticE to the $item object.
@ -317,14 +317,14 @@ class SermondistributorModelPreacher extends JModelList
}
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
// Check if item has params, or pass whole item.
$params = (isset($data->params) && SermondistributorHelper::checkJson($data->params)) ? json_decode($data->params) : $data;
// Make sure the content prepare plugins fire on description
$_description = new stdClass();
$_description->text =& $data->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);

View File

@ -111,7 +111,7 @@ class SermondistributorModelPreachers extends JModelList
{
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
foreach ($items as $nr => &$item)
{
// Always create a slug for sef URL's
@ -122,7 +122,7 @@ class SermondistributorModelPreachers extends JModelList
$_description = new stdClass();
$_description->text =& $item->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.preacher.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// set idPreacherSermonB to the $item object.

View File

@ -143,7 +143,7 @@ class SermondistributorModelSeries extends JModelList
{
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
foreach ($items as $nr => &$item)
{
// Always create a slug for sef URL's
@ -166,7 +166,7 @@ class SermondistributorModelSeries extends JModelList
$_description = new stdClass();
$_description->text =& $item->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// set idSermonStatisticE to the $item object.
@ -317,14 +317,14 @@ class SermondistributorModelSeries extends JModelList
}
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
// Check if item has params, or pass whole item.
$params = (isset($data->params) && SermondistributorHelper::checkJson($data->params)) ? json_decode($data->params) : $data;
// Make sure the content prepare plugins fire on description
$_description = new stdClass();
$_description->text =& $data->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);

View File

@ -111,7 +111,7 @@ class SermondistributorModelSerieslist extends JModelList
{
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
foreach ($items as $nr => &$item)
{
// Always create a slug for sef URL's
@ -122,7 +122,7 @@ class SermondistributorModelSerieslist extends JModelList
$_description = new stdClass();
$_description->text =& $item->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.series.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($item->description,$this->uikitComp);
// set idSeriesSermonB to the $item object.

View File

@ -168,7 +168,7 @@ class SermondistributorModelSermon extends JModelItem
}
// Load the JEvent Dispatcher
JPluginHelper::importPlugin('content');
$this->_dispatcher = JEventDispatcher::getInstance();
$this->_dispatcher = JFactory::getApplication();
// Check if we can decode local_files
if (SermondistributorHelper::checkJson($data->local_files))
{
@ -187,7 +187,7 @@ class SermondistributorModelSermon extends JModelItem
$_description = new stdClass();
$_description->text =& $data->description; // value must be in text
// Since all values are now in text (Joomla Limitation), we also add the field name (description) to context
$this->_dispatcher->trigger("onContentPrepare", array('com_sermondistributor.sermon.description', &$_description, &$params, 0));
$this->_dispatcher->triggerEvent("onContentPrepare", array('com_sermondistributor.sermon.description', &$_description, &$params, 0));
// Checking if description has uikit components that must be loaded.
$this->uikitComp = SermondistributorHelper::getUikitComp($data->description,$this->uikitComp);
// set the global sermon value.

View File

@ -127,7 +127,7 @@ class SermondistributorRouter extends JComponentRouterBase
$count = count($segments);
$vars = array();
//Handle View and Identifier
// Handle View and Identifier
switch($segments[0])
{
case 'preachers':

View File

@ -25,7 +25,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Set the component css/js
$document = JFactory::getDocument();
@ -34,7 +34,7 @@ $document->addScript('components/com_sermondistributor/assets/js/site.js');
// Require helper files
JLoader::register('SermondistributorHelper', __DIR__ . '/helpers/sermondistributor.php');
JLoader::register('SermondistributorHelperRoute', __DIR__ . '/helpers/route.php');
JLoader::register('SermondistributorHelperRoute', __DIR__ . '/helpers/route.php');
// Get an instance of the controller prefixed by Sermondistributor
$controller = JControllerLegacy::getInstance('Sermondistributor');

View File

@ -123,10 +123,10 @@ class SermondistributorViewApi extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('api');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('api');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -216,10 +216,10 @@ class SermondistributorViewCategories extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('categories');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('categories');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -157,8 +157,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -307,10 +307,10 @@ class SermondistributorViewCategory extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('category');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('category');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -190,8 +190,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -303,10 +303,10 @@ class SermondistributorViewPreacher extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preacher');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('preacher');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -231,10 +231,10 @@ class SermondistributorViewPreachers extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('preachers');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('preachers');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -157,8 +157,8 @@
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -302,10 +302,10 @@ class SermondistributorViewSeries extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('series');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('series');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -231,10 +231,10 @@ class SermondistributorViewSerieslist extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('serieslist');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('serieslist');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -282,10 +282,10 @@ class SermondistributorViewSermon extends JViewLegacy
{
// set help url for this view if found
$help_url = SermondistributorHelper::getHelpUrl('sermon');
if (SermondistributorHelper::checkString($help_url))
$this->help_url = SermondistributorHelper::getHelpUrl('sermon');
if (SermondistributorHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();