Urgent announcement option added to the new sermon distributor. Dropbox has broken and we are making ready to add the new implementation. The encryption options has also changed in Joomla and this has also impacted the distributor. We have made changes the prevent this from further effecting the project.

This commit is contained in:
Llewellyn van der Merwe 2016-11-02 02:18:26 +02:00
parent 5a90d4eada
commit f82e6b1069
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
254 changed files with 910 additions and 460 deletions

View File

@ -1,63 +1,63 @@
# Sermon Distributor (1.3.4)
![Sermon Distributor image] (https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")
![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor")
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x] (http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link] (https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip)
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip)
**If you like our component please rate it on the [Joomla Index] (http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
**If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
### Example Website, That Has Over 6000 Audio Files
[LoudVoice.org] (http://www.loudvoice.org)
[LoudVoice.org](http://www.loudvoice.org)
### Some Video Demonstrations
+ [Setup overview] (https://youtu.be/yMPp1Cp3W_0?t=20m8s)
+ [Setup Dropbox] (https://youtu.be/btpKFDk0-dI)
+ [Setup overview](https://youtu.be/yMPp1Cp3W_0?t=20m8s)
+ [Setup Dropbox](https://youtu.be/btpKFDk0-dI)
# Build Details
+ *Company*: [Vast Development Method] (https://www.vdm.io/)
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor] (https://www.vdm.io/)
+ *Company*: [Vast Development Method](https://www.vdm.io/)
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 17th July, 2016
+ *Last Build*: 31st October, 2016
+ *Version*: 1.3.4
+ *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:
**137 Hours** or **17 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder))
**140 Hours** or **18 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*: **49080**
+ *File count*: **356**
+ *Line count*: **50049**
+ *File count*: **364**
+ *Folder count*: **80**
**90 Hours** or **11 Eight Hour Days** (the actual time the author spent)
**92 Hours** or **11 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @34hours** = codingtime / 4;
> **debugging @35hours** = codingtime / 4;
> **planning @20hours** = codingtime / 7;
> **mapping @14hours** = codingtime / 10;
> **office @23hours** = codingtime / 6;)
**227 Hours** or **28 Eight Hour Days**
**232 Hours** or **29 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: **5.6 weeks** or **1.2 months**
Project duration: **5.8 weeks** or **1.2 months**
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
## Donations

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php
@ -45,6 +45,8 @@ class SermondistributorControllerAjax extends JControllerLegacy
$this->registerTask('checkDropboxListing', 'ajax');
$this->registerTask('updateDropboxListing', 'ajax');
$this->registerTask('getUpdateProgress', 'ajax');
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
}
public function ajax()
@ -173,6 +175,82 @@ class SermondistributorControllerAjax extends JControllerLegacy
}
}
break;
case 'isNew':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->isNew($noticeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'isRead':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->isRead($noticeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
else

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -96,6 +96,11 @@ abstract class SermondistributorHelper
**/
protected static $manuallisting = false;
/**
* The user notice info File Name
**/
protected static $usernotice = false;
/**
* check Dropbox Local Listing
**/
@ -105,7 +110,7 @@ abstract class SermondistributorHelper
// Get local key
$localkey = self::getLocalKey();
// decrypt the urls
$safe = new FOFEncryptAes($localkey, 256);
$safe = new FOFEncryptAes($localkey, 128);
// internal download url
$keyCounter = new stdClass;
$keyCounter->sermon = $sermon->id;
@ -289,7 +294,7 @@ abstract class SermondistributorHelper
{
// Get local key
$localkey = self::getLocalKey();
$opener = new FOFEncryptAes($localkey, 256);
$opener = new FOFEncryptAes($localkey, 128);
$counter = json_decode(rtrim($opener->decryptString(base64_decode($counter))));
if (self::checkObject($counter))
{
@ -413,16 +418,16 @@ abstract class SermondistributorHelper
return false;
}
protected static function getFilePath($type, $name = 'listing')
public static function getFilePath($type, $name = 'listing', $key = '', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE)
{
if (!self::checkString(self::${$type.$name}))
{
// Get local key
$localkey = self::getLocalKey();
// set the name
$fileName = md5($type.$name.$localkey);
$fileName = md5($type.$name.$localkey.$key);
// set file path
self::${$type.$name} = JPATH_COMPONENT_SITE.'/helpers/'.$fileName.'.json';
self::${$type.$name} = $PATH.'/helpers/'.$fileName.$fileType;
}
// return the path
return self::${$type.$name};

View File

@ -1,6 +1,9 @@
COM_SERMONDISTRIBUTOR="Sermon Distributor"
COM_SERMONDISTRIBUTOR_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
COM_SERMONDISTRIBUTOR_ALWAYS_BETTER_TO_ADD_THE_FILES_TO_DROPBOX_AND_LET_THE_SYSTEM_CREATE_THE_SERMON_FOR_YOU_PLEASE_READ_INSTRUCTIONS_BELOW_CAREFULLY="Always better to add the files to Dropbox and let the system create the sermon for you. Please read instructions below carefully."
COM_SERMONDISTRIBUTOR_AUTHOR="Author"
COM_SERMONDISTRIBUTOR_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading"
COM_SERMONDISTRIBUTOR_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading"
COM_SERMONDISTRIBUTOR_BACK="Back"
COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE="Categories (Site) Access"
COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC=" Allows the users in this group to access site categories."
@ -744,7 +747,7 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the help document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN="Admin"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW="Admin View"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being targeted"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being target."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL="Admin Views"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS="Alias"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ALIAS_HINT="Auto-generated from name"
@ -782,7 +785,7 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SAVE_WARNING="Alias already existed so a num
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SELECT_AN_OPTION="Select an option"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE="Site"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW="Site View"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION="Select the view being targeted"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION="Select the view being target."
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL="Site Views"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SOME="Some"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_STATUS="Status"
@ -849,9 +852,12 @@ COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE="- Keep Original State -"
COM_SERMONDISTRIBUTOR_LICENSE="License"
COM_SERMONDISTRIBUTOR_NEW="New"
COM_SERMONDISTRIBUTOR_NEW_ISSUE="New Issue"
COM_SERMONDISTRIBUTOR_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
COM_SERMONDISTRIBUTOR_NO_ACCESS_GRANTED="No Access Granted!"
COM_SERMONDISTRIBUTOR_NO_FILES_LINKED_YET="No Files Linked Yet"
COM_SERMONDISTRIBUTOR_OPENED_BY="opened by"
COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
COM_SERMONDISTRIBUTOR_PREACHER="Preacher"
COM_SERMONDISTRIBUTOR_PREACHERS="Preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS="Preachers Access"
@ -948,6 +954,8 @@ COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE="Website"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_DESCRIPTION="Enter website address"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT="http://www.example.com"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_LABEL="Website"
COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
COM_SERMONDISTRIBUTOR_SAVE_SUCCESS="Great! Item successfully saved."
COM_SERMONDISTRIBUTOR_SAVE_WARNING="The value already existed so please select another."
COM_SERMONDISTRIBUTOR_SERIES="Series"
@ -1354,7 +1362,11 @@ COM_SERMONDISTRIBUTOR_SUBMENU_SERIES_LIST="Series List"
COM_SERMONDISTRIBUTOR_SUBMENU_SERMONS="Sermons"
COM_SERMONDISTRIBUTOR_SUBMENU_STATISTICS="Statistics"
COM_SERMONDISTRIBUTOR_THE_FILES_LINKED_FROM_DROPBOX="The Files Linked from Dropbox"
COM_SERMONDISTRIBUTOR_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_SERMONDISTRIBUTOR_THE_README_IS_LOADING="The readme is loading"
COM_SERMONDISTRIBUTOR_THE_WIKI_IS_LOADING="The wiki is loading"
COM_SERMONDISTRIBUTOR_USE_BATCH="Use Batch"
COM_SERMONDISTRIBUTOR_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_SERMONDISTRIBUTOR_VERSION="Version"
COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github"
COM_SERMONDISTRIBUTOR_WEBSITE="Website"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.php
@ -66,6 +66,54 @@ class SermondistributorModelAjax extends JModelList
return true;
}
/**
* Check and if a vdm notice is new (per/user)
**/
public function isNew($notice)
{
// first get the file path
$path_filename = SermondistributorHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR);
// check if the file is set
if (($content = @file_get_contents($path_filename)) !== FALSE)
{
if ($notice == $content)
{
return false;
}
}
return true;
}
/**
* set That a notice has been read (per/user)
**/
public function isRead($notice)
{
// first get the file path
$path_filename = SermondistributorHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR);
// set as read if not already set
if (($content = @file_get_contents($path_filename)) !== FALSE)
{
if ($notice == $content)
{
return true;
}
}
return $this->saveFile($notice,$path_filename);
}
protected function saveFile($data,$path_filename)
{
if (SermondistributorHelper::checkString($data))
{
$fp = fopen($path_filename, 'w');
fwrite($fp, $data);
fclose($fp);
return true;
}
return false;
}
/**
* Update Dropbox local listing
**/
@ -478,12 +526,12 @@ class SermondistributorModelAjax extends JModelList
// set the date object
$date = JFactory::getDate();
// build the object
$object->name = $name;
$object->name = $name;
$object->alias = $alias;
$object->published = $this->app_params->get($type.'_state', 1);
$object->created = $date->toSql();
$object->version = 1;
$object->access = 1; // TODO must use a global setting here
$object->access = 1; // TODO must use a global setting here
// Insert the object into the table.
$done = $db->insertObject('#__sermondistributor_'.$type, $object);
// if done return last used id

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage articles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dropboxfiles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage localfiles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -150,7 +150,7 @@ class JFormFieldPreachers extends JFormFieldList
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','preacher_name')));
$query->select($db->quoteName(array('a.id','a.name'),array('id','preacher_request_id_name')));
$query->from($db->quoteName('#__sermondistributor_preacher', 'a'));
$query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC');
@ -162,7 +162,7 @@ class JFormFieldPreachers extends JFormFieldList
$options[] = JHtml::_('select.option', '', 'Select a preacher');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->preacher_name);
$options[] = JHtml::_('select.option', $item->id, $item->preacher_request_id_name);
}
}
return $options;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -150,7 +150,7 @@ class JFormFieldSeries extends JFormFieldList
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','series_name')));
$query->select($db->quoteName(array('a.id','a.name'),array('id','series_request_id_name')));
$query->from($db->quoteName('#__sermondistributor_series', 'a'));
$query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC');
@ -162,7 +162,7 @@ class JFormFieldSeries extends JFormFieldList
$options[] = JHtml::_('select.option', '', 'Select a series');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->series_name);
$options[] = JHtml::_('select.option', $item->id, $item->series_request_id_name);
}
}
return $options;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.js
@ -23,10 +23,12 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvvwgvwd_required = false;
jform_vvvvvwhvwe_required = false;
jform_vvvvvwivwf_required = false;
jform_vvvvvwjvwg_required = false;
jform_vvvvvwevwd_required = false;
jform_vvvvvwfvwe_required = false;
jform_vvvvvwgvwf_required = false;
jform_vvvvvwhvwg_required = false;
jform_vvvvvwivwh_required = false;
jform_vvvvvwjvwi_required = false;
// Initial Script
jQuery(document).ready(function()
@ -57,10 +59,27 @@ function vvvvvwe(location_vvvvvwe)
if (location_vvvvvwe == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
if (jform_vvvvvwevwd_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
jform_vvvvvwevwd_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
if (!jform_vvvvvwevwd_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
jform_vvvvvwevwd_required = true;
}
}
}
@ -71,10 +90,27 @@ function vvvvvwf(location_vvvvvwf)
if (location_vvvvvwf == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
if (jform_vvvvvwfvwe_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
jform_vvvvvwfvwe_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
if (!jform_vvvvvwfvwe_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
jform_vvvvvwfvwe_required = true;
}
}
}
@ -98,26 +134,26 @@ function vvvvvwg(type_vvvvvwg)
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_vvvvvwgvwd_required)
if (jform_vvvvvwgvwf_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvvwgvwd_required = false;
jform_vvvvvwgvwf_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_vvvvvwgvwd_required)
if (!jform_vvvvvwgvwf_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvvwgvwd_required = true;
jform_vvvvvwgvwf_required = true;
}
}
}
@ -153,26 +189,26 @@ function vvvvvwh(type_vvvvvwh)
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_vvvvvwhvwe_required)
if (jform_vvvvvwhvwg_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvvwhvwe_required = false;
jform_vvvvvwhvwg_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_vvvvvwhvwe_required)
if (!jform_vvvvvwhvwg_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvvwhvwe_required = true;
jform_vvvvvwhvwg_required = true;
}
}
}
@ -208,26 +244,26 @@ function vvvvvwi(type_vvvvvwi)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_vvvvvwivwf_required)
if (jform_vvvvvwivwh_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_vvvvvwivwf_required = false;
jform_vvvvvwivwh_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_vvvvvwivwf_required)
if (!jform_vvvvvwivwh_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_vvvvvwivwf_required = true;
jform_vvvvvwivwh_required = true;
}
}
}
@ -250,26 +286,26 @@ function vvvvvwj(target_vvvvvwj)
if (target_vvvvvwj == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_vvvvvwjvwg_required)
if (jform_vvvvvwjvwi_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvvwjvwg_required = false;
jform_vvvvvwjvwi_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_vvvvvwjvwg_required)
if (!jform_vvvvvwjvwi_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvvwjvwg_required = true;
jform_vvvvvwjvwi_required = true;
}
}
}

View File

@ -166,25 +166,27 @@
<option value="2">
COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE</option>
</field>
<!-- Admin_view Field. Type: Folderlist. (joomla) -->
<!-- Admin_view Field. Type: Adminviewfolderlist. (custom) -->
<field
type="folderlist"
type="adminviewfolderlist"
name="admin_view"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_LABEL"
directory="/administrator/components/com_sermondistributor/views"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION"
hide_none="true"
hide_default="true"
class="list_class"
multiple="false"
required="true"
button="false"
/>
<!-- Site_view Field. Type: Folderlist. (joomla) -->
<!-- Site_view Field. Type: Siteviewfolderlist. (custom) -->
<field
type="folderlist"
type="siteviewfolderlist"
name="site_view"
label="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_LABEL"
directory="/components/com_sermondistributor/views"
description="COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_SITE_VIEW_DESCRIPTION"
hide_none="true"
hide_default="true"
class="list_class"
multiple="false"
required="true"
button="false"
/>
<!-- Target Field. Type: Radio. (joomla) -->
<field

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.js

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.js

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.js

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.js

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php
@ -422,6 +422,26 @@ class SermondistributorModelHelp_document extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php
@ -265,30 +265,30 @@ class SermondistributorModelHelp_documents extends JModelList
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR a.site_view LIKE '.$search.')');
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR g. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR h. LIKE '.$search.')');
}
}
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type, true)));
$query->where('a.type = ' . $db->quote($db->escape($type)));
}
// Filter by Location.
if ($location = $this->getState('filter.location'))
{
$query->where('a.location = ' . $db->quote($db->escape($location, true)));
$query->where('a.location = ' . $db->quote($db->escape($location)));
}
// Filter by Admin_view.
// Filter by admin_view.
if ($admin_view = $this->getState('filter.admin_view'))
{
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view, true)));
$query->where('a.admin_view = ' . $db->quote($db->escape($admin_view)));
}
// Filter by Site_view.
// Filter by site_view.
if ($site_view = $this->getState('filter.site_view'))
{
$query->where('a.site_view = ' . $db->quote($db->escape($site_view, true)));
$query->where('a.site_view = ' . $db->quote($db->escape($site_view)));
}
// Add the list ordering clause.

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php
@ -525,6 +525,26 @@ class SermondistributorModelPreacher extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php
@ -182,7 +182,7 @@ class SermondistributorModelPreachers extends JModelList
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.')');
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php
@ -525,6 +525,26 @@ class SermondistributorModelSeries extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php
@ -178,7 +178,7 @@ class SermondistributorModelSeries_list extends JModelList
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.scripture LIKE '.$search.')');
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php
@ -564,6 +564,26 @@ class SermondistributorModelSermon extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -234,4 +234,153 @@ class SermondistributorModelSermondistributor extends JModelList
}
return $icons;
}
public function getGithub()
{
$document = JFactory::getDocument();
$document->addScript(JURI::root() . "media/com_sermondistributor/js/marked.js");
$document->addScriptDeclaration('
var token = "'.JSession::getFormToken().'";
var urlToGetAllOpenIssues = "https://api.github.com/repos/SermonDistributor/Joomla-3-Component/issues?state=open&page=1&per_page=5";
var urlToGetAllClosedIssues = "https://api.github.com/repos/SermonDistributor/Joomla-3-Component/issues?state=closed&page=1&per_page=5";
jQuery(document).ready(function () {
jQuery.getJSON(urlToGetAllOpenIssues, function (openissues) {
jQuery("#openissues").html("");
jQuery.each(openissues, function (i, issue) {
jQuery("#openissues")
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<small><em>#" + issue.number + " '.JText::_('COM_SERMONDISTRIBUTOR_OPENED_BY').' " + issue.user.login + "<em></small>")
.append(marked(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
jQuery.getJSON(urlToGetAllClosedIssues, function (closedissues) {
jQuery("#closedissues").html("");
jQuery.each(closedissues, function (i, issue) {
jQuery("#closedissues")
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<small><em>#" + issue.number + " '.JText::_('COM_SERMONDISTRIBUTOR_OPENED_BY').' " + issue.user.login + "<em></small>")
.append(marked(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
});
// to check is READ/NEW
function getIS(type,notice){
if(type == 1){
var getUrl = "index.php?option=com_sermondistributor&task=ajax.isNew&format=json";
} else if (type == 2) {
var getUrl = "index.php?option=com_sermondistributor&task=ajax.isRead&format=json";
}
if(token.length > 0 && notice.length){
var request = "token="+token+"&notice="+notice;
}
return jQuery.ajax({
type: "POST",
url: getUrl,
dataType: "jsonp",
data: request,
jsonp: "callback"
});
}
// nice little dot trick :)
jQuery(document).ready( function($) {
var x=0;
setInterval(function() {
var dots = "";
x++;
for (var y=0; y < x%8; y++) {
dots+=".";
}
$(".loading-dots").text(dots);
} , 500);
});');
$create = '<div class="btn-group pull-right">
<a href="https://github.com/SermonDistributor/Joomla-3-Component/issues/new" class="btn btn-primary" target="_blank">'.JText::_('COM_SERMONDISTRIBUTOR_NEW_ISSUE').'</a>
</div></br >';
$moreopen = '<b><a href="https://github.com/SermonDistributor/Joomla-3-Component/issues" target="_blank">'.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'</a>...</b>';
$moreclosed = '<b><a href="https://github.com/SermonDistributor/Joomla-3-Component/issues?q=is%3Aissue+is%3Aclosed" target="_blank">'.JText::_('COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB').'</a>...</b>';
return (object) array(
'openissues' => $create.'<div id="openissues">'.JText::_('COM_SERMONDISTRIBUTOR_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING').'.<span class="loading-dots">.</span></small></div>'.$moreopen,
'closedissues' => $create.'<div id="closedissues">'.JText::_('COM_SERMONDISTRIBUTOR_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING').'.<span class="loading-dots">.</span></small></div>'.$moreclosed
);
}
public function getReadme()
{
$document = JFactory::getDocument();
$document->addScriptDeclaration('
var getreadme = "'. JURI::root() . 'administrator/components/com_sermondistributor/README.txt";
jQuery(document).ready(function () {
jQuery.get(getreadme)
.success(function(readme) {
jQuery("#readme-md").html(marked(readme));
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#readme-md").html("'.JText::_('COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER').'");
});
});');
return '<div id="readme-md">'.JText::_('COM_SERMONDISTRIBUTOR_THE_README_IS_LOADING').'.<span class="loading-dots">.</span></small></div>';
}
public function getWiki()
{
$document = JFactory::getDocument();
$document->addScriptDeclaration('
var gewiki = "https://raw.githubusercontent.com/wiki/SermonDistributor/Joomla-3-Component/Home.md";
jQuery(document).ready(function () {
jQuery.get(gewiki)
.success(function(wiki) {
jQuery("#wiki-md").html(marked(wiki));
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#wiki-md").html("'.JText::_('COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER').'");
});
});');
return '<div id="wiki-md">'.JText::_('COM_SERMONDISTRIBUTOR_THE_WIKI_IS_LOADING').'.<span class="loading-dots">.</span></small></div>';
}
public function getNoticeboard()
{
$document = JFactory::getDocument();
$document->addScriptDeclaration('
var noticeboard = "https://www.vdm.io/sermondistributor-noticeboard-md";
jQuery(document).ready(function () {
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery("#noticeboard-md").html(marked(board));
getIS(1,board).done(function(result) {
if (result){
jQuery("#cpanel_tabTabs a").each(function() {
if (this.href.indexOf("#vast_development_method") >= 0) {
var textVDM = jQuery(this).text();
jQuery(this).html("<span class=\"label label-important vdm-new-notice\">1</span> "+textVDM);
jQuery(this).attr("id","vdm-new-notice");
jQuery("#vdm-new-notice").click(function() {
getIS(2,board).done(function(result) {
if (result) {
jQuery(".vdm-new-notice").fadeOut(500);
}
});
});
}
});
}
});
} else {
jQuery("#noticeboard-md").html("'.JText::_('COM_SERMONDISTRIBUTOR_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'");
}
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#noticeboard-md").html("'.JText::_('COM_SERMONDISTRIBUTOR_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'");
});
});');
return '<div id="noticeboard-md">'.JText::_('COM_SERMONDISTRIBUTOR_THE_NOTICE_BOARD_IS_LOADING').'.<span class="loading-dots">.</span></small></div>';
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php
@ -271,7 +271,7 @@ class SermondistributorModelSermons extends JModelList
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.preacher LIKE '.$search.' OR g.name LIKE '.$search.' OR a.series LIKE '.$search.' OR h.name LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.link_type LIKE '.$search.' OR a.scripture LIKE '.$search.')');
}
}
@ -279,22 +279,22 @@ class SermondistributorModelSermons extends JModelList
// Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
$query->where('a.preacher = ' . $db->quote($db->escape($preacher)));
}
// Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
$query->where('a.series = ' . $db->quote($db->escape($series)));
}
// Filter by Link_type.
if ($link_type = $this->getState('filter.link_type'))
{
$query->where('a.link_type = ' . $db->quote($db->escape($link_type, true)));
$query->where('a.link_type = ' . $db->quote($db->escape($link_type)));
}
// Filter by Source.
if ($source = $this->getState('filter.source'))
{
$query->where('a.source = ' . $db->quote($db->escape($source, true)));
$query->where('a.source = ' . $db->quote($db->escape($source)));
}
// Filter by a single or group of categories.

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php
@ -382,6 +382,26 @@ class SermondistributorModelStatistic extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php
@ -206,7 +206,7 @@ class SermondistributorModelStatistics extends JModelList
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.filename LIKE '.$search.' OR a.sermon LIKE '.$search.' OR g.name LIKE '.$search.' OR a.preacher LIKE '.$search.' OR h.name LIKE '.$search.' OR a.series LIKE '.$search.' OR i.name LIKE '.$search.')');
}
}
@ -214,17 +214,17 @@ class SermondistributorModelStatistics extends JModelList
// Filter by sermon.
if ($sermon = $this->getState('filter.sermon'))
{
$query->where('a.sermon = ' . $db->quote($db->escape($sermon, true)));
$query->where('a.sermon = ' . $db->quote($db->escape($sermon)));
}
// Filter by preacher.
if ($preacher = $this->getState('filter.preacher'))
{
$query->where('a.preacher = ' . $db->quote($db->escape($preacher, true)));
$query->where('a.preacher = ' . $db->quote($db->escape($preacher)));
}
// Filter by series.
if ($series = $this->getState('filter.series'))
{
$query->where('a.series = ' . $db->quote($db->escape($series, true)));
$query->where('a.series = ' . $db->quote($db->escape($series)));
}
// Add the list ordering clause.

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -2,12 +2,12 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_preacher` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`alias` CHAR(64) NOT NULL DEFAULT '',
`description` TEXT NOT NULL DEFAULT '',
`description` TEXT NOT NULL,
`email` VARCHAR(255) NOT NULL DEFAULT '',
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`website` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`params` TEXT NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
@ -36,14 +36,14 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`alias` CHAR(64) NOT NULL DEFAULT '',
`auto_sermons` TEXT NOT NULL DEFAULT '',
`auto_sermons` TEXT NOT NULL,
`build` TINYINT(1) NOT NULL DEFAULT '1',
`catid` INT(11) NOT NULL DEFAULT '0',
`description` TEXT NOT NULL DEFAULT '',
`description` TEXT NOT NULL,
`icon` CHAR(64) NOT NULL DEFAULT '',
`link_type` TINYINT(1) NOT NULL DEFAULT '1',
`local_files` TEXT NOT NULL DEFAULT '',
`manual_files` TEXT NOT NULL DEFAULT '',
`local_files` TEXT NOT NULL,
`manual_files` TEXT NOT NULL,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`not_required` INT(1) NOT NULL DEFAULT '0',
`preacher` INT(11) NOT NULL DEFAULT '0',
@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` (
`short_description` VARCHAR(255) NOT NULL DEFAULT '',
`source` TINYINT(1) NOT NULL DEFAULT '0',
`url` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`params` TEXT NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
@ -86,11 +86,11 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_series` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',
`alias` CHAR(64) NOT NULL DEFAULT '',
`description` TEXT NOT NULL DEFAULT '',
`description` TEXT NOT NULL,
`icon` CHAR(64) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`scripture` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NOT NULL DEFAULT '',
`params` TEXT NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) 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 DEFAULT '',
`params` TEXT NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',
@ -156,8 +156,8 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` (
`admin_view` CHAR(255) NOT NULL DEFAULT '',
`alias` CHAR(64) NOT NULL DEFAULT '',
`article` TINYINT(1) NOT NULL DEFAULT '0',
`content` TEXT NOT NULL DEFAULT '',
`groups` TEXT NOT NULL DEFAULT '',
`content` TEXT NOT NULL,
`groups` TEXT NOT NULL,
`location` TINYINT(1) NOT NULL DEFAULT '0',
`not_required` INT(1) NOT NULL DEFAULT '0',
`site_view` CHAR(255) NOT NULL DEFAULT '',
@ -165,7 +165,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 DEFAULT '',
`params` TEXT NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '0',
`modified_by` int(11) NOT NULL DEFAULT '0',

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.3.4
@build 17th July, 2016
@build 31st October, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage submitbutton.js

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