From b2516dfe23240220dc5bec67f89aaae573f58bcd Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 27 Nov 2016 06:20:48 +0200 Subject: [PATCH] The update to fix #25, please note that this is a major upgrade and will require manual steps prior to the upgrade to set the Dropbox integration, watch the [tutorials](http://vdm.bz/sermondistributor-external-source-tutorials) for help. --- README.md | 28 +- admin/README.txt | 28 +- admin/access.xml | 89 ++ admin/assets/css/admin.css | 4 +- admin/assets/css/dashboard.css | 4 +- admin/assets/css/external_source.css | 27 + admin/assets/css/external_sources.css | 27 + admin/assets/css/help_document.css | 4 +- admin/assets/css/help_documents.css | 4 +- admin/assets/css/local_listing.css | 27 + admin/assets/css/local_listings.css | 27 + admin/assets/css/manual_updater.css | 27 + admin/assets/css/preacher.css | 4 +- admin/assets/css/preachers.css | 4 +- admin/assets/css/series.css | 4 +- admin/assets/css/series_list.css | 4 +- admin/assets/css/sermon.css | 4 +- admin/assets/css/sermons.css | 4 +- admin/assets/css/statistic.css | 4 +- admin/assets/css/statistics.css | 4 +- .../images/icons/external_source_add.png | Bin 0 -> 15533 bytes .../assets/images/icons/external_sources.png | Bin 0 -> 12648 bytes admin/assets/images/icons/local_listings.png | Bin 0 -> 23378 bytes admin/assets/images/icons/manual_updater.png | Bin 0 -> 12108 bytes admin/config.xml | 757 +++------ admin/controller.php | 6 +- admin/controllers/ajax.json.php | 52 +- admin/controllers/external_source.php | 326 ++++ admin/controllers/external_sources.php | 111 ++ admin/controllers/help.php | 4 +- admin/controllers/help_document.php | 4 +- admin/controllers/help_documents.php | 4 +- admin/controllers/import.php | 4 +- admin/controllers/local_listing.php | 326 ++++ admin/controllers/local_listings.php | 111 ++ admin/controllers/manual_updater.php | 61 + admin/controllers/preacher.php | 4 +- admin/controllers/preachers.php | 4 +- admin/controllers/series.php | 4 +- admin/controllers/series_list.php | 4 +- admin/controllers/sermon.php | 4 +- admin/controllers/sermondistributor.php | 4 +- admin/controllers/sermons.php | 4 +- admin/controllers/statistic.php | 4 +- admin/controllers/statistics.php | 4 +- admin/helpers/html/batch_.php | 4 +- admin/helpers/sermondistributor.php | 394 +++-- .../en-GB/en-GB.com_sermondistributor.ini | 814 +++++----- admin/layouts/batchselection.php | 4 +- .../layouts/external_source/details_above.php | 42 + .../external_source/details_fullwidth.php | 49 + .../layouts/external_source/details_left.php | 58 + .../layouts/external_source/details_right.php | 58 + .../layouts/external_source/details_under.php | 41 + admin/layouts/external_source/index.html | 1 + admin/layouts/external_source/publishing.php | 58 + admin/layouts/external_source/publlshing.php | 59 + .../external_source/wiki_fullwidth.php | 49 + admin/layouts/help_document/details_above.php | 4 +- .../help_document/details_fullwidth.php | 4 +- admin/layouts/help_document/details_left.php | 4 +- admin/layouts/help_document/details_right.php | 4 +- admin/layouts/help_document/details_under.php | 4 +- admin/layouts/help_document/metadata.php | 4 +- admin/layouts/help_document/publishing.php | 4 +- admin/layouts/local_listing/details_above.php | 42 + .../local_listing/details_fullwidth.php | 49 + admin/layouts/local_listing/details_left.php | 54 + admin/layouts/local_listing/details_right.php | 54 + admin/layouts/local_listing/index.html | 1 + admin/layouts/local_listing/publishing.php | 58 + admin/layouts/local_listing/publlshing.php | 59 + admin/layouts/preacher/details_above.php | 4 +- admin/layouts/preacher/details_fullwidth.php | 4 +- admin/layouts/preacher/details_left.php | 4 +- admin/layouts/preacher/details_right.php | 4 +- admin/layouts/preacher/metadata.php | 4 +- admin/layouts/preacher/publishing.php | 4 +- admin/layouts/preacher/sermons_fullwidth.php | 4 +- admin/layouts/series/details_above.php | 4 +- admin/layouts/series/details_fullwidth.php | 4 +- admin/layouts/series/details_left.php | 4 +- admin/layouts/series/details_right.php | 4 +- admin/layouts/series/metadata.php | 4 +- admin/layouts/series/publishing.php | 4 +- admin/layouts/series/sermons_fullwidth.php | 4 +- admin/layouts/sermon/details_above.php | 4 +- admin/layouts/sermon/details_fullwidth.php | 4 +- admin/layouts/sermon/details_left.php | 4 +- admin/layouts/sermon/details_right.php | 4 +- admin/layouts/sermon/details_under.php | 4 +- admin/layouts/sermon/files_fullwidth.php | 8 +- admin/layouts/sermon/metadata.php | 4 +- admin/layouts/sermon/publishing.php | 4 +- admin/layouts/sermon/stastics_fullwidth.php | 4 +- admin/layouts/statistic/details_above.php | 4 +- admin/layouts/statistic/details_left.php | 4 +- admin/layouts/statistic/details_right.php | 4 +- admin/layouts/statistic/metadata.php | 4 +- admin/layouts/statistic/publishing.php | 4 +- admin/models/ajax.php | 237 ++- admin/models/external_source.php | 1122 +++++++++++++ admin/models/external_sources.php | 515 ++++++ admin/models/fields/adminviewfolderlist.php | 4 +- admin/models/fields/articles.php | 4 +- admin/models/fields/externalsource.php | 171 ++ ...opboxfiles.php => externalsourcefiles.php} | 25 +- admin/models/fields/localfiles.php | 4 +- admin/models/fields/preachers.php | 4 +- admin/models/fields/series.php | 4 +- admin/models/fields/sermon.php | 4 +- admin/models/fields/siteviewfolderlist.php | 4 +- admin/models/forms/external_source.js | 1097 +++++++++++++ admin/models/forms/external_source.xml | 372 +++++ admin/models/forms/help_document.js | 178 +-- admin/models/forms/local_listing.js | 192 +++ admin/models/forms/local_listing.xml | 193 +++ admin/models/forms/preacher.js | 4 +- admin/models/forms/series.js | 4 +- admin/models/forms/sermon.js | 22 +- admin/models/forms/sermon.xml | 29 +- admin/models/forms/statistic.js | 4 +- admin/models/help_document.php | 7 +- admin/models/help_documents.php | 4 +- admin/models/import.php | 4 +- admin/models/local_listing.php | 1011 ++++++++++++ admin/models/local_listings.php | 428 +++++ admin/models/manual_updater.php | 153 ++ admin/models/preacher.php | 9 +- admin/models/preachers.php | 4 +- admin/models/series.php | 9 +- admin/models/series_list.php | 4 +- admin/models/sermon.php | 7 +- admin/models/sermondistributor.php | 20 +- admin/models/sermons.php | 6 +- admin/models/statistic.php | 7 +- admin/models/statistics.php | 4 +- admin/sermondistributor.php | 4 +- admin/sql/install.mysql.utf8.sql | 71 +- admin/sql/uninstall.mysql.utf8.sql | 2 + admin/sql/updates/mysql/1.3.8.sql | 68 + admin/tables/external_source.php | 351 +++++ admin/tables/help_document.php | 4 +- admin/tables/local_listing.php | 351 +++++ admin/tables/preacher.php | 4 +- admin/tables/series.php | 4 +- admin/tables/sermon.php | 4 +- admin/tables/statistic.php | 4 +- admin/views/external_source/submitbutton.js | 49 + admin/views/external_source/tmpl/edit.php | 699 ++++++++ admin/views/external_source/tmpl/index.html | 1 + admin/views/external_source/view.html.php | 206 +++ admin/views/external_sources/index.html | 1 + admin/views/external_sources/tmpl/default.php | 99 ++ .../tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../external_sources/tmpl/default_body.php | 129 ++ .../external_sources/tmpl/default_foot.php | 32 + .../external_sources/tmpl/default_head.php | 73 + .../external_sources/tmpl/default_toolbar.php | 59 + admin/views/external_sources/tmpl/index.html | 1 + admin/views/external_sources/view.html.php | 427 +++++ admin/views/help_document/submitbutton.js | 4 +- admin/views/help_document/tmpl/edit.php | 64 +- admin/views/help_document/view.html.php | 4 +- admin/views/help_documents/tmpl/default.php | 4 +- .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../help_documents/tmpl/default_body.php | 4 +- .../help_documents/tmpl/default_foot.php | 4 +- .../help_documents/tmpl/default_head.php | 4 +- .../help_documents/tmpl/default_toolbar.php | 4 +- admin/views/help_documents/view.html.php | 4 +- admin/views/import/tmpl/default.php | 4 +- admin/views/import/view.html.php | 4 +- admin/views/local_listing/submitbutton.js | 49 + admin/views/local_listing/tmpl/edit.php | 178 +++ admin/views/local_listing/tmpl/index.html | 1 + admin/views/local_listing/view.html.php | 206 +++ admin/views/local_listings/index.html | 1 + admin/views/local_listings/tmpl/default.php | 99 ++ .../tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../local_listings/tmpl/default_body.php | 120 ++ .../local_listings/tmpl/default_foot.php | 32 + .../local_listings/tmpl/default_head.php | 73 + .../local_listings/tmpl/default_toolbar.php | 59 + admin/views/local_listings/tmpl/index.html | 1 + admin/views/local_listings/view.html.php | 334 ++++ admin/views/manual_updater/index.html | 1 + admin/views/manual_updater/tmpl/default.php | 192 +++ admin/views/manual_updater/tmpl/index.html | 1 + admin/views/manual_updater/view.html.php | 184 +++ admin/views/preacher/submitbutton.js | 4 +- admin/views/preacher/tmpl/edit.php | 28 +- admin/views/preacher/view.html.php | 4 +- admin/views/preachers/tmpl/default.php | 4 +- .../preachers/tmpl/default_batch_body.php | 4 +- .../preachers/tmpl/default_batch_footer.php | 4 +- admin/views/preachers/tmpl/default_body.php | 4 +- admin/views/preachers/tmpl/default_foot.php | 4 +- admin/views/preachers/tmpl/default_head.php | 4 +- .../views/preachers/tmpl/default_toolbar.php | 4 +- admin/views/preachers/view.html.php | 4 +- admin/views/series/submitbutton.js | 4 +- admin/views/series/tmpl/edit.php | 28 +- admin/views/series/view.html.php | 4 +- admin/views/series_list/tmpl/default.php | 4 +- .../series_list/tmpl/default_batch_body.php | 4 +- .../series_list/tmpl/default_batch_footer.php | 4 +- admin/views/series_list/tmpl/default_body.php | 4 +- admin/views/series_list/tmpl/default_foot.php | 4 +- admin/views/series_list/tmpl/default_head.php | 4 +- .../series_list/tmpl/default_toolbar.php | 4 +- admin/views/series_list/view.html.php | 4 +- admin/views/sermon/submitbutton.js | 4 +- admin/views/sermon/tmpl/edit.php | 68 +- admin/views/sermon/view.html.php | 4 +- .../views/sermondistributor/tmpl/default.php | 4 +- ...sed_issues_the_closed_issues_on_github.php | 4 +- .../sermondistributor/tmpl/default_main.php | 4 +- ..._open_issues_the_open_issues_on_github.php | 4 +- .../tmpl/default_readme_information.php | 4 +- ...t_vast_development_method_notice_board.php | 4 +- .../sermondistributor/tmpl/default_vdm.php | 4 +- admin/views/sermondistributor/view.html.php | 4 +- admin/views/sermons/tmpl/default.php | 4 +- .../views/sermons/tmpl/default_batch_body.php | 4 +- .../sermons/tmpl/default_batch_footer.php | 4 +- admin/views/sermons/tmpl/default_body.php | 4 +- admin/views/sermons/tmpl/default_foot.php | 4 +- admin/views/sermons/tmpl/default_head.php | 4 +- admin/views/sermons/tmpl/default_toolbar.php | 4 +- admin/views/sermons/view.html.php | 4 +- admin/views/statistic/submitbutton.js | 4 +- admin/views/statistic/tmpl/edit.php | 4 +- admin/views/statistic/view.html.php | 4 +- admin/views/statistics/tmpl/default.php | 4 +- .../statistics/tmpl/default_batch_body.php | 4 +- .../statistics/tmpl/default_batch_footer.php | 4 +- admin/views/statistics/tmpl/default_body.php | 4 +- admin/views/statistics/tmpl/default_foot.php | 4 +- admin/views/statistics/tmpl/default_head.php | 4 +- .../views/statistics/tmpl/default_toolbar.php | 4 +- admin/views/statistics/view.html.php | 4 +- script.php | 442 +++++- sermondistributor.xml | 8 +- sermondistributor_update_server.xml | 155 ++ site/assets/css/categories.css | 4 +- site/assets/css/category.css | 4 +- site/assets/css/preacher.css | 4 +- site/assets/css/preachers.css | 4 +- site/assets/css/series.css | 4 +- site/assets/css/serieslist.css | 4 +- site/assets/css/sermon.css | 4 +- site/assets/css/site.css | 4 +- site/controller.php | 4 +- site/controllers/ajax.json.php | 16 +- site/controllers/download.php | 12 +- site/controllers/help.php | 4 +- site/helpers/dropbox.php | 589 ++++--- site/helpers/dropboxupdater.php | 322 ++-- site/helpers/headercheck.php | 4 +- site/helpers/route.php | 4 +- site/helpers/sermondistributor.php | 376 ++++- .../en-GB/en-GB.com_sermondistributor.ini | 1401 +++++++++++++++++ site/layouts/addtodropboxbutton.php | 4 +- site/layouts/addtodropboxicon.php | 4 +- site/layouts/categorieslistitem.php | 4 +- site/layouts/categoriespanel.php | 4 +- site/layouts/categoriesrow.php | 4 +- site/layouts/downloadsermonbutton.php | 4 +- site/layouts/isnew.php | 4 +- site/layouts/jplayerbluemonday.php | 4 +- site/layouts/jplayerbluemondaylist.php | 4 +- site/layouts/mediaplayer.php | 4 +- site/layouts/opensermonbutton.php | 4 +- site/layouts/preacherslistitem.php | 4 +- site/layouts/preacherspanel.php | 4 +- site/layouts/preachersrow.php | 4 +- site/layouts/serieslistitem.php | 4 +- site/layouts/seriespanel.php | 4 +- site/layouts/seriesrow.php | 4 +- site/layouts/sermonslistitem.php | 4 +- site/layouts/sermonspanel.php | 4 +- site/layouts/sermonsrow.php | 4 +- site/layouts/soundmanagerthreesixty.php | 4 +- site/models/ajax.php | 126 +- site/models/categories.php | 4 +- site/models/category.php | 4 +- site/models/preacher.php | 4 +- site/models/preachers.php | 4 +- site/models/series.php | 4 +- site/models/serieslist.php | 4 +- site/models/sermon.php | 4 +- site/router.php | 4 +- site/sermondistributor.php | 4 +- site/views/categories/tmpl/default.php | 4 +- .../tmpl/default_categories-grid.php | 4 +- .../tmpl/default_categories-list.php | 4 +- .../tmpl/default_categories-table.php | 4 +- site/views/categories/view.html.php | 4 +- site/views/category/tmpl/default.php | 6 +- site/views/category/tmpl/default.xml | 12 +- .../category/tmpl/default_categorybox.php | 4 +- .../category/tmpl/default_categorypanel.php | 4 +- .../category/tmpl/default_categorysmall.php | 4 +- .../category/tmpl/default_sermons-grid.php | 4 +- .../category/tmpl/default_sermons-list.php | 4 +- .../category/tmpl/default_sermons-table.php | 4 +- site/views/category/view.html.php | 4 +- site/views/preacher/tmpl/default.php | 6 +- site/views/preacher/tmpl/default.xml | 12 +- .../preacher/tmpl/default_preacherbox.php | 4 +- .../preacher/tmpl/default_preacherpanel.php | 4 +- .../preacher/tmpl/default_preachersmall.php | 4 +- .../preacher/tmpl/default_sermons-grid.php | 4 +- .../preacher/tmpl/default_sermons-list.php | 4 +- .../preacher/tmpl/default_sermons-table.php | 4 +- site/views/preacher/view.html.php | 4 +- site/views/preachers/tmpl/default.php | 4 +- .../preachers/tmpl/default_preachers-grid.php | 4 +- .../preachers/tmpl/default_preachers-list.php | 4 +- .../tmpl/default_preachers-table.php | 4 +- site/views/preachers/view.html.php | 4 +- site/views/series/tmpl/default.php | 6 +- site/views/series/tmpl/default.xml | 12 +- site/views/series/tmpl/default_seriesbox.php | 4 +- .../views/series/tmpl/default_seriespanel.php | 4 +- .../views/series/tmpl/default_seriessmall.php | 4 +- .../series/tmpl/default_sermons-grid.php | 4 +- .../series/tmpl/default_sermons-list.php | 4 +- .../series/tmpl/default_sermons-table.php | 4 +- site/views/series/view.html.php | 4 +- site/views/serieslist/tmpl/default.php | 4 +- .../serieslist/tmpl/default_series-grid.php | 4 +- .../serieslist/tmpl/default_series-list.php | 4 +- .../serieslist/tmpl/default_series-table.php | 4 +- site/views/serieslist/view.html.php | 4 +- site/views/sermon/tmpl/default.php | 6 +- site/views/sermon/tmpl/default_sermonbig.php | 4 +- site/views/sermon/tmpl/default_sermonbox.php | 4 +- .../views/sermon/tmpl/default_sermonpanel.php | 4 +- site/views/sermon/view.html.php | 4 +- 344 files changed, 16329 insertions(+), 2342 deletions(-) create mode 100644 admin/assets/css/external_source.css create mode 100644 admin/assets/css/external_sources.css create mode 100644 admin/assets/css/local_listing.css create mode 100644 admin/assets/css/local_listings.css create mode 100644 admin/assets/css/manual_updater.css create mode 100644 admin/assets/images/icons/external_source_add.png create mode 100644 admin/assets/images/icons/external_sources.png create mode 100644 admin/assets/images/icons/local_listings.png create mode 100644 admin/assets/images/icons/manual_updater.png create mode 100644 admin/controllers/external_source.php create mode 100644 admin/controllers/external_sources.php create mode 100644 admin/controllers/local_listing.php create mode 100644 admin/controllers/local_listings.php create mode 100644 admin/controllers/manual_updater.php create mode 100644 admin/layouts/external_source/details_above.php create mode 100644 admin/layouts/external_source/details_fullwidth.php create mode 100644 admin/layouts/external_source/details_left.php create mode 100644 admin/layouts/external_source/details_right.php create mode 100644 admin/layouts/external_source/details_under.php create mode 100644 admin/layouts/external_source/index.html create mode 100644 admin/layouts/external_source/publishing.php create mode 100644 admin/layouts/external_source/publlshing.php create mode 100644 admin/layouts/external_source/wiki_fullwidth.php create mode 100644 admin/layouts/local_listing/details_above.php create mode 100644 admin/layouts/local_listing/details_fullwidth.php create mode 100644 admin/layouts/local_listing/details_left.php create mode 100644 admin/layouts/local_listing/details_right.php create mode 100644 admin/layouts/local_listing/index.html create mode 100644 admin/layouts/local_listing/publishing.php create mode 100644 admin/layouts/local_listing/publlshing.php create mode 100644 admin/models/external_source.php create mode 100644 admin/models/external_sources.php create mode 100644 admin/models/fields/externalsource.php rename admin/models/fields/{dropboxfiles.php => externalsourcefiles.php} (90%) create mode 100644 admin/models/forms/external_source.js create mode 100644 admin/models/forms/external_source.xml create mode 100644 admin/models/forms/local_listing.js create mode 100644 admin/models/forms/local_listing.xml create mode 100644 admin/models/local_listing.php create mode 100644 admin/models/local_listings.php create mode 100644 admin/models/manual_updater.php create mode 100644 admin/sql/updates/mysql/1.3.8.sql create mode 100644 admin/tables/external_source.php create mode 100644 admin/tables/local_listing.php create mode 100644 admin/views/external_source/submitbutton.js create mode 100644 admin/views/external_source/tmpl/edit.php create mode 100644 admin/views/external_source/tmpl/index.html create mode 100644 admin/views/external_source/view.html.php create mode 100644 admin/views/external_sources/index.html create mode 100644 admin/views/external_sources/tmpl/default.php create mode 100644 admin/views/external_sources/tmpl/default_batch_body.php create mode 100644 admin/views/external_sources/tmpl/default_batch_footer.php create mode 100644 admin/views/external_sources/tmpl/default_body.php create mode 100644 admin/views/external_sources/tmpl/default_foot.php create mode 100644 admin/views/external_sources/tmpl/default_head.php create mode 100644 admin/views/external_sources/tmpl/default_toolbar.php create mode 100644 admin/views/external_sources/tmpl/index.html create mode 100644 admin/views/external_sources/view.html.php create mode 100644 admin/views/local_listing/submitbutton.js create mode 100644 admin/views/local_listing/tmpl/edit.php create mode 100644 admin/views/local_listing/tmpl/index.html create mode 100644 admin/views/local_listing/view.html.php create mode 100644 admin/views/local_listings/index.html create mode 100644 admin/views/local_listings/tmpl/default.php create mode 100644 admin/views/local_listings/tmpl/default_batch_body.php create mode 100644 admin/views/local_listings/tmpl/default_batch_footer.php create mode 100644 admin/views/local_listings/tmpl/default_body.php create mode 100644 admin/views/local_listings/tmpl/default_foot.php create mode 100644 admin/views/local_listings/tmpl/default_head.php create mode 100644 admin/views/local_listings/tmpl/default_toolbar.php create mode 100644 admin/views/local_listings/tmpl/index.html create mode 100644 admin/views/local_listings/view.html.php create mode 100644 admin/views/manual_updater/index.html create mode 100644 admin/views/manual_updater/tmpl/default.php create mode 100644 admin/views/manual_updater/tmpl/index.html create mode 100644 admin/views/manual_updater/view.html.php create mode 100644 sermondistributor_update_server.xml diff --git a/README.md b/README.md index d65d56e4..1eb8c694 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Sermon Distributor (1.3.8) +# Sermon Distributor (1.4.0) ![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor") @@ -23,38 +23,38 @@ The best way to see all your options is to install this component on you Joomla + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@vdm.io) + *Name*: [Sermon Distributor](https://www.vdm.io/) + *First Build*: 22nd October, 2015 -+ *Last Build*: 2nd November, 2016 -+ *Version*: 1.3.8 ++ *Last Build*: 27th November, 2016 ++ *Version*: 1.4.0 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time :hourglass: -**140 Hours** or **18 Eight Hour Days** (actual time the author saved - +**178 Hours** or **22 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*: **50067** -+ *File count*: **365** -+ *Folder count*: **80** ++ *Line count*: **63763** ++ *File count*: **436** ++ *Folder count*: **90** -**92 Hours** or **11 Eight Hour Days** (the actual time the author spent) +**117 Hours** or **15 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @35hours** = codingtime / 4; -> **planning @20hours** = codingtime / 7; -> **mapping @14hours** = codingtime / 10; -> **office @23hours** = codingtime / 6;) +> **debugging @44hours** = codingtime / 4; +> **planning @25hours** = codingtime / 7; +> **mapping @18hours** = codingtime / 10; +> **office @30hours** = codingtime / 6;) -**232 Hours** or **29 Eight Hour Days** +**295 Hours** or **37 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **5.8 weeks** or **1.2 months** +Project duration: **7.4 weeks** or **1.5 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) diff --git a/admin/README.txt b/admin/README.txt index d65d56e4..1eb8c694 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,4 +1,4 @@ -# Sermon Distributor (1.3.8) +# Sermon Distributor (1.4.0) ![Sermon Distributor image](https://raw.githubusercontent.com/SermonDistributor/Joomla-3-Component/master/admin/assets/images/component-300.jpg "The Sermon Distributor") @@ -23,38 +23,38 @@ The best way to see all your options is to install this component on you Joomla + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@vdm.io) + *Name*: [Sermon Distributor](https://www.vdm.io/) + *First Build*: 22nd October, 2015 -+ *Last Build*: 2nd November, 2016 -+ *Version*: 1.3.8 ++ *Last Build*: 27th November, 2016 ++ *Version*: 1.4.0 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time :hourglass: -**140 Hours** or **18 Eight Hour Days** (actual time the author saved - +**178 Hours** or **22 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*: **50067** -+ *File count*: **365** -+ *Folder count*: **80** ++ *Line count*: **63763** ++ *File count*: **436** ++ *Folder count*: **90** -**92 Hours** or **11 Eight Hour Days** (the actual time the author spent) +**117 Hours** or **15 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @35hours** = codingtime / 4; -> **planning @20hours** = codingtime / 7; -> **mapping @14hours** = codingtime / 10; -> **office @23hours** = codingtime / 6;) +> **debugging @44hours** = codingtime / 4; +> **planning @25hours** = codingtime / 7; +> **mapping @18hours** = codingtime / 10; +> **office @30hours** = codingtime / 6;) -**232 Hours** or **29 Eight Hour Days** +**295 Hours** or **37 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **5.8 weeks** or **1.2 months** +Project duration: **7.4 weeks** or **1.5 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) diff --git a/admin/access.xml b/admin/access.xml index 58942c86..f14168b8 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -17,6 +17,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29,6 +55,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -138,6 +188,45 @@ +
+ + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 6c829b58..95bd3f04 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage admin.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 5ca8ac5b..e2013df6 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage dashboard.css diff --git a/admin/assets/css/external_source.css b/admin/assets/css/external_source.css new file mode 100644 index 00000000..f91b64d7 --- /dev/null +++ b/admin/assets/css/external_source.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage external_source.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/external_sources.css b/admin/assets/css/external_sources.css new file mode 100644 index 00000000..aa51d2d0 --- /dev/null +++ b/admin/assets/css/external_sources.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage external_sources.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index 30351ffb..cd472390 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_document.css diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index 551c728e..686a60b3 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_documents.css diff --git a/admin/assets/css/local_listing.css b/admin/assets/css/local_listing.css new file mode 100644 index 00000000..df5fb7e6 --- /dev/null +++ b/admin/assets/css/local_listing.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage local_listing.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/local_listings.css b/admin/assets/css/local_listings.css new file mode 100644 index 00000000..9dc73123 --- /dev/null +++ b/admin/assets/css/local_listings.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage local_listings.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/manual_updater.css b/admin/assets/css/manual_updater.css new file mode 100644 index 00000000..bff37266 --- /dev/null +++ b/admin/assets/css/manual_updater.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage manual_updater.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/preacher.css b/admin/assets/css/preacher.css index ef807976..bcd7da75 100644 --- a/admin/assets/css/preacher.css +++ b/admin/assets/css/preacher.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preacher.css diff --git a/admin/assets/css/preachers.css b/admin/assets/css/preachers.css index 33af9046..87fadc06 100644 --- a/admin/assets/css/preachers.css +++ b/admin/assets/css/preachers.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preachers.css diff --git a/admin/assets/css/series.css b/admin/assets/css/series.css index 23ffbfc3..90e7da93 100644 --- a/admin/assets/css/series.css +++ b/admin/assets/css/series.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.css diff --git a/admin/assets/css/series_list.css b/admin/assets/css/series_list.css index 266ac1bc..955258ad 100644 --- a/admin/assets/css/series_list.css +++ b/admin/assets/css/series_list.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series_list.css diff --git a/admin/assets/css/sermon.css b/admin/assets/css/sermon.css index 7d5f36f7..10e271a2 100644 --- a/admin/assets/css/sermon.css +++ b/admin/assets/css/sermon.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.css diff --git a/admin/assets/css/sermons.css b/admin/assets/css/sermons.css index bc2897b2..2170b905 100644 --- a/admin/assets/css/sermons.css +++ b/admin/assets/css/sermons.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermons.css diff --git a/admin/assets/css/statistic.css b/admin/assets/css/statistic.css index 6663c4a9..3855a2fe 100644 --- a/admin/assets/css/statistic.css +++ b/admin/assets/css/statistic.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistic.css diff --git a/admin/assets/css/statistics.css b/admin/assets/css/statistics.css index 9c70edd2..cd991f11 100644 --- a/admin/assets/css/statistics.css +++ b/admin/assets/css/statistics.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistics.css diff --git a/admin/assets/images/icons/external_source_add.png b/admin/assets/images/icons/external_source_add.png new file mode 100644 index 0000000000000000000000000000000000000000..5651c6a2d54702b114ae21efd13709a4b2aa3276 GIT binary patch literal 15533 zcmbum1ymf*x-UAw;O-8CI}GkHxVwblZo%Cd+&#hFC0GdVZoxw!NYDg=yUXLh_daKx zyPmA|?(Nl9UElYsPpiADx?|K;<}HnE=2q-JjxKNY0Dy?NkBgbb2P+Sdxs{EblPL9RXD>C#&Qg^69j^*l z#YM`>)=u8f%}UEpRolYvgN2|awYV6Hh>y@4fTNX%8OX=c!O307N0jPN_EYxBsAQ3l9YavZ(+5a^5RuZMQ_3&^J;^6T1_Gb6yW_Nb8;ouY$6#NH- zi;L}zg3aC6$-~Tt&B>kSABcZrNL#sExY@aQ*f~3a{=qaeclPuUrKWzX2mO~OjxH)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v@8g-9mD>4n7#{F7a+Q_qtc+ZudI9NyEi;X!C0i*ZwkH zY|`krZHC(Qb5Gl@?UhNQkJmn2Tf2f@pWAZ%{{aA&<(1%fxdxyB0000 - - - - - - - - - - - - - - - - - " +
+ + +
@@ -419,17 +366,75 @@
+ name="sermon_custom_config" + label="COM_SERMONDISTRIBUTOR_CONFIG_SERMON"> - - - + + + + + + + + + + + + + + + + + + + + @@ -438,333 +443,151 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - + - + COM_SERMONDISTRIBUTOR_CONFIG_YES + - - - - - - - - - - - - - - - - - + - + COM_SERMONDISTRIBUTOR_CONFIG_YES + - - - - - - - + - + type="radio" + name="sermon_preacher" + label="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_PREACHER_LABEL" + description="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_PREACHER_DESCRIPTION" + class="btn-group btn-group-yesno" + default="1"> + + + + + - + type="radio" + name="sermon_series" + label="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_LABEL" + description="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_DESCRIPTION" + class="btn-group btn-group-yesno" + default="1"> + + + + + - - - + type="radio" + name="sermon_series" + label="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_LABEL" + description="COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_DESCRIPTION" + class="btn-group btn-group-yesno" + default="1"> + + + + + + COM_SERMONDISTRIBUTOR_CONFIG_YES - - + COM_SERMONDISTRIBUTOR_CONFIG_NO - + + COM_SERMONDISTRIBUTOR_CONFIG_YES - - + COM_SERMONDISTRIBUTOR_CONFIG_NO - + + COM_SERMONDISTRIBUTOR_CONFIG_YES - - + COM_SERMONDISTRIBUTOR_CONFIG_NO - + - + COM_SERMONDISTRIBUTOR_CONFIG_YES +
+ + COM_SERMONDISTRIBUTOR_CONFIG_NO - - + + + + COM_SERMONDISTRIBUTOR_CONFIG_NO - - + + + + COM_SERMONDISTRIBUTOR_CONFIG_NO - - + + COM_SERMONDISTRIBUTOR_CONFIG_NO -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'sermons', 'series' => 'series_list', 'statistic' => 'statistics', + 'external_source' => 'external_sources', + 'local_listing' => 'local_listings', 'help_document' => 'help_documents' ); // check if this is a list view diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 9926b191..7b712eb5 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage ajax.json.php @@ -42,11 +42,11 @@ public function __construct($config) JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); JResponse::setHeader("Access-Control-Allow-Origin", "*"); // load the tasks - $this->registerTask('checkDropboxListing', 'ajax'); - $this->registerTask('updateDropboxListing', 'ajax'); - $this->registerTask('getUpdateProgress', 'ajax'); + $this->registerTask('autoUpdateLocalListingExternal', 'ajax'); + $this->registerTask('updateLocalListingExternal', 'ajax'); $this->registerTask('isNew', 'ajax'); - $this->registerTask('isRead', 'ajax'); + $this->registerTask('isRead', 'ajax'); + $this->registerTask('getBuildTable', 'ajax'); } public function ajax() @@ -61,14 +61,16 @@ public function ajax() $task = $this->getTask(); switch($task) { - case 'checkDropboxListing': + case 'autoUpdateLocalListingExternal': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $fromviewValue = $jinput->get('fromview', NULL, 'INT'); - if($fromviewValue && $user->id != 0) + $idValue = $jinput->get('id', NULL, 'INT'); + $targetValue = $jinput->get('target', NULL, 'INT'); + $typeValue = $jinput->get('type', NULL, 'INT'); + if($idValue && $targetValue && $typeValue) { - $result = $this->getModel('ajax')->dropbox($fromviewValue); + $result = $this->getModel('ajax')->autoUpdateLocalListingExternal($idValue, $targetValue, $typeValue); } else { @@ -99,14 +101,17 @@ public function ajax() } } break; - case 'updateDropboxListing': + 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'); - if($typeValue && $user->id != 0) + $sleutelValue = $jinput->get('sleutel', NULL, 'CMD'); + if($idValue && $targetValue && $typeValue && $sleutelValue && $user->id != 0) { - $result = $this->getModel('ajax')->updateDropbox($typeValue); + $result = $this->getModel('ajax')->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue); } else { @@ -137,14 +142,14 @@ public function ajax() } } break; - case 'getUpdateProgress': + case 'isNew': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $typeValue = $jinput->get('type', NULL, 'INT'); - if($typeValue && $user->id != 0) + $noticeValue = $jinput->get('notice', NULL, 'STRING'); + if($noticeValue && $user->id != 0) { - $result = $this->getModel('ajax')->updateProgress($typeValue); + $result = $this->getModel('ajax')->isNew($noticeValue); } else { @@ -175,14 +180,14 @@ public function ajax() } } break; - case 'isNew': + case 'isRead': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $noticeValue = $jinput->get('notice', NULL, 'STRING'); if($noticeValue && $user->id != 0) { - $result = $this->getModel('ajax')->isNew($noticeValue); + $result = $this->getModel('ajax')->isRead($noticeValue); } else { @@ -213,14 +218,15 @@ public function ajax() } } break; - case 'isRead': + case 'getBuildTable': try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $noticeValue = $jinput->get('notice', NULL, 'STRING'); - if($noticeValue && $user->id != 0) + $idNameValue = $jinput->get('idName', NULL, 'WORD'); + $ojectValue = $jinput->get('oject', NULL, 'STRING'); + if($idNameValue && $ojectValue && $user->id != 0) { - $result = $this->getModel('ajax')->isRead($noticeValue); + $result = $this->getModel('ajax')->getBuildTable($idNameValue, $ojectValue); } else { diff --git a/admin/controllers/external_source.php b/admin/controllers/external_source.php new file mode 100644 index 00000000..07113995 --- /dev/null +++ b/admin/controllers/external_source.php @@ -0,0 +1,326 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * External_source Controller + */ +class SermondistributorControllerExternal_source extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'External_sources'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('external_source.access', 'com_sermondistributor'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('external_source.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $recordId) && $user->authorise('external_source.access', 'com_sermondistributor')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('external_source.edit', 'com_sermondistributor.external_source.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + if ($user->authorise('external_source.edit.own', 'com_sermondistributor.external_source.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('external_source.edit.own', 'com_sermondistributor')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('external_source.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('External_source', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/external_sources.php b/admin/controllers/external_sources.php new file mode 100644 index 00000000..06460162 --- /dev/null +++ b/admin/controllers/external_sources.php @@ -0,0 +1,111 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * External_sources Controller + */ +class SermondistributorControllerExternal_sources extends JControllerAdmin +{ + protected $text_prefix = 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'External_source', $prefix = 'SermondistributorModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } + + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('External_sources'); + // get the data to export + $data = $model->getExportData($pks); + if (SermondistributorHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + SermondistributorHelper::xls($data,'External_sources_'.$date->format('jS_F_Y'),'External sources exported ('.$date->format('jS F, Y').')','external sources'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('external_source.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) + { + // Get the import model + $model = $this->getModel('External_sources'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (SermondistributorHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('external_source_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'external_sources'); + $session->set('dataType_VDM_IMPORTINTO', 'external_source'); + // Redirect to import view. + $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error'); + return; + } +} diff --git a/admin/controllers/help.php b/admin/controllers/help.php index bfa6e84c..ff0e5de8 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help.php diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index 3a6f3c00..69077898 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_document.php diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index 7e22dfd0..87c507ef 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_documents.php diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 81ac106b..ce29edc9 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage import.php diff --git a/admin/controllers/local_listing.php b/admin/controllers/local_listing.php new file mode 100644 index 00000000..e9534753 --- /dev/null +++ b/admin/controllers/local_listing.php @@ -0,0 +1,326 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Local_listing Controller + */ +class SermondistributorControllerLocal_listing extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Local_listings'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Access check. + $access = JFactory::getUser()->authorise('local_listing.access', 'com_sermondistributor'); + if (!$access) + { + return false; + } + // In the absense of better information, revert to the component permissions. + return JFactory::getUser()->authorise('local_listing.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $recordId) && $user->authorise('local_listing.access', 'com_sermondistributor')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('local_listing.edit', 'com_sermondistributor.local_listing.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + if ($user->authorise('local_listing.edit.own', 'com_sermondistributor.local_listing.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('local_listing.edit.own', 'com_sermondistributor')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('local_listing.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Local_listing', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref && $saved) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/local_listings.php b/admin/controllers/local_listings.php new file mode 100644 index 00000000..77aa7a5e --- /dev/null +++ b/admin/controllers/local_listings.php @@ -0,0 +1,111 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Local_listings Controller + */ +class SermondistributorControllerLocal_listings extends JControllerAdmin +{ + protected $text_prefix = 'COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Local_listing', $prefix = 'SermondistributorModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } + + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Local_listings'); + // get the data to export + $data = $model->getExportData($pks); + if (SermondistributorHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + SermondistributorHelper::xls($data,'Local_listings_'.$date->format('jS_F_Y'),'Local listings exported ('.$date->format('jS F, Y').')','local listings'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('local_listing.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) + { + // Get the import model + $model = $this->getModel('Local_listings'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (SermondistributorHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('local_listing_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'local_listings'); + $session->set('dataType_VDM_IMPORTINTO', 'local_listing'); + // Redirect to import view. + $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error'); + return; + } +} diff --git a/admin/controllers/manual_updater.php b/admin/controllers/manual_updater.php new file mode 100644 index 00000000..7efae2fc --- /dev/null +++ b/admin/controllers/manual_updater.php @@ -0,0 +1,61 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Manual_updater Controller + */ +class SermondistributorControllerManual_updater extends JControllerAdmin +{ + protected $text_prefix = 'COM_SERMONDISTRIBUTOR_MANUAL_UPDATER'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } + + public function dashboard() + { + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor', false)); + return; + } + + public function gotoExternalSources() + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + $this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false)); + return; + } +} diff --git a/admin/controllers/preacher.php b/admin/controllers/preacher.php index b78bf31c..9a8f5a58 100644 --- a/admin/controllers/preacher.php +++ b/admin/controllers/preacher.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preacher.php diff --git a/admin/controllers/preachers.php b/admin/controllers/preachers.php index f6ad643f..6926bcbf 100644 --- a/admin/controllers/preachers.php +++ b/admin/controllers/preachers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preachers.php diff --git a/admin/controllers/series.php b/admin/controllers/series.php index 66ba7128..8c50ff92 100644 --- a/admin/controllers/series.php +++ b/admin/controllers/series.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.php diff --git a/admin/controllers/series_list.php b/admin/controllers/series_list.php index 00e43b67..cc869788 100644 --- a/admin/controllers/series_list.php +++ b/admin/controllers/series_list.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series_list.php diff --git a/admin/controllers/sermon.php b/admin/controllers/sermon.php index 924274c5..12a16bb7 100644 --- a/admin/controllers/sermon.php +++ b/admin/controllers/sermon.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.php diff --git a/admin/controllers/sermondistributor.php b/admin/controllers/sermondistributor.php index abda218d..4b1c231c 100644 --- a/admin/controllers/sermondistributor.php +++ b/admin/controllers/sermondistributor.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermondistributor.php diff --git a/admin/controllers/sermons.php b/admin/controllers/sermons.php index 0293f41f..1987adfd 100644 --- a/admin/controllers/sermons.php +++ b/admin/controllers/sermons.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermons.php diff --git a/admin/controllers/statistic.php b/admin/controllers/statistic.php index 470c27fe..c1b13013 100644 --- a/admin/controllers/statistic.php +++ b/admin/controllers/statistic.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistic.php diff --git a/admin/controllers/statistics.php b/admin/controllers/statistics.php index bd87c607..05b14b07 100644 --- a/admin/controllers/statistics.php +++ b/admin/controllers/statistics.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistics.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index d7cbfab7..e5f5e2a5 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage batch_.php diff --git a/admin/helpers/sermondistributor.php b/admin/helpers/sermondistributor.php index c99b7f31..e362f942 100644 --- a/admin/helpers/sermondistributor.php +++ b/admin/helpers/sermondistributor.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermondistributor.php @@ -37,23 +37,26 @@ abstract class SermondistributorHelper **/ public static function globalEvent($document) { - self::loadDropboxAjax($document); + self::loadExternalUpdateAjax($document); } /** - * Load the Dropbox Ajax to page + * Load the External Update Ajax to page **/ - public static function loadDropboxAjax($document) + public static function loadExternalUpdateAjax($document) { - $document->addScriptDeclaration(" + $updates = self::getExternalListingUpdateKeys(); // id, target, type + if (self::checkArray($updates)) + { + $document->addScriptDeclaration(" jQuery(window).load(function() { - checkDropboxListing(3); + checkExternalListing(".implode('); checkExternalListing(', $updates)."); }); - function checkDropboxListing(fromview){ - var getUrl = '".JURI::root()."administrator/index.php?option=com_sermondistributor&task=ajax.checkDropboxListing&format=json'; - if(fromview > 0){ - var request = 'token=".JSession::getFormToken()."&fromview='+fromview; + function checkExternalListing(id, target, type) { + var getUrl = '".JURI::root()."administrator/index.php?option=com_sermondistributor&task=ajax.autoUpdateLocalListingExternal&format=json'; + if(target > 0 && type > 0 && id > 0){ + var request = 'token=".JSession::getFormToken()."&target='+target+'&id='+id+'&type='+type; } return jQuery.ajax({ type: 'GET', @@ -62,47 +65,72 @@ function checkDropboxListing(fromview){ data: request, jsonp: 'callback' }); - } - "); - } + }"); + } + } + + /** + * The external source links auto + **/ + protected static $links_externalsource_auto; + + /** + * The external source links manual + **/ + protected static $links_externalsource_manual; /** - * The dropbox links auto + * The external source selection auto **/ - protected static $links_dropbox_auto; + protected static $select_externalsource_auto; /** - * The dropbox links manual + * The external source selection manual **/ - protected static $links_dropbox_manual; + protected static $select_externalsource_manual; /** - * The dropbox info File Name + * The user notice info File Name **/ - protected static $autoprogress = false; + protected static $usernotice = false; /** - * The dropbox info File Name + * The update error info File Name **/ - protected static $manualprogress = false; + protected static $updateerror = false; /** - * The dropbox info File Name + * The update errors **/ - protected static $autolisting = false; + protected static $updateErrors = array(); /** - * The dropbox info File Name + * prepare base64 string for url **/ - protected static $manuallisting = false; + public static function base64_urlencode($string, $encode = false) + { + if ($encode) + { + $string = base64_encode($string); + } + return str_replace(array('+', '/'), array('-', '_'), $string); + } /** - * The user notice info File Name + * prepare base64 string form url **/ - protected static $usernotice = false; + public static function base64_urldecode($string, $decode = false) + { + $string = str_replace(array('-', '_'), array('+', '/'), $string); + if ($decode) + { + $string = base64_decode($string); + } + return $string; + } /** - * check Dropbox Local Listing + * get Download links of a sermon **/ public static function getDownloadLinks(&$sermon) { @@ -122,12 +150,13 @@ public static function getDownloadLinks(&$sermon) { $keyCounter->series = $sermon->series; } - $keyCounter = base64_encode($safe->encryptString(json_encode($keyCounter))); + $keyCounterRAW = $safe->encryptString(json_encode($keyCounter)); + $keyCounter = self::base64_urlencode($keyCounterRAW); $token = JSession::getFormToken(); $downloadURL = JURI::root().'index.php?option=com_sermondistributor&task=download.file&key='.$keyCounter.'&token='.$token; // check if local .htaccess should be set $setHtaccess = false; - $onclick = ' onclick="sermonCounter(\''.$keyCounter.'\',\'FILENAME\');"'; + $onclick = ' onclick="sermonCounter(\''.$keyCounterRAW.'\',\'FILENAME\');"'; // check what source of our link switch ($sermon->source) { @@ -155,8 +184,8 @@ public static function getDownloadLinks(&$sermon) { // get the file name use the same method as the auto $filename = self::getDownloadFileName($sermon,$key,'local'); - $lockedFolderPath = base64_encode($safe->encryptString($localFolder.$key)); - $sermon->download_links[$filename] = $downloadURL.'&link='.$lockedFolderPath.'&filename='.$filename; + $lockedFolderPath = $safe->encryptString($localFolder.$key); + $sermon->download_links[$filename] = $downloadURL.'&link='.self::base64_urlencode($lockedFolderPath).'&filename='.$filename; $sermon->onclick[$filename] = ''; } elseif (2 == $sermon->link_type && $allowDirect) @@ -171,7 +200,7 @@ public static function getDownloadLinks(&$sermon) break; case 2: // Dropbox get global dropbox switch - $dropboxButton = JComponentHelper::getParams('com_sermondistributor')->get('add_to_dropbox', 1); + $addToButton = JComponentHelper::getParams('com_sermondistributor')->get('add_to_button', 0); if (1 == $sermon->build) { if (self::checkArray($sermon->manual_files)) @@ -180,24 +209,43 @@ public static function getDownloadLinks(&$sermon) foreach($sermon->manual_files as $key) { // get the link - $dropURL = self::getDropboxLink('manual',1,$key); + $dropURL = self::getExternalSourceLink('manual',1,$key); if (1 == $sermon->link_type && $dropURL) { // get the file name use the same method as the auto $filename = self::getDownloadFileName($sermon,$key,'dropbox_manual'); - $sermon->download_links[$filename] = $downloadURL.'&link='.$dropURL.'&filename='.$filename; + // should we encrypt string this string + if ('localKey34fdWEkl' == $localkey || (base64_encode(base64_decode($dropURL, true)) !== $dropURL)) // hmmm no global key has been set + { + $dropURL = $safe->encryptString($dropURL); + } + $sermon->download_links[$filename] = $downloadURL.'&link='.self::base64_urlencode($dropURL).'&filename='.$filename; $sermon->onclick[$filename] = ''; } elseif (2 == $sermon->link_type && $dropURL) { $filename = str_replace('VDM_pLeK_h0uEr/', '', $key); - $sermon->download_links[$filename] = rtrim($safe->decryptString(base64_decode($dropURL))); + if ('localKey34fdWEkl' == $localkey) // hmmm no global key has been set (so don't decrypt) + { + $sermon->download_links[$filename] = $dropURL; + } + else + { + $sermon->download_links[$filename] = rtrim($safe->decryptString($dropURL), "\0"); + } $sermon->onclick[$filename] = str_replace('FILENAME', $filename, $onclick); } // build dropbox switch if needed - if (1 == $dropboxButton && $dropURL) + if (1 == $addToButton && $dropURL) { - $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', rtrim($safe->decryptString(base64_decode($dropURL)))); + if ('localKey34fdWEkl' == $localkey) // hmmm no global key has been set (so don't decrypt) + { + $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', $dropURL); + } + else + { + $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', rtrim($safe->decryptString($dropURL), "\0")); + } $sermon->onclick_drobox[$filename] = str_replace('FILENAME', $filename, $onclick); } } @@ -211,22 +259,41 @@ public static function getDownloadLinks(&$sermon) foreach($sermon->auto_sermons as $filename => $key) { // get the link - $dropURL = self::getDropboxLink('auto',1,$key); + $dropURL = self::getExternalSourceLink('auto',1,$key); if (1 == $sermon->link_type && $dropURL) { + // should we encrypt string this string + if ('localKey34fdWEkl' == $localkey || (base64_encode(base64_decode($dropURL, true)) !== $dropURL)) // hmmm no global key has been set + { + $dropURL = $safe->encryptString($dropURL); + } // get the file name (use the same method as the auto - $sermon->download_links[$filename] = $downloadURL.'&link='.$dropURL.'&filename='.$filename; + $sermon->download_links[$filename] = $downloadURL.'&link='.self::base64_urlencode($dropURL).'&filename='.$filename; $sermon->onclick[$filename] = ''; } elseif (2 == $sermon->link_type && $dropURL) { - $sermon->download_links[$filename] = rtrim($safe->decryptString(base64_decode($dropURL))); + if ('localKey34fdWEkl' == $localkey) // hmmm no global key has been set (so don't decrypt) + { + $sermon->download_links[$filename] = $dropURL; + } + else + { + $sermon->download_links[$filename] = rtrim($safe->decryptString($dropURL), "\0"); + } $sermon->onclick[$filename] = str_replace('FILENAME', $filename, $onclick); } // build dropbox switch if needed - if (1 == $dropboxButton && $dropURL) + if (1 == $addToButton && $dropURL) { - $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', rtrim($safe->decryptString(base64_decode($dropURL)))); + if ('localKey34fdWEkl' == $localkey) // hmmm no global key has been set (so don't decrypt) + { + $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', $dropURL); + } + else + { + $sermon->dropbox_buttons[$filename] = str_replace('?dl=1', '?dl=0', rtrim($safe->decryptString($dropURL), "\0")); + } $sermon->onclick_drobox[$filename] = str_replace('FILENAME', $filename, $onclick); } } @@ -238,8 +305,8 @@ public static function getDownloadLinks(&$sermon) $filename = self::getDownloadFileName($sermon,$sermon->url,'url'); if (1 == $sermon->link_type) { - $lockedURL = base64_encode($safe->encryptString($sermon->url)); - $sermon->download_links[$filename] = $downloadURL.'&link='.$lockedURL.'&filename='.$filename; + $lockedURL = $safe->encryptString($sermon->url); + $sermon->download_links[$filename] = $downloadURL.'&link='.self::base64_urlencode($lockedURL).'&filename='.$filename; $sermon->onclick[$filename] = ''; } elseif (2 == $sermon->link_type) @@ -261,25 +328,104 @@ public static function getDownloadLinks(&$sermon) } return true; } + + public static function getExternalListingUpdateKeys($id = null, $updateMethod = 2, $returnType = 1) + { + // first check if this file already has statistics + $db = JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('id','sharedurl','folder','permissiontype','dropboxoptions','build'))); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->where($db->quoteName('update_method') . ' = '. (int) $updateMethod); + if ($id && is_numeric($id)) + { + $query->where($db->quoteName('id') . ' = '. (int) $id); + } + elseif ($id && self::checkArray($id)) + { + $ids = implode(',', array_map( 'intval', $id)); + $query->where($db->quoteName('id') . ' IN (' . $ids . ')'); + } + $query->where($db->quoteName('published') . ' = 1'); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $results = $db->loadObjectList(); + $updates = array(); + foreach ($results as $result) + { + if ('full' == $result->permissiontype) + { + // load folder or urls + switch ($result->dropboxoptions) + { + case 1: // sharedurl + if (self::checkJson($result->sharedurl)) + { + $targets = json_decode($result->sharedurl)->tsharedurl; + } + break; + case 2: // folders + if (self::checkJson($result->folder)) + { + $targets = json_decode($result->folder)->tfolder; + } + break; + } + if (self::checkArray($targets)) + { + foreach ($targets as $key => $value) + { + $nr = $key + 1; + // id, target, type + if (1 == $returnType) + { + $updates[] = $result->id . ', '. $nr . ', ' . $result->build; + } + else // only return the targets + { + $updates[] = $nr; + } + } + } + } + else + { + // id, target, type + if (1 == $returnType) + { + $updates[] = $result->id . ', 1, '. $result->build; + } + else // only return the targets + { + $updates[] = 1; + } + } + } + return $updates; + } + return false; + } - public static function getDropboxLink($type, $return = false, $target = false) + public static function getExternalSourceLink($type, $return = 7, $get = false, $target = 'links') { // make sure all defaults are set - $found = self::checkDropboxLocalListing($type); + $found = self::checkExternalSourceLocalListing($type, $target); if ($found) { switch($return) { case 1: // return a link - if (isset(self::${'links_dropbox_'.$type}[$target])) + if (isset(self::${$target.'_externalsource_'.$type}[$get])) { - return self::${'links_dropbox_'.$type}[$target]; + return self::${$target.'_externalsource_'.$type}[$get]; } break; case 2: // return all links - return self::${'links_dropbox_'.$type}; + return self::${$target.'_externalsource_'.$type}; break; default : // just confirm that it is set @@ -295,7 +441,7 @@ public static function countDownload($counter,$filename) // Get local key $localkey = self::getLocalKey(); $opener = new FOFEncryptAes($localkey, 128); - $counter = json_decode(rtrim($opener->decryptString(base64_decode($counter)))); + $counter = json_decode(rtrim($opener->decryptString($counter), "\0")); if (self::checkObject($counter)) { $counter->filename = $filename; @@ -390,27 +536,37 @@ protected static function getDownloadFileName(&$sermon,$file,$type) } /** - * check Dropbox Local Listing (do we have the files) + * check External Source Local Listing (do we have the files) **/ - public static function checkDropboxLocalListing($type) + public static function checkExternalSourceLocalListing($type, $get = 'links') { - $filePath = self::getFilePath($type); // get the local links - if (self::checkArray(self::${'links_dropbox_'.$type})) + if (isset(self::${$get.'_externalsource_'.$type}) && self::checkArray(self::${$get.'_externalsource_'.$type})) { // return true we have links loaded return true; } - elseif (($jsonlinks = @file_get_contents($filePath)) !== FALSE) - { - if (self::checkString($jsonlinks)) + else + { + $target = array('links' => 'url', 'select' => 'name'); + $build = array( 'auto' => 2, 'manual' => 1); + if (isset($build[$type])) { - // get saved links - $storeage = json_decode($jsonlinks,true); - if (self::checkArray($storeage)) + // load the links from the database + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('key', $target[$get]))); + $query->from($db->quoteName('#__sermondistributor_local_listing')); + $query->where($db->quoteName('build') . ' = '. (int) $build[$type]); + $query->where($db->quoteName('published') . ' = 1'); // TODO we can now limit the links to access groups + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) { - // load the saved links - self::${'links_dropbox_'.$type} = $storeage; + self::${$get.'_externalsource_'.$type} = $db->loadAssocList('key', $target[$get]); + // return true we have links loaded return true; } } @@ -436,53 +592,81 @@ public static function getFilePath($type, $name = 'listing', $key = '', $fileTyp /** * get the localkey **/ - protected static $localkey = false; + protected static $localkey = array(); - public static function getLocalKey() + public static function getLocalKey($type = 'basic_key') { - if (!self::$localkey) + if (!isset(self::$localkey[$type])) { // get the main key - self::$localkey = md5(JComponentHelper::getParams('com_sermondistributor')->get('link_encryption', 'localKey34fdWEkl')); + self::$localkey[$type] = JComponentHelper::getParams('com_sermondistributor')->get($type, 'localKey34fdWEkl'); } - return self::$localkey; + return self::$localkey[$type]; } - public static function updateDropbox($type = false, $force = false) + public static function updateExternalSource($id, $target = 0, $type = false, $force = false, $sleutel = null) { - // load the file - JLoader::import('dropboxupdater', JPATH_COMPONENT_SITE.'/helpers'); - // update types - $types = array('manual','auto'); - // okay now update this type - if (self::checkString($type) && in_array($type,$types)) + $source = self::getVar('external_source', (int) $id, 'id', 'externalsources'); + if (1 == $source) // Dropbox is the source { - $dropbox = new Dropboxupdater(); - return $dropbox->update($type,$force); + // load the file + JLoader::import('dropboxupdater', JPATH_COMPONENT_SITE.'/helpers'); + // update types + $types = array('manual','auto'); + // okay now update this type + if (self::checkString($type) && in_array($type,$types)) + { + $dropbox = new Dropboxupdater(); + if ($dropbox->update($id, $target, $type, $force, $sleutel)) + { + return true; + } + self::setUpdateError($id, $dropbox->getErrors()); + return false; + } } + self::setUpdateError($id, array(JText::_('COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND'))); return false; } - public static function getUpdateProgress($type) + public static function getUpdateError($id, $fileKey = null) { - $filePath = self::getFilePath($type,'progress'); - // get the set progress - if (($progress = @file_get_contents($filePath)) !== FALSE) - { - if (self::checkString($progress)) + // get update error from file + if ($fileKey) + { + $file_path = self::getFilePath('update', 'error', $fileKey, '.txt', JPATH_COMPONENT_ADMINISTRATOR); + // check if it is set + if (($text = @file_get_contents($file_path)) !== FALSE) { - // get set progress - $progress = json_decode($progress,true); - if (self::checkArray($progress)) + // no error on success + if ('success' != $text) { - // return te progress - return $progress['report']; + return $text; } } + return false; + } + if (isset(self::$updateErrors[$id]) && self::checkArray(self::$updateErrors[$id])) + { + return '
  • '.implode('
  • ', self::$updateErrors[$id]).'
    • '; + } + return JText::_('COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED'); + } + + protected static function setUpdateError($id, $errorArray) + { + if (self::checkArray($errorArray) && $id > 0) + { + foreach ($errorArray as $error) + { + if (!isset(self::$updateErrors[$id])) + { + self::$updateErrors[$id] = array(); + } + self::$updateErrors[$id][] = $error; + } } - return 0; } - /** * Load the Component xml manifest. **/ @@ -628,6 +812,19 @@ public static function addSubmenu($submenu) { JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_STATISTICS'), 'index.php?option=com_sermondistributor&view=statistics', $submenu == 'statistics'); } + if ($user->authorise('external_source.access', 'com_sermondistributor') && $user->authorise('external_source.submenu', 'com_sermondistributor')) + { + JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_EXTERNAL_SOURCES'), 'index.php?option=com_sermondistributor&view=external_sources', $submenu == 'external_sources'); + } + // Access control (manual_updater.access && manual_updater.submenu). + if ($user->authorise('manual_updater.access', 'com_sermondistributor') && $user->authorise('manual_updater.submenu', 'com_sermondistributor')) + { + JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_MANUAL_UPDATER'), 'index.php?option=com_sermondistributor&view=manual_updater', $submenu == 'manual_updater'); + } + if ($user->authorise('local_listing.access', 'com_sermondistributor') && $user->authorise('local_listing.submenu', 'com_sermondistributor')) + { + JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_LOCAL_LISTINGS'), 'index.php?option=com_sermondistributor&view=local_listings', $submenu == 'local_listings'); + } if ($user->authorise('help_document.access', 'com_sermondistributor') && $user->authorise('help_document.submenu', 'com_sermondistributor')) { JHtmlSidebar::addEntry(JText::_('COM_SERMONDISTRIBUTOR_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_sermondistributor&view=help_documents', $submenu == 'help_documents'); @@ -1696,5 +1893,20 @@ public static function randomkey($size) $key[] = $bag[$get]; } return implode($key); + } + + public static function getCryptKey($type, $default = null) + { + if ('basic' == $type) + { + // Get the global params + $params = JComponentHelper::getParams('com_sermondistributor', true); + $basic_key = $params->get('basic_key', $default); + if ($basic_key) + { + return $basic_key; + } + } + return false; } } diff --git a/admin/language/en-GB/en-GB.com_sermondistributor.ini b/admin/language/en-GB/en-GB.com_sermondistributor.ini index 6a53ce48..0e042333 100644 --- a/admin/language/en-GB/en-GB.com_sermondistributor.ini +++ b/admin/language/en-GB/en-GB.com_sermondistributor.ini @@ -1,44 +1,32 @@ COM_SERMONDISTRIBUTOR="Sermon Distributor" +COM_SERMONDISTRIBUTOR_ADD_THE_STRONGAPP_GENERATED_ACCESS_TOKENSTRONG_HERE="Add the App Generated access token here." +COM_SERMONDISTRIBUTOR_ADD_TOKEN_HERE="ADD TOKEN HERE!" 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_ALWAYS_BETTER_TO_ADD_THE_FILES_TO_EXTERNAL_SOURCE_AND_LET_THE_SYSTEM_CREATE_THE_SERMON_FOR_YOU_PLEASE_READ_INSTRUCTIONS_BELOW_CAREFULLY="Always better to add the files to External Source 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_BCOULD_NOT_USE_THE_GIVEN_TOKEN_OR_THE_GIVEN_BUILD_OPTION_DOES_NOT_EXISTB="Could not use the given token, or the given build option does not exist." +COM_SERMONDISTRIBUTOR_BTHERE_WAS_AN_ERRORB="There was an error!" +COM_SERMONDISTRIBUTOR_BY_USING_AN_ACCESS_TOKEN_YOU_WILL_BE_ABLE_TO_MAKE_API_CALLS_FOR_YOUR_OWN_ACCOUNT_WITHOUT_GOING_THROUGH_THE_AUTHORIZATION_FLOW_DURING_THIS_MANUAL_UPDATE_OF_THE_LOCAL_LISTINGBR_THE_TOKEN_WILL_NOT_BE_STORED_AND_FOR_SAFETY_THE_TOKEN_WILL_BE_REVOKED_ONCE_THE_UPDATE_IS_COMPLETED_SUCCESSFULLYBR_BTHIS_WILL_MEAN_IT_CAN_ONLY_BE_USED_THIS_ONCEB_YOU_WOULD_NEED_A_NEW_TOKEN_EACH_TIME_YOU_RUN_THIS_UPDATE_MANUALLY_BR_SMALLMAKE_SURE_TO_HAVE_SSL_INPLACE_ON_THIS_PAGE_WHEN_DOING_THIS_UPDATE_AS_AN_EXTRA_SECURITY_MEASURESMALL="By using an access token, you will be able to make API calls for your own account without going through the authorization flow during this manual update of the local listing.
      The token will not be stored and for safety the token will be revoked once the update is completed successfully.
      This will mean it can only be used this once, you would need a new token each time you run this update manually.
      Make sure to have SSL in-place on this page when doing this update, as an extra security measure." COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE="Categories (Site) Access" COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC=" Allows the users in this group to access site categories." COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE="Category (Site) Access" COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE_DESC=" Allows the users in this group to access site category." -COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_DROPBOX_DESCRIPTION="Allow add to Dropbox button to show, this will expose the Dropbox links." -COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_DROPBOX_LABEL="Dropbox Button" +COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_DESCRIPTION="Allow add to external source button to show, this will expose the external source links." +COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_LABEL="External Source Button" COM_SERMONDISTRIBUTOR_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" -COM_SERMONDISTRIBUTOR_CONFIG_ARCHIVED="Archived" COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR="Author Info" COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component." COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_EMAIL_LABEL="Author Email" COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component." COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_NAME_LABEL="Author Name" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXFOUR_DESCRIPTION="Enter the url of the main Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXFOUR_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXFOUR_LABEL="Dropbox Auto (Folder 4)" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXONE_DESCRIPTION="Enter the url of the main Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXONE_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXONE_LABEL="Dropbox Auto (Folder 1)" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTHREE_DESCRIPTION="Enter the url of the main Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTHREE_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTHREE_LABEL="Dropbox Auto (Folder 3)" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTWO_DESCRIPTION="Enter the url of the main Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTWO_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_AUTODROPBOXTWO_LABEL="Dropbox Auto (Folder 2)" -COM_SERMONDISTRIBUTOR_CONFIG_AUTOMATIC="Automatic" -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_DROPBOX_TIMER_DESCRIPTION="Set the timer in minutes for updating the Dropbox auto local listing of file links." -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_DROPBOX_TIMER_LABEL="Auto Dropbox Timer" -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LINK_TYPE_DESCRIPTION="Set the method used to build download links. Used for the initial build of the sermons." -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LINK_TYPE_LABEL="Auto Download Link Option" -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LINK_UPDATE_METHOD_DESCRIPTION="Select the method we should use when updating the auto links." -COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LINK_UPDATE_METHOD_LABEL="Auto Link Update Method" COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LOAD="Auto" -COM_SERMONDISTRIBUTOR_CONFIG_AVI=".avi" +COM_SERMONDISTRIBUTOR_CONFIG_BASIC_KEY_DESC="Set the basic local key here." +COM_SERMONDISTRIBUTOR_CONFIG_BASIC_KEY_LABEL="Basic Key (basic encryption)" +COM_SERMONDISTRIBUTOR_CONFIG_BASIC_KEY_NOTE_DESC="When using the basic encryption please use a 32 character passphrase.
      Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO!" +COM_SERMONDISTRIBUTOR_CONFIG_BASIC_KEY_NOTE_LABEL="Basic Encryption" COM_SERMONDISTRIBUTOR_CONFIG_BIG="Big" COM_SERMONDISTRIBUTOR_CONFIG_BLUE="Blue" COM_SERMONDISTRIBUTOR_CONFIG_BOX="Box" @@ -133,30 +121,19 @@ COM_SERMONDISTRIBUTOR_CONFIG_CONTRIBUTOR_USE_NONE="None" COM_SERMONDISTRIBUTOR_CONFIG_CONTRIBUTOR_USE_WWW="Website" COM_SERMONDISTRIBUTOR_CONFIG_CUSTOM="Custom" COM_SERMONDISTRIBUTOR_CONFIG_DARK_BLUE="Dark Blue" -COM_SERMONDISTRIBUTOR_CONFIG_DIRECT="Direct" -COM_SERMONDISTRIBUTOR_CONFIG_DOC=".doc" -COM_SERMONDISTRIBUTOR_CONFIG_DOCX=".docx" COM_SERMONDISTRIBUTOR_CONFIG_DONT_LOAD="Not" -COM_SERMONDISTRIBUTOR_CONFIG_DROPBOX="Dropbox" -COM_SERMONDISTRIBUTOR_CONFIG_DROPBOX_FILETYPES_DESCRIPTION="Select the file types you would like to use from Dropbox." -COM_SERMONDISTRIBUTOR_CONFIG_DROPBOX_FILETYPES_LABEL="Dropbox File Types" -COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTED="Encrypted" +COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTION_DESC="The encription key for the field encryption is set here." +COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTION_LABEL="Encryption Settings" COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD="Flat" COM_SERMONDISTRIBUTOR_CONFIG_FORCE_LOAD="Force" -COM_SERMONDISTRIBUTOR_CONFIG_GIF=".gif" COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_DESC="The Global Parameters" 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_JPEG=".jpeg" -COM_SERMONDISTRIBUTOR_CONFIG_JPG=".jpg" COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER="jPlayer" COM_SERMONDISTRIBUTOR_CONFIG_LEGACY="Legacy" COM_SERMONDISTRIBUTOR_CONFIG_LINES="Lines" -COM_SERMONDISTRIBUTOR_CONFIG_LINK_ENCRYPTION_DESCRIPTION="Add the key to use when download link option is set to encrypted." -COM_SERMONDISTRIBUTOR_CONFIG_LINK_ENCRYPTION_HINT="DBwAHPAqoFWZfDWZo6sd)E3cv2oMTG^r" -COM_SERMONDISTRIBUTOR_CONFIG_LINK_ENCRYPTION_LABEL="Download Link Encryption Key" COM_SERMONDISTRIBUTOR_CONFIG_LIST="List" COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_DESC_DESCRIPTION="Set if description should be shown." COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_DESC_LABEL="Show Description" @@ -175,332 +152,14 @@ COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_TABLE_COLOR_LABEL="Table Color" COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_DESCRIPTION="Enter the full path to the local folder where your files are found." COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_HINT="/home/username/localfolder/" COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_LABEL="Local Folder Path (File Source)" -COM_SERMONDISTRIBUTOR_CONFIG_MANUAL="Manual" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXFOUR_DESCRIPTION="Enter the url of the main manual Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXFOUR_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXFOUR_LABEL="Dropbox Manual (Folder 4)" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXONE_DESCRIPTION="Enter the url of the main manual Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXONE_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXONE_LABEL="Dropbox Manual (Folder 1)" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTHREE_DESCRIPTION="Enter the url of the main manual Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTHREE_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTHREE_LABEL="Dropbox Manual (Folder 3)" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTWO_DESCRIPTION="Enter the url of the main manual Dropbox folder to target, this will link the files." -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTWO_HINT="https://www.dropbox.com/shared-link-from-dropbox-to-main-folder?dl=0" -COM_SERMONDISTRIBUTOR_CONFIG_MANUALDROPBOXTWO_LABEL="Dropbox Manual (Folder 2)" -COM_SERMONDISTRIBUTOR_CONFIG_MANUAL_DROPBOX_TIMER_DESCRIPTION="Set the timer in minutes for updating the Dropbox manual local listing of file links." -COM_SERMONDISTRIBUTOR_CONFIG_MANUAL_DROPBOX_TIMER_LABEL="Manual Dropbox Timer" -COM_SERMONDISTRIBUTOR_CONFIG_MANUAL_LINK_UPDATE_METHOD_DESCRIPTION="Select the method we should use when updating the manual links" -COM_SERMONDISTRIBUTOR_CONFIG_MANUAL_LINK_UPDATE_METHOD_LABEL="Manual Link Update Method" -COM_SERMONDISTRIBUTOR_CONFIG_MFOURA=".m4a" -COM_SERMONDISTRIBUTOR_CONFIG_MFOURV=".m4v" -COM_SERMONDISTRIBUTOR_CONFIG_MOV=".mov" -COM_SERMONDISTRIBUTOR_CONFIG_MPFOUR=".mp4" -COM_SERMONDISTRIBUTOR_CONFIG_MPG=".mpg" -COM_SERMONDISTRIBUTOR_CONFIG_MPTHREE=".mp3" COM_SERMONDISTRIBUTOR_CONFIG_NO="No" COM_SERMONDISTRIBUTOR_CONFIG_NONE="None" -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_AUTO_DROPBOX_DESCRIPTION="
        -
      • Create main/first auto folder in Dropbox. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.
      • -
      • You can add files directly to the preacher folder if it is not linked to a series.
      • -
      • If you would like the sermon linked to a series, you simply create a folder inside the preacher's folder with the series' name, and place the sermon file inside that series' folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
      • -
      • Adding other preachers to the same series will only require creating a folder inside that preacher's folder with the same series' name and placing his sermons inside that new folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
      • -
      • The file name will be used as the sermon name.
      • -
      • To ensure that all downloads work well, we need to hold to the following file naming convention: -
          -
        • No spaces in the file name!!
        • -
        • No strange characters in the file name only A-z 0-9 underscore and hyphen.
        • -
        -
      • -
      • We use naming conventions to add tags, categories, a short description and combine files under one sermon, these conventions are as follow: -
          -
        • To combine files -
            -
          • Use a KEY name with TWO underscores before the actual name, example (34key521__the_file_name.mp3 & 34key521__another_file_of_the_same_sermon.pdf)
          • -
          • The KEY may only have alpha numeric characters (A-z 0-9).
          • -
          • You can combine as many files as you like under each sermon with the unique KEY.
          • -
          • There are two ways to set the sermon name with combined files: -
              -
            • All Uppercase. example (34key521__THE_FILE_NAME.mp3 & 34key521__another_file_of_the_same_sermon.pdf).
            • -
            • Longest file name if no all-uppercase file name is found. If two file names are the same length the first one is used.
            • -
            -
          • -
          • Uppercase option is the most trusted method since this will insure you get what you expected.
          • -
          -
        • -
        • To tag files -
            -
          • Directly after the file name add THREE underscores and then set the tags, example (the_file_name___tag1_tag-with2_tag-three.mp3)
          • -
          • You can add as many tags to a file as you like separated by one underscore and hyphen for spaces in a tag.
          • -
          • Combined files only need to have the tags added to one of the files. If one of the files has a tag that was not already found it will also be added to the sermon as a whole since the combined files are treated as one sermon.
          • -
          -
        • -
        • To add sermons to categories -
            -
          • Directly after the file name add FOUR underscores and then set the category name, example (the_file_name____Salvation_Messages.mp3)
          • -
          • You can add only one category per sermon. Combined files only need to have the category name added to one of the files.
          • -
          -
        • -
        • To add a short description -
            -
          • Directly after the file name add FIVE underscores and then set the description, example (the_file_name_____The_short_description_can_only_be_one_sentence.mp3)
          • -
          • You can not use any strange characters, only (A-z 0-9) and underscore for spacing.
          • -
          • You can add only one short description per sermon. Combined files only need to have the short description added to one of the files.
          • -
          -
        • -
        -
      • -
      • When you use all the naming conventions together they should follow the following order: -
          -
        • KEY before the file name with TWO underscores.
        • -
        • TAGS must be first after the file name with THREE underscores.
        • -
        • CATEGORY must be first after TAGS with FOUR underscores. IF no tags were set then it must be first after the FILE NAME with FOUR underscores.
        • -
        • SHORT DESCRIPTION must be first after CATEGORY with FIVE underscores. IF no category was set then it must be first after the TAGS with FIVE underscores. IF no tags were set then it must be first after the FILE NAME with FIVE underscores.
        • -
        -
      • -
      • Adding folders and sermons will automatically load them to your sermon distributor on your website, or update the already existing sermons with the new files.
      • -
      -
    The links that are required below should be the direct Dropbox shared links to the auto folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate." -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_AUTO_DROPBOX_LABEL="Want to use Dropbox Auto links with your system, then you need to do the following:" -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_DROPBOX_LABEL="Dropbox Integration Made Easy!" -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_MANUAL_DROPBOX_DESCRIPTION="
      -
    • Create main/first manual folder in Dropbox. This will be where all files are placed. No sub folders, just one huge folder with all the files!
    • -
    • You will place the file on Dropbox in that main folder first.
    • -
    • Then the next step will be to come to Sermon Distributor and create the preacher and series if they do not already exist.
    • -
    • Please allow enough time (as set above +) for the local listing of files to update.
    • -
    • Then you should create the sermon the file belongs to and select 'Dropbox' as the source of your file.
    • -
    • Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on Dropbox. Should the new file not be seen give it a little more time to update the local listing of files.
    • -
    • If the List is very long, you can in the select box type the name of the file and it will shorten the list. Then select your file and continue with the setup of the sermon as usual.
    • -
    • To ensure that all downloads work well, we need to hold to the following file naming convention: -
        -
      • No spaces in the file name!!
      • -
      • No strange characters in the file name only A-z 0-9 underscore and hyphen.
      • -
      -
    • -
    The links that are required below should be the direct Dropbox shared links to the main manual folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate." -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_MANUAL_DROPBOX_LABEL="Want to use Dropbox Manual links with your system, then you need to do the following:" -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_UPDATE_AUTO_BUTTON_DROPBOX_DESCRIPTION="
    Manual Update Method
    Update Listing Now! (auto listing)
    " -COM_SERMONDISTRIBUTOR_CONFIG_NOTE_UPDATE_MANUAL_BUTTON_DROPBOX_DESCRIPTION="
    Manual Update Method
    Update Listing Now! (manual listing)
    -" -COM_SERMONDISTRIBUTOR_CONFIG_ODT=".odt" -COM_SERMONDISTRIBUTOR_CONFIG_OGG=".ogg" -COM_SERMONDISTRIBUTOR_CONFIG_OGV=".ogv" COM_SERMONDISTRIBUTOR_CONFIG_ONLY_EXTRA="Only Extra" COM_SERMONDISTRIBUTOR_CONFIG_PANEL="Panel" -COM_SERMONDISTRIBUTOR_CONFIG_PDF=".pdf" COM_SERMONDISTRIBUTOR_CONFIG_PLAIN="Plain" COM_SERMONDISTRIBUTOR_CONFIG_PLAYER="Player" COM_SERMONDISTRIBUTOR_CONFIG_PLAYER_DESCRIPTION="Select the player you would like to use on your site." COM_SERMONDISTRIBUTOR_CONFIG_PLAYER_LABEL="Players" -COM_SERMONDISTRIBUTOR_CONFIG_PNG=".png" -COM_SERMONDISTRIBUTOR_CONFIG_PPS=".pps" -COM_SERMONDISTRIBUTOR_CONFIG_PPSX=".ppsx" -COM_SERMONDISTRIBUTOR_CONFIG_PPT=".ppt" -COM_SERMONDISTRIBUTOR_CONFIG_PPTX=".pptx" COM_SERMONDISTRIBUTOR_CONFIG_PREACHER="Preacher" COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS="Preachers" COM_SERMONDISTRIBUTOR_CONFIG_PREACHERS_DESC_DESCRIPTION="Set if description should be shown." @@ -565,11 +224,8 @@ COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_TABLE_COLOR_DESCRIPTION="Select th COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMONS_TABLE_COLOR_LABEL="Sermons Table Color" COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMON_COUNT_DESCRIPTION="Set if sermon count should be shown." COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_SERMON_COUNT_LABEL="Show Sermon Count" -COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_STATE_DESCRIPTION="Set the state in which preacher so be loaded at initial build." -COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_STATE_LABEL="Auto Preacher State" COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_WEBSITE_DESCRIPTION="Set if the website link should be shown." COM_SERMONDISTRIBUTOR_CONFIG_PREACHER_WEBSITE_LABEL="Show Website" -COM_SERMONDISTRIBUTOR_CONFIG_PUBLISHED="Published" COM_SERMONDISTRIBUTOR_CONFIG_PURPLE="Purple" COM_SERMONDISTRIBUTOR_CONFIG_RED="Red" COM_SERMONDISTRIBUTOR_CONFIG_SELECT_AN_OPTION="select an option" @@ -617,8 +273,6 @@ COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_TABLE_COLOR_DESCRIPTION="Select the COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMONS_TABLE_COLOR_LABEL="Sermons Table Color" COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMON_COUNT_DESCRIPTION="Set if sermon count should be shown." COM_SERMONDISTRIBUTOR_CONFIG_SERIES_SERMON_COUNT_LABEL="Show Sermon Count" -COM_SERMONDISTRIBUTOR_CONFIG_SERIES_STATE_DESCRIPTION="Set the state in which series so be loaded at initial build." -COM_SERMONDISTRIBUTOR_CONFIG_SERIES_STATE_LABEL="Auto Series State" COM_SERMONDISTRIBUTOR_CONFIG_SERMON="Sermon" COM_SERMONDISTRIBUTOR_CONFIG_SERMON_BOX_CONTRAST_DESCRIPTION="Set if text should be contrast in box display option." COM_SERMONDISTRIBUTOR_CONFIG_SERMON_BOX_CONTRAST_LABEL="Show Contrast Text" @@ -646,16 +300,11 @@ COM_SERMONDISTRIBUTOR_CONFIG_SERMON_PREACHER_DESCRIPTION="Set if the preacher li COM_SERMONDISTRIBUTOR_CONFIG_SERMON_PREACHER_LABEL="Show Sermon Preacher" COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_DESCRIPTION="Set if the series link should be shown." COM_SERMONDISTRIBUTOR_CONFIG_SERMON_SERIES_LABEL="Show Sermon Series" -COM_SERMONDISTRIBUTOR_CONFIG_SERMON_STATE_DESCRIPTION="Set the state in which sermons so be loaded at initial build." -COM_SERMONDISTRIBUTOR_CONFIG_SERMON_STATE_LABEL="Auto Sermons State" COM_SERMONDISTRIBUTOR_CONFIG_SMALL="Small" COM_SERMONDISTRIBUTOR_CONFIG_SOUNDMANAGER="Soundmanager" COM_SERMONDISTRIBUTOR_CONFIG_SPACED="Spaced" COM_SERMONDISTRIBUTOR_CONFIG_STRIPED="Striped" COM_SERMONDISTRIBUTOR_CONFIG_TABLE="Table" -COM_SERMONDISTRIBUTOR_CONFIG_THREEGP=".3gp" -COM_SERMONDISTRIBUTOR_CONFIG_THREEGTWO=".3g2" -COM_SERMONDISTRIBUTOR_CONFIG_TRASHED="Trashed" COM_SERMONDISTRIBUTOR_CONFIG_UIKIT="Uikit" COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here.
    Uikit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. For more info visit http://getuikit.com/" @@ -666,19 +315,17 @@ COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_DESC="Should the minified version of uiki COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_LABEL="Load Minified" COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC="Set the css style that should be used." COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_LABEL="css Style" -COM_SERMONDISTRIBUTOR_CONFIG_UNPUBLISHED="Unpublished" -COM_SERMONDISTRIBUTOR_CONFIG_WAV=".wav" -COM_SERMONDISTRIBUTOR_CONFIG_WMV=".wmv" -COM_SERMONDISTRIBUTOR_CONFIG_XLS=".xls" -COM_SERMONDISTRIBUTOR_CONFIG_XLSX=".xlsx" COM_SERMONDISTRIBUTOR_CONFIG_YES="Yes" -COM_SERMONDISTRIBUTOR_CONFIG_ZIP=".zip" COM_SERMONDISTRIBUTOR_CONTRIBUTOR="Contributor" COM_SERMONDISTRIBUTOR_CONTRIBUTORS="Contributors" COM_SERMONDISTRIBUTOR_CREATE_NEW_S="Create New %s" COM_SERMONDISTRIBUTOR_DASH="Dashboard" COM_SERMONDISTRIBUTOR_DASHBOARD="Sermon Distributor Dashboard" +COM_SERMONDISTRIBUTOR_DASHBOARD_EXTERNAL_SOURCES="External Sources

    " +COM_SERMONDISTRIBUTOR_DASHBOARD_EXTERNAL_SOURCE_ADD="Add External Source

    " COM_SERMONDISTRIBUTOR_DASHBOARD_HELP_DOCUMENTS="Help Documents

    " +COM_SERMONDISTRIBUTOR_DASHBOARD_LOCAL_LISTINGS="Local Listings

    " +COM_SERMONDISTRIBUTOR_DASHBOARD_MANUAL_UPDATER="Manual Updater

    " COM_SERMONDISTRIBUTOR_DASHBOARD_PREACHERS="Preachers

    " COM_SERMONDISTRIBUTOR_DASHBOARD_PREACHER_ADD="Add Preacher

    " COM_SERMONDISTRIBUTOR_DASHBOARD_SERIES_ADD="Add Series

    " @@ -689,7 +336,6 @@ COM_SERMONDISTRIBUTOR_DASHBOARD_SERMON_ADD="Add Sermon

    " COM_SERMONDISTRIBUTOR_DASHBOARD_STATISTICS="Statistics

    " COM_SERMONDISTRIBUTOR_DATE="Date" COM_SERMONDISTRIBUTOR_DOWNLOAD_NAME="Download Name" -COM_SERMONDISTRIBUTOR_DROPBOX_RELATION="Dropbox Relation" COM_SERMONDISTRIBUTOR_EDIT_CREATED_BY="Edit Created By" COM_SERMONDISTRIBUTOR_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by." COM_SERMONDISTRIBUTOR_EDIT_CREATED_DATE="Edit Created Date" @@ -700,6 +346,266 @@ COM_SERMONDISTRIBUTOR_EDIT_VERSIONS_DESC=" Allows users in this group to edit ve COM_SERMONDISTRIBUTOR_EXPORT_DATA="Export Data" COM_SERMONDISTRIBUTOR_EXPORT_DATA_DESC=" Allows users in this group to export data." COM_SERMONDISTRIBUTOR_EXPORT_FAILED="Export Failed" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE="External Source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES="External Sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS="External Sources Access" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS_DESC="Allows the users in this group to access access external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_OPTIONS="Batch process the selected External Sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_TIP="All changes will be applied to all selected External Sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE="External Sources Batch Use" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE="External Sources Create" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE_DESC="Allows the users in this group to create create external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DASHBOARD_ADD="External Sources Dashboard Add" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DASHBOARD_LIST="External Sources Dashboard List" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DELETE="External Sources Delete" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_DELETE_DESC="Allows the users in this group to delete delete external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT="External Sources Edit" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD="External Sources Edit Build" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD_DESC="Allows the users in this group to update the edit build of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_CREATED_BY="External Sources Edit Created By" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_CREATED_DATE="External Sources Edit Created Date" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DESC="Allows the users in this group to edit the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DESCRIPTION="External Sources Edit Description" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DESCRIPTION_DESC="Allows the users in this group to update the edit description of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS="External Sources Edit Dropboxoptions" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS_DESC="Allows the users in this group to update the edit dropboxoptions of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_EXTERNALSOURCES="External Sources Edit Externalsources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_EXTERNALSOURCES_DESC="Allows the users in this group to update the edit externalsources of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES="External Sources Edit Filetypes" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES_DESC="Allows the users in this group to update the edit filetypes of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER="External Sources Edit Folder" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER_DESC="Allows the users in this group to update the edit folder of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN="External Sources Edit Oauthtoken" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN_DESC="Allows the users in this group to update the edit oauthtoken of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OWN="External Sources Edit Own" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OWN_DESC="Allows the users in this group to edit edit own external sources created by them" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE="External Sources Edit Permissiontype" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE_DESC="Allows the users in this group to update the edit permissiontype of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL="External Sources Edit Sharedurl" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL_DESC="Allows the users in this group to update the edit sharedurl of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_STATE="External Sources Edit State" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_STATE_DESC="Allows the users in this group to update the state of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD="External Sources Edit Update Method" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD_DESC="Allows the users in this group to update the edit update method of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER="External Sources Edit Update Timer" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER_DESC="Allows the users in this group to update the edit update timer of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION="External Sources Edit Version" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT="External Sources Export" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT_DESC="Allows the users in this group to export export external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_IMPORT="External Sources Import" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_IMPORT_DESC="Allows the users in this group to import import external sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_ARCHIVED="%s External Sources archived." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_ARCHIVED_1="%s External Source archived." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_CHECKED_IN_0="No External Source successfully checked in." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_CHECKED_IN_1="%d External Source successfully checked in." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_CHECKED_IN_MORE="%d External Sources successfully checked in." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_DELETED="%s External Sources deleted." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_DELETED_1="%s External Source deleted." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FEATURED="%s External Sources featured." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_FEATURED_1="%s External Source featured." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_PUBLISHED="%s External Sources published." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_PUBLISHED_1="%s External Source published." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_TRASHED="%s External Sources trashed." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_TRASHED_1="%s External Source trashed." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNFEATURED="%s External Sources unfeatured." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNFEATURED_1="%s External Source unfeatured." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNPUBLISHED="%s External Sources unpublished." +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 update the submenu of the external source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APP_FOLDER="App folder" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APP_LIMITATION_NOTE_DESCRIPTION="Please Note: There is a limitation of 2000 files app/folder" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AUTOMATIC="Automatic" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AVI=".avi" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD="Build" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_DESCRIPTION="Set the method used to add files." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL="Build Option" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_BY_DESC="The user that created this External Source." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_BY_LABEL="Created By" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_DATE_DESC="The date this External Source was created." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_DATE_LABEL="Created Date" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION="Description" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION_DESCRIPTION="Enter some description" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION_HINT="Description Here" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION_LABEL="Description" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DETAILS="Details" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOC=".doc" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOCX=".docx" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DROPBOX="Dropbox" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DROPBOXOPTIONS="Dropboxoptions" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DROPBOXOPTIONS_DESCRIPTION="Select the option you would like to use in targeting the Dropbox API." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DROPBOXOPTIONS_LABEL="Options" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DYNAMIC_AUTOMATIC_BUILD="Dynamic Automatic Build" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EDIT="Editing the External Source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ERROR_UNIQUE_ALIAS="Another External Source has the same alias." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES="Externalsources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_DESCRIPTION="Only one option at this time" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL="External Sources" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FILETYPES="Filetypes" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FILETYPES_DESCRIPTION="Select the file types you would like to use from this external sources." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FILETYPES_LABEL="File Types" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER="Folder" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_DESCRIPTION="Enter the folders to target. The folders must be in the account where you generated the access token." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_LABEL="Target Folders
    Please note: limitation of 2000 files per/folder" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_PATH="Folder Path" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_SELECT="Add/Remove" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FULL_DROPBOX="Full Dropbox" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_GENERATED_ACCESS_TOKEN_NOTE_DESCRIPTION="The manual option you selected will not require you to store the access token on this server. But you will need it during the manual updating process." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_GENERATED_ACCESS_TOKEN_NOTE_LABEL="Generated access token" +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_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_MPG=".mpg" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE=".mp3" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW="A New External Source" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_DROPBOX_DESCRIPTION="
      +
    • Create main/first auto folder in Dropbox. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.
    • +
    • You can add files directly to the preacher folder if it is not linked to a series.
    • +
    • If you would like the sermon linked to a series, you simply create a folder inside the preacher's folder with the series' name, and place the sermon file inside that series' folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
    • +
    • Adding other preachers to the same series will only require creating a folder inside that preacher's folder with the same series' name and placing his sermons inside that new folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
    • +
    • The file name will be used as the sermon name.
    • +
    • To ensure that all downloads work well, we need to hold to the following file naming convention: +
        +
      • No spaces in the file name!!
      • +
      • No strange characters in the file name only A-z 0-9 underscore and hyphen.
      • +
      +
    • +
    • We use naming conventions to add tags, categories, a short description and combine files under one sermon, these conventions are as follow: +
        +
      • To combine files +
          +
        • Use a KEY name with TWO underscores before the actual name, example (34key521__the_file_name.mp3 & 34key521__another_file_of_the_same_sermon.pdf)
        • +
        • The KEY may only have alpha numeric characters (A-z 0-9).
        • +
        • You can combine as many files as you like under each sermon with the unique KEY.
        • +
        • There are two ways to set the sermon name with combined files: +
            +
          • All Uppercase. example (34key521__THE_FILE_NAME.mp3 & 34key521__another_file_of_the_same_sermon.pdf).
          • +
          • Longest file name if no all-uppercase file name is found. If two file names are the same length the first one is used.
          • +
          +
        • +
        • Uppercase option is the most trusted method since this will insure you get what you expected.
        • +
        +
      • +
      • To tag files +
          +
        • Directly after the file name add THREE underscores and then set the tags, example (the_file_name___tag1_tag-with2_tag-three.mp3)
        • +
        • You can add as many tags to a file as you like separated by one underscore and hyphen for spaces in a tag.
        • +
        • Combined files only need to have the tags added to one of the files. If one of the files has a tag that was not already found it will also be added to the sermon as a whole since the combined files are treated as one sermon.
        • +
        +
      • +
      • To add sermons to categories +
          +
        • Directly after the file name add FOUR underscores and then set the category name, example (the_file_name____Salvation_Messages.mp3)
        • +
        • You can add only one category per sermon. Combined files only need to have the category name added to one of the files.
        • +
        +
      • +
      • To add a short description +
          +
        • Directly after the file name add FIVE underscores and then set the description, example (the_file_name_____The_short_description_can_only_be_one_sentence.mp3)
        • +
        • You can not use any strange characters, only (A-z 0-9) and underscore for spacing.
        • +
        • You can add only one short description per sermon. Combined files only need to have the short description added to one of the files.
        • +
        +
      • +
      +
    • +
    • When you use all the naming conventions together they should follow the following order: +
        +
      • KEY before the file name with TWO underscores.
      • +
      • TAGS must be first after the file name with THREE underscores.
      • +
      • CATEGORY must be first after TAGS with FOUR underscores. IF no tags were set then it must be first after the FILE NAME with FOUR underscores.
      • +
      • SHORT DESCRIPTION must be first after CATEGORY with FIVE underscores. IF no category was set then it must be first after the TAGS with FIVE underscores. IF no tags were set then it must be first after the FILE NAME with FIVE underscores.
      • +
      +
    • +
    • Adding folders and sermons will automatically load them to your sermon distributor on your website, or update the already existing sermons with the new files.
    • +
    +
The links that are required below should be the direct Dropbox shared links to the auto folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_DROPBOX_LABEL="Want to use Dropbox Auto links with your system, then you need to do the following:" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_DROPBOX_DESCRIPTION="
    +
  • Create main/first manual folder in Dropbox. This will be where all files are placed. No sub folders, just one huge folder with all the files!
  • +
  • You will place the file on Dropbox in that main folder first.
  • +
  • Then the next step will be to come to Sermon Distributor and create the preacher and series if they do not already exist.
  • +
  • Please allow enough time (as set above +) for the local listing of files to update.
  • +
  • Then you should create the sermon the file belongs to and select 'Dropbox' as the source of your file.
  • +
  • Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on Dropbox. Should the new file not be seen give it a little more time to update the local listing of files.
  • +
  • If the List is very long, you can in the select box type the name of the file and it will shorten the list. Then select your file and continue with the setup of the sermon as usual.
  • +
  • To ensure that all downloads work well, we need to hold to the following file naming convention: +
      +
    • No spaces in the file name!!
    • +
    • No strange characters in the file name only A-z 0-9 underscore and hyphen.
    • +
    +
  • +
The links that are required below should be the direct Dropbox shared links to the main manual folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_DROPBOX_LABEL="Want to use Dropbox Manual links with your system, then you need to do the following:" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOT_REQUIRED="Not Required" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN="Oauthtoken" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_DESCRIPTION="By using an access token, the system will be able to make automatic API calls to your app without going through the authorization flow.
This field is being kept encrypted in the database.
Yet Joomla back-end must be access with SSL in-place when saving this page. This will help avoid a man in the middle attach on your access token." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_HINT="oauthtoken here" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_LABEL="App Generated access token
(Encrypted Field)" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ODT=".odt" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGG=".ogg" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGV=".ogv" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ORDERING_LABEL="Ordering" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PDF=".pdf" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PERMISSION="Permissions" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PERMISSIONTYPE="Permissiontype" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PERMISSIONTYPE_DESCRIPTION="What kind of permission type is your app." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PERMISSIONTYPE_LABEL="App Permission Type" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PNG=".png" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPS=".pps" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPSX=".ppsx" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPT=".ppt" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPTX=".pptx" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PUBLISHING="Publishing" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RELATION="External Source Relation" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the External Source to customise the alias." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION="Select an option" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL="Sharedurl" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_DESCRIPTION="Enter the shared-urls of the main folders to target. The shared-urls must be from the account where you generated the access token." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_LABEL="Target Shared-urls
Please note: limitation of 2000 files per/shared-url" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_SELECT="Add/Remove" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHARED_URL="Shared URL" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_STATUS="Status" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_DESCRIPTION="Enter the folder to target. The folder must be in the account where you generated the access token." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_HINT="any/folder/in/your/Dropbox" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_TFOLDER_LABEL="Folder" +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" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD="Update Method" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_DESCRIPTION="Select the method we should use when updating the links." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL="Update Method" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_TIMER="Update Timer" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_TIMER_DESCRIPTION="Set the timer in minutes for updating the external source local listing of file links." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_TIMER_LABEL="Update Timer" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_VERSION_DESC="A count of the number of times this External Source has been revised." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_VERSION_LABEL="Revision" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WAV=".wav" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI="Wiki" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI_CHECK_NOTE_DESCRIPTION="It will give instructions on how to setup the external source in relation to the Build Option you have chosen." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI_CHECK_NOTE_LABEL="Please check the Wiki tab above." +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WMV=".wmv" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLS=".xls" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLSX=".xlsx" +COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ZIP=".zip" COM_SERMONDISTRIBUTOR_HELP_DOCUMENT="Help Document" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS="Help Documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS="Help Documents Access" @@ -835,7 +741,9 @@ COM_SERMONDISTRIBUTOR_IMPORT_NO_IMPORT_TYPE_FOUND="Import type not found." COM_SERMONDISTRIBUTOR_IMPORT_PLEASE_SELECT_COLUMN="-- Please Select Column --" COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE="Select File" COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_DIRECTORY="Set the path to file" +COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES="Select the file to import data to external_sources." COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS="Select the file to import data to help_documents." +COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS="Select the file to import data to local_listings." COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS="Select the file to import data to preachers." COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST="Select the file to import data to series_list." COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS="Select the file to import data to sermons." @@ -851,11 +759,128 @@ COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -" COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE="- Keep Original State -" COM_SERMONDISTRIBUTOR_LICENSE="License" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING="Local Listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS="Local Listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS="Local Listings Access" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS_DESC="Allows the users in this group to access access local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_OPTIONS="Batch process the selected Local Listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_TIP="All changes will be applied to all selected Local Listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE="Local Listings Batch Use" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_CREATE="Local Listings Create" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_CREATE_DESC="Allows the users in this group to create create local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_DASHBOARD_LIST="Local Listings Dashboard List" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_DELETE="Local Listings Delete" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_DELETE_DESC="Allows the users in this group to delete delete local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT="Local Listings Edit" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_BUILD="Local Listings Edit Build" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_BUILD_DESC="Allows the users in this group to update the edit build of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_CREATED_BY="Local Listings Edit Created By" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_CREATED_DATE="Local Listings Edit Created Date" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_DESC="Allows the users in this group to edit the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_EXTERNAL_SOURCE="Local Listings Edit External Source" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_EXTERNAL_SOURCE_DESC="Allows the users in this group to update the edit external source of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_KEY="Local Listings Edit Key" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_KEY_DESC="Allows the users in this group to update the edit key of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_NAME="Local Listings Edit Name" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_OWN="Local Listings Edit Own" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_OWN_DESC="Allows the users in this group to edit edit own local listings created by them" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_SIZE="Local Listings Edit Size" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_SIZE_DESC="Allows the users in this group to update the edit size of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_STATE="Local Listings Edit State" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL="Local Listings Edit Url" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL_DESC="Allows the users in this group to update the edit url of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION="Local Listings Edit Version" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT="Local Listings Export" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT_DESC="Allows the users in this group to export export local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_IMPORT="Local Listings Import" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_IMPORT_DESC="Allows the users in this group to import import local listings" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_ARCHIVED="%s Local Listings archived." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_ARCHIVED_1="%s Local Listing archived." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_CHECKED_IN_0="No Local Listing successfully checked in." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_CHECKED_IN_1="%d Local Listing successfully checked in." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_CHECKED_IN_MORE="%d Local Listings successfully checked in." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_DELETED="%s Local Listings deleted." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_DELETED_1="%s Local Listing deleted." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FEATURED="%s Local Listings featured." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_FEATURED_1="%s Local Listing featured." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_PUBLISHED="%s Local Listings published." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_PUBLISHED_1="%s Local Listing published." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_TRASHED="%s Local Listings trashed." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_TRASHED_1="%s Local Listing trashed." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_UNFEATURED="%s Local Listings unfeatured." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_UNFEATURED_1="%s Local Listing unfeatured." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_UNPUBLISHED="%s Local Listings unpublished." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_N_ITEMS_UNPUBLISHED_1="%s Local Listing unpublished." +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_SUBMENU="Local Listings Submenu" +COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_SUBMENU_DESC="Allows the users in this group to update the submenu of the local listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD="Build" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_DESCRIPTION="Set the method used to add files." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL="Build Option" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_CREATED_BY_DESC="The user that created this Local Listing." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_CREATED_BY_LABEL="Created By" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_CREATED_DATE_DESC="The date this Local Listing was created." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_CREATED_DATE_LABEL="Created Date" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_DETAILS="Details" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_DYNAMIC_AUTOMATIC_BUILD="Dynamic Automatic Build" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EDIT="Editing the Local Listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_ERROR_UNIQUE_ALIAS="Another Local Listing has the same alias." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE="External Source" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_DESCRIPTION="The external source of this listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL="External Source" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_ID="Id" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY="Key" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY_DESCRIPTION="This key will be used for this local listing." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY_HINT="Listing Key" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY_LABEL="Listing Key" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MANUAL_LOCAL_SELECTION="Manual Local Selection" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MODIFIED_BY_DESC="The last user that modified this Local Listing." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MODIFIED_BY_LABEL="Modified By" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MODIFIED_DATE_DESC="The date this Local Listing was modified." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MODIFIED_DATE_LABEL="Modified Date" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME="Name" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME_DESCRIPTION="This is the file name." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME_HINT="file name" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME_LABEL="File Name" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NEW="A New Local Listing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_ORDERING_LABEL="Ordering" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_PERMISSION="Permissions" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_PUBLISHING="Publishing" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Local Listing to customise the alias." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SELECT_AN_OPTION="Select an option" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SIZE="Size" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SIZE_DESCRIPTION="This is the file size." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SIZE_HINT="file size" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SIZE_LABEL="File Size" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_STATUS="Status" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL="Url" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL_DESCRIPTION="This is the shared URL." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL_HINT="shared URL" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL_LABEL="Shared-URL" +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_VERSION_DESC="A count of the number of times this Local Listing has been revised." +COM_SERMONDISTRIBUTOR_LOCAL_LISTING_VERSION_LABEL="Revision" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER="Manual Updater" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_ACCESS="Manual Updater Access" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_ACCESS_DESC="Allows the users in this group to access Manual Updater" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_DASHBOARD_LIST="Manual Updater Dashboard List" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Manual Updater" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_DESC="Manual Updater" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS="Manual Updater External Sources Button Access" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the external sources button." +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu" +COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to update the submenu of the Manual Updater" COM_SERMONDISTRIBUTOR_NEW="New" COM_SERMONDISTRIBUTOR_NEW_ISSUE="New Issue" COM_SERMONDISTRIBUTOR_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." COM_SERMONDISTRIBUTOR_NO_ACCESS_GRANTED="No Access Granted!" COM_SERMONDISTRIBUTOR_NO_FILES_LINKED_YET="No Files Linked Yet" +COM_SERMONDISTRIBUTOR_NO_MANUAL_UPDATES_AVAILABLE="No Manual Updates Available" COM_SERMONDISTRIBUTOR_OPENED_BY="opened by" COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." COM_SERMONDISTRIBUTOR_PREACHER="Preacher" @@ -1106,10 +1131,9 @@ COM_SERMONDISTRIBUTOR_SERMON_ACCESS_SITE_DESC=" Allows the users in this group t COM_SERMONDISTRIBUTOR_SERMON_ALIAS="Alias" COM_SERMONDISTRIBUTOR_SERMON_ALIAS_HINT="Auto-generated from name" COM_SERMONDISTRIBUTOR_SERMON_ALIAS_LABEL="Alias" -COM_SERMONDISTRIBUTOR_SERMON_AUTOMATIC="Automatic" COM_SERMONDISTRIBUTOR_SERMON_AUTO_SERMONS="Auto Sermons" COM_SERMONDISTRIBUTOR_SERMON_BUILD="Build" -COM_SERMONDISTRIBUTOR_SERMON_BUILD_DESCRIPTION="Set the method used to add files to this sermon." +COM_SERMONDISTRIBUTOR_SERMON_BUILD_DESCRIPTION="Set the method used to add files." COM_SERMONDISTRIBUTOR_SERMON_BUILD_LABEL="Build Option" COM_SERMONDISTRIBUTOR_SERMON_CATID_DESCRIPTION="select one of the following categories" COM_SERMONDISTRIBUTOR_SERMON_CATID_LABEL="Category" @@ -1121,10 +1145,11 @@ COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION="Description" COM_SERMONDISTRIBUTOR_SERMON_DESCRIPTION_LABEL="Description" COM_SERMONDISTRIBUTOR_SERMON_DETAILS="Details" COM_SERMONDISTRIBUTOR_SERMON_DIRECT="Direct" -COM_SERMONDISTRIBUTOR_SERMON_DROPBOX="Dropbox" +COM_SERMONDISTRIBUTOR_SERMON_DYNAMIC_AUTOMATIC_BUILD="Dynamic Automatic Build" COM_SERMONDISTRIBUTOR_SERMON_EDIT="Editing the Sermon" COM_SERMONDISTRIBUTOR_SERMON_ENCRYPTED="Encrypted" COM_SERMONDISTRIBUTOR_SERMON_ERROR_UNIQUE_ALIAS="Another Sermon has the same alias." +COM_SERMONDISTRIBUTOR_SERMON_EXTERNAL_SOURCE="External Source" COM_SERMONDISTRIBUTOR_SERMON_FILES="Files" COM_SERMONDISTRIBUTOR_SERMON_ICON="Icon" COM_SERMONDISTRIBUTOR_SERMON_ICON_DESCRIPTION="Must be 358px x 358px" @@ -1137,10 +1162,10 @@ COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FILES="Local Files" COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FILES_DESCRIPTION="Select the files you would like to add to this sermon." COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FILES_LABEL="Files" COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FOLDER="Local Folder" -COM_SERMONDISTRIBUTOR_SERMON_MANUAL="Manual" COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES="Manual Files" COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_DESCRIPTION="Select the files you would like to add to this sermon." COM_SERMONDISTRIBUTOR_SERMON_MANUAL_FILES_LABEL="Files" +COM_SERMONDISTRIBUTOR_SERMON_MANUAL_LOCAL_SELECTION="Manual Local Selection" COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_DESC="The last user that modified this Sermon." COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_BY_LABEL="Modified By" COM_SERMONDISTRIBUTOR_SERMON_MODIFIED_DATE_DESC="The date this Sermon was modified." @@ -1150,8 +1175,8 @@ COM_SERMONDISTRIBUTOR_SERMON_NAME_DESCRIPTION="Enter Name Here" COM_SERMONDISTRIBUTOR_SERMON_NAME_HINT="Name Here" COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL="Name" COM_SERMONDISTRIBUTOR_SERMON_NEW="A New Sermon" -COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION="To integrate auto Dropbox with your system you need to do the following:
    -
  • Create main/first auto folder in Dropbox. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.
  • +COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_EXTERNALSOURCE_DESCRIPTION="To integrate auto External Source with your system you need to do the following:
      +
    • 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.
    • You can add files directly to the preacher folder if it is not linked to a series.
    • If you would like the sermon linked to a series, you simply create a folder inside the preacher's folder with the series' name, and place the sermon file inside that series' folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
    • Adding other preachers to the same series will only require creating a folder inside that preacher's folder with the same series' name and placing his sermons inside that new folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.
    • @@ -1210,20 +1235,20 @@ COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_DESCRIPTION="To integrate auto
    • Adding folders and sermons will automatically load them to your sermon distributor on your website, or update the already existing sermons with the new files.
    -
Make sure you have at least one auto folder in Dropbox and have added the shared link in the Sermon Distributor " -COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_DROPBOX_LABEL="Dropbox Integration" +Make sure you have at least one auto folder in External Source and have added the information in the Sermon Distributors " +COM_SERMONDISTRIBUTOR_SERMON_NOTE_AUTO_EXTERNALSOURCE_LABEL="External Source Integration" COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_DESCRIPTION="This link option does not allow counting of the downloads of this file, and does not secures the download location of this file. Other can reuse it by adding it to their own websites, this action is called hotlinking, leeching, piggy-backing." COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_DIRECTED_LABEL="The Direct Link Option" COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_DESCRIPTION="This link option allows for counting of all downloads of this file, and secures the download location of this file. The download link also prevents other from reusing the link outside of your website if they are not in the same session." COM_SERMONDISTRIBUTOR_SERMON_NOTE_LINK_ENCRYPTED_LABEL="The Encrypted Link Option" -COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION="To integrate manual Dropbox option with your system you need to do the following: +COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_EXTERNALSOURCE_DESCRIPTION="To integrate manual External Source option with your system you need to do the following:
    -
  • Create main/first manual folder in Dropbox. This will be where all files are placed. No sub folders, just one huge folder with all the files!
  • -
  • You will place the file on Dropbox in that main folder first.
  • +
  • Create main/first manual folder in External Source. This will be where all files are placed. No sub folders, just one huge folder with all the files!
  • +
  • You will place the file on External Source in that main folder first.
  • Then the next step will be to come to Sermon Distributor and create the preacher and series if they do not already exist.
  • Please allow enough time (as set in Sermon Distributor Options) for the local listing of files to update.
  • -
  • Then you should create the sermon the file belongs to and select 'Dropbox' as the source of your file.
  • -
  • Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on Dropbox. Should the new file not be seen give it a little more time to update the local listing of files.
  • +
  • Then you should create the sermon the file belongs to and select 'External Source' as the source of your file.
  • +
  • Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on External Source. Should the new file not be seen give it a little more time to update the local listing of files.
  • If the List is very long, you can in the select box type the name of the file and it will shorten the list. Then select your file and continue with the setup of the sermon as usual.
  • To ensure that all downloads work well, we need to hold to the following file naming convention:
      @@ -1232,8 +1257,8 @@ COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_DESCRIPTION="To integrate ma
-Make sure you have at least one manual folder in Dropbox and have added the shared link in the Sermon Distributor " -COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_DROPBOX_LABEL="Dropbox Integration" +Make sure you have at least one manual folder in External Source and have added the shared link in the Sermon Distributor " +COM_SERMONDISTRIBUTOR_SERMON_NOTE_MANUAL_EXTERNALSOURCE_LABEL="External Source Integration" COM_SERMONDISTRIBUTOR_SERMON_NOT_REQUIRED="Not Required" COM_SERMONDISTRIBUTOR_SERMON_ORDERING_LABEL="Ordering" COM_SERMONDISTRIBUTOR_SERMON_PERMISSION="Permissions" @@ -1246,6 +1271,7 @@ COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE="Scripture" COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_DESCRIPTION="Add scripture reference to this sermon, use comma separation for multiply references." COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_HINT="1 John 3:16, Psalm 1, James 1:1-5" COM_SERMONDISTRIBUTOR_SERMON_SCRIPTURE_LABEL="Scripture" +COM_SERMONDISTRIBUTOR_SERMON_SELECT_AN_OPTION="Select an option" COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE="Select Source" COM_SERMONDISTRIBUTOR_SERMON_SERIES="Series" COM_SERMONDISTRIBUTOR_SERMON_SERIES_DESCRIPTION="Select the series this sermon belongs to." @@ -1269,6 +1295,7 @@ COM_SERMONDISTRIBUTOR_SERMON_URL_HINT="http://www.domain.com/direct-link-to-down COM_SERMONDISTRIBUTOR_SERMON_URL_LABEL="File URL" COM_SERMONDISTRIBUTOR_SERMON_VERSION_DESC="A count of the number of times this Sermon has been revised." COM_SERMONDISTRIBUTOR_SERMON_VERSION_LABEL="Revision" +COM_SERMONDISTRIBUTOR_SHAREDURL="Shared-url" COM_SERMONDISTRIBUTOR_STATISTIC="Statistic" COM_SERMONDISTRIBUTOR_STATISTICS="Statistics" COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS="Statistics Access" @@ -1356,17 +1383,28 @@ COM_SERMONDISTRIBUTOR_STATISTIC_STATUS="Status" COM_SERMONDISTRIBUTOR_STATISTIC_VERSION_DESC="A count of the number of times this Statistic has been revised." COM_SERMONDISTRIBUTOR_STATISTIC_VERSION_LABEL="Revision" COM_SERMONDISTRIBUTOR_SUBMENU_DASHBOARD="Dashboard" +COM_SERMONDISTRIBUTOR_SUBMENU_EXTERNAL_SOURCES="External Sources" COM_SERMONDISTRIBUTOR_SUBMENU_HELP_DOCUMENTS="Help Documents" +COM_SERMONDISTRIBUTOR_SUBMENU_LOCAL_LISTINGS="Local Listings" +COM_SERMONDISTRIBUTOR_SUBMENU_MANUAL_UPDATER="Manual Updater" COM_SERMONDISTRIBUTOR_SUBMENU_PREACHERS="Preachers" 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_TARGETED_FOLDER="Targeted Folder" +COM_SERMONDISTRIBUTOR_THERE_HAS_NO_TARGETS_BEEN_SET_PLEASE_MAKE_SURE_TO_ADD_TARGETS_TO_THIS_EXTERNAL_SOURCE="There has no targets been set, please make sure to add targets to this external source" +COM_SERMONDISTRIBUTOR_THERE_WAS_AN_ERROR_DURING_THE_LAST_UPDATE_ATTEMPT="There was an error during the last update attempt." +COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND="The external source could not be found." +COM_SERMONDISTRIBUTOR_THE_FILES_LINKED_FROM_EXTERNAL_SOURCE="The Files Linked from External Source" COM_SERMONDISTRIBUTOR_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_SERMONDISTRIBUTOR_THE_README_IS_LOADING="The readme is loading" +COM_SERMONDISTRIBUTOR_THE_UPDATE_IS_RUNNING="The update is running." COM_SERMONDISTRIBUTOR_THE_WIKI_IS_LOADING="The wiki is loading" +COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED="Unknown error has occurred." +COM_SERMONDISTRIBUTOR_UPDATE_LOCAL_LINKS_OF_TARGET_S_EXTERNAL_SOURCE="Update Local Links of (target %s) External Source" COM_SERMONDISTRIBUTOR_USE_BATCH="Use Batch" COM_SERMONDISTRIBUTOR_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." COM_SERMONDISTRIBUTOR_VERSION="Version" +COM_SERMONDISTRIBUTOR_VIEW_ERROR="View Error!" COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_SERMONDISTRIBUTOR_WEBSITE="Website" diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 1ce6a8bd..a079129a 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage batchselection.php diff --git a/admin/layouts/external_source/details_above.php b/admin/layouts/external_source/details_above.php new file mode 100644 index 00000000..9bd502eb --- /dev/null +++ b/admin/layouts/external_source/details_above.php @@ -0,0 +1,42 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'description', + 'externalsources' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/external_source/details_fullwidth.php b/admin/layouts/external_source/details_fullwidth.php new file mode 100644 index 00000000..d83f7f03 --- /dev/null +++ b/admin/layouts/external_source/details_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'sharedurl', + 'folder' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/external_source/details_left.php b/admin/layouts/external_source/details_left.php new file mode 100644 index 00000000..1eefa3f0 --- /dev/null +++ b/admin/layouts/external_source/details_left.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'oauthtoken', + 'generated_access_token_note', + 'permissiontype', + 'app_limitation_note', + 'dropboxoptions' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/external_source/details_right.php b/admin/layouts/external_source/details_right.php new file mode 100644 index 00000000..aa9fa285 --- /dev/null +++ b/admin/layouts/external_source/details_right.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'build', + 'wiki_check_note', + 'update_method', + 'update_timer', + 'filetypes' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/external_source/details_under.php b/admin/layouts/external_source/details_under.php new file mode 100644 index 00000000..7190834b --- /dev/null +++ b/admin/layouts/external_source/details_under.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'not_required' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/external_source/index.html b/admin/layouts/external_source/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/layouts/external_source/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/external_source/publishing.php b/admin/layouts/external_source/publishing.php new file mode 100644 index 00000000..5ddd979a --- /dev/null +++ b/admin/layouts/external_source/publishing.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/external_source/publlshing.php b/admin/layouts/external_source/publlshing.php new file mode 100644 index 00000000..eaa0f3a6 --- /dev/null +++ b/admin/layouts/external_source/publlshing.php @@ -0,0 +1,59 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/external_source/wiki_fullwidth.php b/admin/layouts/external_source/wiki_fullwidth.php new file mode 100644 index 00000000..9f3451e3 --- /dev/null +++ b/admin/layouts/external_source/wiki_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_manual_dropbox', + 'note_auto_dropbox' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index b36f1a5d..e3c0527b 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index 0a2ba024..74c1c486 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index e8f02213..8ab7ed43 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index f06f5505..ff62d54b 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 8919e453..7190834b 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_under.php diff --git a/admin/layouts/help_document/metadata.php b/admin/layouts/help_document/metadata.php index e307a8a6..dbfdb0f3 100644 --- a/admin/layouts/help_document/metadata.php +++ b/admin/layouts/help_document/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage metadata.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index ef657d46..69b281e2 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage publishing.php diff --git a/admin/layouts/local_listing/details_above.php b/admin/layouts/local_listing/details_above.php new file mode 100644 index 00000000..01843f43 --- /dev/null +++ b/admin/layouts/local_listing/details_above.php @@ -0,0 +1,42 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'name', + 'size' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/local_listing/details_fullwidth.php b/admin/layouts/local_listing/details_fullwidth.php new file mode 100644 index 00000000..8a90f45d --- /dev/null +++ b/admin/layouts/local_listing/details_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'key', + 'url' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/local_listing/details_left.php b/admin/layouts/local_listing/details_left.php new file mode 100644 index 00000000..6148e5a3 --- /dev/null +++ b/admin/layouts/local_listing/details_left.php @@ -0,0 +1,54 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'external_source' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/local_listing/details_right.php b/admin/layouts/local_listing/details_right.php new file mode 100644 index 00000000..ed4e56bc --- /dev/null +++ b/admin/layouts/local_listing/details_right.php @@ -0,0 +1,54 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'build' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/local_listing/index.html b/admin/layouts/local_listing/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/layouts/local_listing/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/local_listing/publishing.php b/admin/layouts/local_listing/publishing.php new file mode 100644 index 00000000..5ddd979a --- /dev/null +++ b/admin/layouts/local_listing/publishing.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/local_listing/publlshing.php b/admin/layouts/local_listing/publlshing.php new file mode 100644 index 00000000..eaa0f3a6 --- /dev/null +++ b/admin/layouts/local_listing/publlshing.php @@ -0,0 +1,59 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$app = JFactory::getApplication(); +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'published', + 'ordering', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/preacher/details_above.php b/admin/layouts/preacher/details_above.php index f9cd170a..0e5022dd 100644 --- a/admin/layouts/preacher/details_above.php +++ b/admin/layouts/preacher/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_above.php diff --git a/admin/layouts/preacher/details_fullwidth.php b/admin/layouts/preacher/details_fullwidth.php index ec29be5e..1761f30f 100644 --- a/admin/layouts/preacher/details_fullwidth.php +++ b/admin/layouts/preacher/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_fullwidth.php diff --git a/admin/layouts/preacher/details_left.php b/admin/layouts/preacher/details_left.php index e71917a0..7cb8ec55 100644 --- a/admin/layouts/preacher/details_left.php +++ b/admin/layouts/preacher/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_left.php diff --git a/admin/layouts/preacher/details_right.php b/admin/layouts/preacher/details_right.php index a0ddf9ad..f9bdd2f0 100644 --- a/admin/layouts/preacher/details_right.php +++ b/admin/layouts/preacher/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_right.php diff --git a/admin/layouts/preacher/metadata.php b/admin/layouts/preacher/metadata.php index e307a8a6..dbfdb0f3 100644 --- a/admin/layouts/preacher/metadata.php +++ b/admin/layouts/preacher/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage metadata.php diff --git a/admin/layouts/preacher/publishing.php b/admin/layouts/preacher/publishing.php index ef657d46..69b281e2 100644 --- a/admin/layouts/preacher/publishing.php +++ b/admin/layouts/preacher/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage publishing.php diff --git a/admin/layouts/preacher/sermons_fullwidth.php b/admin/layouts/preacher/sermons_fullwidth.php index 98989bdb..198e1ab6 100644 --- a/admin/layouts/preacher/sermons_fullwidth.php +++ b/admin/layouts/preacher/sermons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermons_fullwidth.php diff --git a/admin/layouts/series/details_above.php b/admin/layouts/series/details_above.php index f9cd170a..0e5022dd 100644 --- a/admin/layouts/series/details_above.php +++ b/admin/layouts/series/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_above.php diff --git a/admin/layouts/series/details_fullwidth.php b/admin/layouts/series/details_fullwidth.php index ec29be5e..1761f30f 100644 --- a/admin/layouts/series/details_fullwidth.php +++ b/admin/layouts/series/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_fullwidth.php diff --git a/admin/layouts/series/details_left.php b/admin/layouts/series/details_left.php index e71917a0..7cb8ec55 100644 --- a/admin/layouts/series/details_left.php +++ b/admin/layouts/series/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_left.php diff --git a/admin/layouts/series/details_right.php b/admin/layouts/series/details_right.php index ed4f9a49..b60b6af7 100644 --- a/admin/layouts/series/details_right.php +++ b/admin/layouts/series/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_right.php diff --git a/admin/layouts/series/metadata.php b/admin/layouts/series/metadata.php index e307a8a6..dbfdb0f3 100644 --- a/admin/layouts/series/metadata.php +++ b/admin/layouts/series/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage metadata.php diff --git a/admin/layouts/series/publishing.php b/admin/layouts/series/publishing.php index ef657d46..69b281e2 100644 --- a/admin/layouts/series/publishing.php +++ b/admin/layouts/series/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage publishing.php diff --git a/admin/layouts/series/sermons_fullwidth.php b/admin/layouts/series/sermons_fullwidth.php index b997ed82..ffdc8bdd 100644 --- a/admin/layouts/series/sermons_fullwidth.php +++ b/admin/layouts/series/sermons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermons_fullwidth.php diff --git a/admin/layouts/sermon/details_above.php b/admin/layouts/sermon/details_above.php index 9f4cc1cf..df1e026a 100644 --- a/admin/layouts/sermon/details_above.php +++ b/admin/layouts/sermon/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_above.php diff --git a/admin/layouts/sermon/details_fullwidth.php b/admin/layouts/sermon/details_fullwidth.php index ec29be5e..1761f30f 100644 --- a/admin/layouts/sermon/details_fullwidth.php +++ b/admin/layouts/sermon/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_fullwidth.php diff --git a/admin/layouts/sermon/details_left.php b/admin/layouts/sermon/details_left.php index 9f75eb9e..33d2ad24 100644 --- a/admin/layouts/sermon/details_left.php +++ b/admin/layouts/sermon/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_left.php diff --git a/admin/layouts/sermon/details_right.php b/admin/layouts/sermon/details_right.php index 40d83a32..2a604336 100644 --- a/admin/layouts/sermon/details_right.php +++ b/admin/layouts/sermon/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_right.php diff --git a/admin/layouts/sermon/details_under.php b/admin/layouts/sermon/details_under.php index 039661a3..1f861227 100644 --- a/admin/layouts/sermon/details_under.php +++ b/admin/layouts/sermon/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_under.php diff --git a/admin/layouts/sermon/files_fullwidth.php b/admin/layouts/sermon/files_fullwidth.php index a24728a5..e53562df 100644 --- a/admin/layouts/sermon/files_fullwidth.php +++ b/admin/layouts/sermon/files_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage files_fullwidth.php @@ -35,8 +35,8 @@ 'note_link_encrypted', 'source', 'build', - 'note_manual_dropbox', - 'note_auto_dropbox', + 'note_manual_externalsource', + 'note_auto_externalsource', 'manual_files', 'local_files', 'url' diff --git a/admin/layouts/sermon/metadata.php b/admin/layouts/sermon/metadata.php index e307a8a6..dbfdb0f3 100644 --- a/admin/layouts/sermon/metadata.php +++ b/admin/layouts/sermon/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage metadata.php diff --git a/admin/layouts/sermon/publishing.php b/admin/layouts/sermon/publishing.php index ef657d46..69b281e2 100644 --- a/admin/layouts/sermon/publishing.php +++ b/admin/layouts/sermon/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage publishing.php diff --git a/admin/layouts/sermon/stastics_fullwidth.php b/admin/layouts/sermon/stastics_fullwidth.php index d0f49a2f..e474ee17 100644 --- a/admin/layouts/sermon/stastics_fullwidth.php +++ b/admin/layouts/sermon/stastics_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage stastics_fullwidth.php diff --git a/admin/layouts/statistic/details_above.php b/admin/layouts/statistic/details_above.php index 8ca651e7..5a44c8c5 100644 --- a/admin/layouts/statistic/details_above.php +++ b/admin/layouts/statistic/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_above.php diff --git a/admin/layouts/statistic/details_left.php b/admin/layouts/statistic/details_left.php index 64cca705..6b5d325c 100644 --- a/admin/layouts/statistic/details_left.php +++ b/admin/layouts/statistic/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_left.php diff --git a/admin/layouts/statistic/details_right.php b/admin/layouts/statistic/details_right.php index 08bc236d..53a77dab 100644 --- a/admin/layouts/statistic/details_right.php +++ b/admin/layouts/statistic/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage details_right.php diff --git a/admin/layouts/statistic/metadata.php b/admin/layouts/statistic/metadata.php index e307a8a6..dbfdb0f3 100644 --- a/admin/layouts/statistic/metadata.php +++ b/admin/layouts/statistic/metadata.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage metadata.php diff --git a/admin/layouts/statistic/publishing.php b/admin/layouts/statistic/publishing.php index ef657d46..69b281e2 100644 --- a/admin/layouts/statistic/publishing.php +++ b/admin/layouts/statistic/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage publishing.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 123cab7c..b38fbc10 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage ajax.php @@ -44,35 +44,13 @@ public function __construct() } // Used in sermon - /** - * Check and Set Dropbox local listing - **/ - public function dropbox($view) - { - // we update both if posible - $types = array('manual','auto'); - foreach ($types as $type) - { - // run the update - if (SermondistributorHelper::updateDropbox($type)) - { - // now update the system if needed - if ('auto' == $type) - { - $this->updateSystemWithDropbox(); - } - } - } - 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); + $path_filename = SermondistributorHelper::getFilePath('user', 'notice', JFactory::getUser()->username, '.md', JPATH_COMPONENT_ADMINISTRATOR); // check if the file is set if (($content = @file_get_contents($path_filename)) !== FALSE) { @@ -90,7 +68,7 @@ public function isNew($notice) public function isRead($notice) { // first get the file path - $path_filename = SermondistributorHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR); + $path_filename = SermondistributorHelper::getFilePath('user', 'notice', JFactory::getUser()->username, '.md', JPATH_COMPONENT_ADMINISTRATOR); // set as read if not already set if (($content = @file_get_contents($path_filename)) !== FALSE) { @@ -115,68 +93,89 @@ protected function saveFile($data,$path_filename) } /** - * Update Dropbox local listing + * Auto Update Local Listing External **/ - public function updateDropbox($type) - { - if (1 == $type) + public function autoUpdateLocalListingExternal($id, $target, $typeID) + { + if (1 == $typeID) { $type = 'manual'; } - elseif (2 == $type) + elseif (2 == $typeID) { $type = 'auto'; } - // the types allowed - $types = array('manual','auto'); + // first get the file path + $path_filename = SermondistributorHelper::getFilePath('update', 'error', $id.$target.$typeID, '.txt', JPATH_COMPONENT_ADMINISTRATOR); // check the type - if (SermondistributorHelper::checkString($type) && in_array($type,$types)) + if (isset($type) && SermondistributorHelper::checkString($type)) { - // run the update - if (SermondistributorHelper::updateDropbox($type,true)) + // run the updatetype + if (SermondistributorHelper::updateExternalSource($id, $target, $type)) { // now update the system if needed if ('auto' == $type) { - $this->updateSystemWithDropbox(); + $this->updateSystemWithExternalSource($id); } + $this->saveFile('success',$path_filename); return true; } + $this->saveFile(SermondistributorHelper::getUpdateError($id),$path_filename); + return false; } + $this->saveFile(JText::_('COM_SERMONDISTRIBUTOR_BTHERE_WAS_AN_ERRORB'),$path_filename); return false; } /** - * Status of update progress of the local listing + * Update Local Listing of External Source (manually) **/ - public function updateProgress($type) + public function updateLocalListingExternal($id, $target, $typeID, $sleutel) { - if (1 == $type) + if (1 == $typeID) { $type = 'manual'; } - elseif (2 == $type) + elseif (2 == $typeID) { $type = 'auto'; } - // the types allowed - $types = array('manual','auto'); - // check the type - if (SermondistributorHelper::checkString($type) && in_array($type,$types)) + // first get the file path + $path_filename = SermondistributorHelper::getFilePath('update', 'error', $id.$target.$typeID, '.txt', JPATH_COMPONENT_ADMINISTRATOR); + // check "die sleutel" and the type + if (isset($type) && SermondistributorHelper::checkString($sleutel)) { - // return the update progress - return SermondistributorHelper::getUpdateProgress($type); - } - return false; + // run the update + if (SermondistributorHelper::updateExternalSource($id, $target, $type, true, $sleutel)) + { + // now update the system if needed + if ('auto' == $type) + { + $this->updateSystemWithExternalSource($id); + } + $this->saveFile('success',$path_filename); + return array('success' => true); + } + // store the error + $error = SermondistributorHelper::getUpdateError($id); + $this->saveFile($error,$path_filename); + // return the error + return array('error' => $error); + } + // store the error + $error = JText::_('COM_SERMONDISTRIBUTOR_BCOULD_NOT_USE_THE_GIVEN_TOKEN_OR_THE_GIVEN_BUILD_OPTION_DOES_NOT_EXISTB'); + $this->saveFile($error,$path_filename); + return array('error' => $error); } /** - * Update the System with Dropbox local listing + * Update the System with External Source local listing **/ - protected function updateSystemWithDropbox() + protected function updateSystemWithExternalSource($id) { // check if we should update with auto listing - $links_dropbox_auto = SermondistributorHelper::getDropboxLink('auto', 2); + $links_dropbox_auto = SermondistributorHelper::getExternalSourceLink('auto', 2); if (SermondistributorHelper::checkArray($links_dropbox_auto)) { $bucket = array(); @@ -224,7 +223,7 @@ protected function updateSystemWithDropbox() } return false; } - + protected function setSermons($db) { // check if we have values @@ -287,7 +286,7 @@ protected function setSermons($db) } return $this->allSermonsCheckStatus($db); } - + protected function allSermonsCheckStatus($db) { $query = $db->getQuery(true); @@ -317,7 +316,6 @@ protected function allSermonsCheckStatus($db) return $db->execute(); } - protected function loadSermonData($preacher,$preacherName,$series,$seriesName,$sermon,$placeholder,$db) { // 34key521__the_file_name___tag1_tag-with2_tag-three____Salvation_Messages_____The_short_description_can_only_be_one_sentence.mp3 @@ -526,12 +524,12 @@ protected function getIdByName($name,$type,$db) // 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 @@ -656,5 +654,130 @@ protected function getSermonAliasesUsed($db) $this->uniqeValueArray['sermon']['alias'][$alias] = $alias; } } + } + + // Used in external_source + protected $functionArray = array(); + + protected $languageArray = array(); + + protected function setLanguage($key,$lang) + { + $this->languageArray[$key] = $lang; + } + + public function getLanguage() + { + // return the language string that were set + return $this->languageArray; + } + + protected function setAutoLangZero() + { + // set the headers + $headers = array( + 'tsharedurl' => JText::_('COM_SERMONDISTRIBUTOR_SHAREDURL'), + 'tfolder' => JText::_('COM_SERMONDISTRIBUTOR_TARGETED_FOLDER') + ); + // loop the array + foreach ($headers as $key => $lang) + { + $this->setLanguage($key,$lang); + } + } + + protected function autoLoader() + { + $functions = range(0,10); + foreach ($functions as $function) + { + $function = 'setAutoLang'.SermondistributorHelper::safeString($function, 'f'); + if (method_exists($this, $function)) + { + $this->{$function}(); + } + } + foreach ($functions as $function) + { + $function = 'setAutoFunc'.SermondistributorHelper::safeString($function, 'f'); + if (method_exists($this, $function)) + { + $this->{$function}(); + } + } + } + + public function getBuildTable($idName,$oject) + { + if (SermondistributorHelper::checkJson($oject) && SermondistributorHelper::checkString($idName)) + { + $array = json_decode($oject, true); + if (SermondistributorHelper::checkArray($array)) + { + // make sure we run the autoloader to insure all is set + $this->autoLoader(); + // set the target headers + $targetHeaders = $this->getLanguage(); + // start table build + $table = ''; + $rows = array(); + foreach ($array as $header => $values) + { + if (SermondistributorHelper::checkArray($values)) + { + $targetHeader = (isset($targetHeaders[$header])) ? $targetHeaders[$header] : SermondistributorHelper::safeString($header, 'W'); + $table .= ''; + foreach ($values as $nr => $value) + { + // set the value for the row + $this->setRows($nr, $this->setValue($header, $value), $rows); + } + } + } + // close header start body + $table .= ''; + // add rows to table + if (SermondistributorHelper::checkArray($rows)) + { + foreach ($rows as $row) + { + $table .= ''.$row.''; + } + } + + // close the body and table + $table .= '
'.$targetHeader.'
'; + // return the table + return $table; + } + } + return false; + } + + protected function setValue($header,$value) + { + if (array_key_exists($header, $this->functionArray) && method_exists($this, $this->functionArray[$header])) + { + $value = $this->{$this->functionArray[$header]}($header,$value); + } + // if no value are set + if (!SermondistributorHelper::checkString($value)) + { + $value = '-'; + } + return $value; + } + + protected function setRows($nr, $value, &$rows) + { + // build rows + if (!isset($rows[$nr])) + { + $rows[$nr] = ''.$value.''; + } + else + { + $rows[$nr] .= ''.$value.''; + } } } diff --git a/admin/models/external_source.php b/admin/models/external_source.php new file mode 100644 index 00000000..3381a84d --- /dev/null +++ b/admin/models/external_source.php @@ -0,0 +1,1122 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Sermondistributor External_source Model + */ +class SermondistributorModelExternal_source extends JModelAdmin +{ + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_SERMONDISTRIBUTOR'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_sermondistributor.external_source'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'external_source', $prefix = 'SermondistributorTable', $config = array()) + { + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->filetypes)) + { + // JSON Decode filetypes. + $item->filetypes = json_decode($item->filetypes); + } + + // Get the basic encription. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object. + $basic = new FOFEncryptAes($basickey, 128); + + if (!empty($item->oauthtoken) && $basickey && !is_numeric($item->oauthtoken) && $item->oauthtoken === base64_encode(base64_decode($item->oauthtoken, true))) + { + // basic decript data oauthtoken. + $item->oauthtoken = rtrim($basic->decryptString($item->oauthtoken), "\0"); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_sermondistributor.external_source'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_sermondistributor.external_source', 'external_source', array('control' => 'jform', 'load_data' => $loadData)); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.state', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.state', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.created_by', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.created_by', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.created', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.created', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Modify the form based on Edit Description access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.description', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.description', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('description', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('description', 'readonly', 'true'); + if (!$form->getValue('description')) + { + // Disable fields while saving. + $form->setFieldAttribute('description', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('description', 'required', 'false'); + } + } + // Modify the form based on Edit Externalsources access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.externalsources', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.externalsources', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('externalsources', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('externalsources', 'readonly', 'true'); + if (!$form->getValue('externalsources')) + { + // Disable fields while saving. + $form->setFieldAttribute('externalsources', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('externalsources', 'required', 'false'); + } + } + // Modify the form based on Edit Update Method access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.update_method', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.update_method', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('update_method', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('update_method', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('update_method', 'class', ''); + $form->setFieldAttribute('update_method', 'class', $class.' disabled no-click'); + if (!$form->getValue('update_method')) + { + // Disable fields while saving. + $form->setFieldAttribute('update_method', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('update_method', 'required', 'false'); + } + } + // Modify the form based on Edit Filetypes access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.filetypes', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.filetypes', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('filetypes', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('filetypes', 'readonly', 'true'); + if (!$form->getValue('filetypes')) + { + // Disable fields while saving. + $form->setFieldAttribute('filetypes', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('filetypes', 'required', 'false'); + } + } + // Modify the form based on Edit Build access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.build', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.build', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('build', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('build', 'readonly', 'true'); + if (!$form->getValue('build')) + { + // Disable fields while saving. + $form->setFieldAttribute('build', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('build', 'required', 'false'); + } + } + // Modify the form based on Edit Permissiontype access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('permissiontype', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('permissiontype', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('permissiontype', 'class', ''); + $form->setFieldAttribute('permissiontype', 'class', $class.' disabled no-click'); + if (!$form->getValue('permissiontype')) + { + // Disable fields while saving. + $form->setFieldAttribute('permissiontype', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('permissiontype', 'required', 'false'); + } + } + // Modify the form based on Edit Update Timer access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.update_timer', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.update_timer', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('update_timer', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('update_timer', 'readonly', 'true'); + if (!$form->getValue('update_timer')) + { + // Disable fields while saving. + $form->setFieldAttribute('update_timer', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('update_timer', 'required', 'false'); + } + } + // Modify the form based on Edit Dropboxoptions access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.dropboxoptions', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.dropboxoptions', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('dropboxoptions', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('dropboxoptions', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('dropboxoptions', 'class', ''); + $form->setFieldAttribute('dropboxoptions', 'class', $class.' disabled no-click'); + if (!$form->getValue('dropboxoptions')) + { + // Disable fields while saving. + $form->setFieldAttribute('dropboxoptions', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('dropboxoptions', 'required', 'false'); + } + } + // Modify the form based on Edit Folder access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.folder', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.folder', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('folder', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('folder', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('folder', 'class', ''); + $form->setFieldAttribute('folder', 'class', $class.' disabled no-click'); + if (!$form->getValue('folder')) + { + // Disable fields while saving. + $form->setFieldAttribute('folder', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('folder', 'required', 'false'); + } + } + // Modify the form based on Edit Sharedurl access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.sharedurl', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.sharedurl', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('sharedurl', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('sharedurl', 'readonly', 'true'); + // Disable radio button for display. + $class = $form->getFieldAttribute('sharedurl', 'class', ''); + $form->setFieldAttribute('sharedurl', 'class', $class.' disabled no-click'); + if (!$form->getValue('sharedurl')) + { + // Disable fields while saving. + $form->setFieldAttribute('sharedurl', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('sharedurl', 'required', 'false'); + } + } + // Modify the form based on Edit Oauthtoken access controls. + if ($id != 0 && (!$user->authorise('external_source.edit.oauthtoken', 'com_sermondistributor.external_source.' . (int) $id)) + || ($id == 0 && !$user->authorise('external_source.edit.oauthtoken', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('oauthtoken', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('oauthtoken', 'readonly', 'true'); + if (!$form->getValue('oauthtoken')) + { + // Disable fields while saving. + $form->setFieldAttribute('oauthtoken', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('oauthtoken', 'required', 'false'); + } + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_sermondistributor/models/forms/external_source.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('external_source.delete', 'com_sermondistributor.external_source.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('external_source.edit.state', 'com_sermondistributor.external_source.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('external_source.edit.state', 'com_sermondistributor'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('external_source.edit', 'com_sermondistributor.external_source.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('external_source.edit', 'com_sermondistributor'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__sermondistributor_external_source')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_sermondistributor.edit.external_source.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (SermondistributorHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (SermondistributorHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + 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. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('external_source'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('external_source'); + } + + if (!$this->canDo->get('external_source.create') && !$this->canDo->get('external_source.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('external_source.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + + if (!$this->user->authorise('external_source.edit', $contexts[$pk])) + + { + + // Not fatal error + + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + + continue; + + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $this->table->description = $this->generateUniqe('description',$this->table->description); + + // insert all set values + if (SermondistributorHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (SermondistributorHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('external_source'); + } + + if (!$this->canDo->get('external_source.edit') && !$this->canDo->get('external_source.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('external_source.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('external_source.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (SermondistributorHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' == $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Set the filetypes string to JSON string. + if (isset($data['filetypes'])) + { + $data['filetypes'] = (string) json_encode($data['filetypes']); + } + + // Get the basic encription key. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object + $basic = new FOFEncryptAes($basickey, 128); + + // Encript data oauthtoken. + if (isset($data['oauthtoken']) && $basickey) + { + $data['oauthtoken'] = $basic->encryptString($data['oauthtoken']); + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') == 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (SermondistributorHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title & alias. + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/external_sources.php b/admin/models/external_sources.php new file mode 100644 index 00000000..d43586b1 --- /dev/null +++ b/admin/models/external_sources.php @@ -0,0 +1,515 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * External_sources Model + */ +class SermondistributorModelExternal_sources extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by', + 'a.description','description', + 'a.externalsources','externalsources', + 'a.update_method','update_method', + 'a.build','build' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); + $this->setState('filter.description', $description); + + $externalsources = $this->getUserStateFromRequest($this->context . '.filter.externalsources', 'filter_externalsources'); + $this->setState('filter.externalsources', $externalsources); + + $update_method = $this->getUserStateFromRequest($this->context . '.filter.update_method', 'filter_update_method'); + $this->setState('filter.update_method', $update_method); + + $build = $this->getUserStateFromRequest($this->context . '.filter.build', 'filter_build'); + $this->setState('filter.build', $build); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (SermondistributorHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && $user->authorise('external_source.access', 'com_sermondistributor')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + // convert filetypes + $filetypesArray = json_decode($item->filetypes, true); + if (SermondistributorHelper::checkArray($filetypesArray)) + { + $filetypesNames = ''; + $counter = 0; + foreach ($filetypesArray as $filetypes) + { + if ($counter == 0) + { + $filetypesNames .= JText::_($this->selectionTranslation($filetypes, 'filetypes')); + } + else + { + $filetypesNames .= ', '.JText::_($this->selectionTranslation($filetypes, 'filetypes')); + } + $counter++; + } + $item->filetypes = $filetypesNames; + } + } + } + + // set selection value to a translatable value + if (SermondistributorHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert externalsources + $item->externalsources = $this->selectionTranslation($item->externalsources, 'externalsources'); + // convert update_method + $item->update_method = $this->selectionTranslation($item->update_method, 'update_method'); + // convert filetypes + $item->filetypes = $this->selectionTranslation($item->filetypes, 'filetypes'); + // convert build + $item->build = $this->selectionTranslation($item->build, 'build'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of externalsources language strings + if ($name == 'externalsources') + { + $externalsourcesArray = array( + 0 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION', + 1 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DROPBOX' + ); + // Now check if value is found in this array + if (isset($externalsourcesArray[$value]) && SermondistributorHelper::checkString($externalsourcesArray[$value])) + { + return $externalsourcesArray[$value]; + } + } + // Array of update_method language strings + if ($name == 'update_method') + { + $update_methodArray = array( + 1 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MANUAL', + 2 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AUTOMATIC' + ); + // Now check if value is found in this array + if (isset($update_methodArray[$value]) && SermondistributorHelper::checkString($update_methodArray[$value])) + { + return $update_methodArray[$value]; + } + } + // Array of filetypes language strings + if ($name == 'filetypes') + { + $filetypesArray = array( + '.mp3' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE', + '.m4a' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURA', + '.ogg' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OGG', + '.wav' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WAV', + '.mp4' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPFOUR', + '.m4v' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MFOURV', + '.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', + '.pdf' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PDF', + '.doc' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOC', + '.docx' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DOCX', + '.ppt' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPT', + '.pptx' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPTX', + '.pps' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPS', + '.ppsx' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPSX', + '.odt' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ODT', + '.xls' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLS', + '.xlsx' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLSX', + '.zip' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ZIP', + '.jpg' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_JPG', + '.jpeg' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_JPEG', + '.png' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PNG', + '.gif' => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_GIF' + ); + // Now check if value is found in this array + if (isset($filetypesArray[$value]) && SermondistributorHelper::checkString($filetypesArray[$value])) + { + return $filetypesArray[$value]; + } + } + // Array of build language strings + if ($name == 'build') + { + $buildArray = array( + 0 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION', + 1 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MANUAL_LOCAL_SELECTION', + 2 => 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DYNAMIC_AUTOMATIC_BUILD' + ); + // Now check if value is found in this array + if (isset($buildArray[$value]) && SermondistributorHelper::checkString($buildArray[$value])) + { + return $buildArray[$value]; + } + } + return $value; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the sermondistributor_item table + $query->from($db->quoteName('#__sermondistributor_external_source', 'a')); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.description LIKE '.$search.' OR a.externalsources LIKE '.$search.' OR a.update_method LIKE '.$search.')'); + } + } + + // Filter by Externalsources. + if ($externalsources = $this->getState('filter.externalsources')) + { + $query->where('a.externalsources = ' . $db->quote($db->escape($externalsources))); + } + // Filter by Update_method. + if ($update_method = $this->getState('filter.update_method')) + { + $query->where('a.update_method = ' . $db->quote($db->escape($update_method))); + } + // Filter by Build. + if ($build = $this->getState('filter.build')) + { + $query->where('a.build = ' . $db->quote($db->escape($build))); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks) + { + // setup the query + if (SermondistributorHelper::checkArray($pks)) + { + // Set a value to know this is exporting method. + $_export = true; + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the sermondistributor_external_source table + $query->from($db->quoteName('#__sermondistributor_external_source', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // Get the basic encription key. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object. + $basic = new FOFEncryptAes($basickey, 128); + + // set values to display correctly. + if (SermondistributorHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $item->id) && $user->authorise('external_source.access', 'com_sermondistributor')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + if ($basickey && !is_numeric($item->oauthtoken) && $item->oauthtoken === base64_encode(base64_decode($item->oauthtoken, true))) + { + // decrypt oauthtoken + $item->oauthtoken = $basic->decryptString($item->oauthtoken); + } + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (SermondistributorHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__sermondistributor_external_source"); + if (SermondistributorHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + $id .= ':' . $this->getState('filter.description'); + $id .= ':' . $this->getState('filter.externalsources'); + $id .= ':' . $this->getState('filter.update_method'); + $id .= ':' . $this->getState('filter.build'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__sermondistributor_external_source'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index d8ff5df1..565cecd4 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 66947cd0..fe6a2ae7 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage articles.php diff --git a/admin/models/fields/externalsource.php b/admin/models/fields/externalsource.php new file mode 100644 index 00000000..7ed1cb5e --- /dev/null +++ b/admin/models/fields/externalsource.php @@ -0,0 +1,171 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Externalsource Form Field class for the Sermondistributor component + */ +class JFormFieldExternalsource extends JFormFieldList +{ + /** + * The externalsource field type. + * + * @var string + */ + public $type = 'externalsource'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $setButton = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($setButton === 'true') + { + $button = array(); + $script = array(); + $buttonName = $this->getAttribute('name'); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + } + $user = JFactory::getUser(); + // only add if user allowed to create external_source + if ($user->authorise('external_source.create', 'com_sermondistributor')) + { + // build Create button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ' + '; + } + // only add if user allowed to edit external_source + if (($buttonName == 'external_source' || $buttonName == 'external_sources') && $user->authorise('external_source.edit', 'com_sermondistributor')) + { + // build edit button + $buttonNamee = trim($buttonName); + $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); + $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); + $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); + $buttonNamee = ucfirst(strtolower($buttonNamee)); + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + e.preventDefault(); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); + ".$buttonName."Button(".$buttonName."Value); + }); + function ".$buttonName."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$buttonName."Create').hide(); + // show edit button + jQuery('#".$buttonName."Edit').show(); + var url = 'index.php?option=com_sermondistributor&view=external_sources&task=external_source.edit&id='+value+'".$refJ."'; + jQuery('#".$buttonName."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$buttonName."Create').show(); + // hide edit button + jQuery('#".$buttonName."Edit').hide(); + } + }"; + } + // check if button was created for external_source field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + public function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.description','a.externalsources','a.update_method'),array('id','external_source_description','externalsources','update_method'))); + $query->from($db->quoteName('#__sermondistributor_external_source', 'a')); + $query->where($db->quoteName('a.published') . ' = 1'); + $query->order('a.description ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $model = SermondistributorHelper::getModel('external_sources'); + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->external_source_description. ' (' . JText::_($model->selectionTranslation($item->externalsources,'externalsources')). ' ' . JText::_($model->selectionTranslation($item->update_method,'update_method')). ')'); + } + } + return $options; + } +} diff --git a/admin/models/fields/dropboxfiles.php b/admin/models/fields/externalsourcefiles.php similarity index 90% rename from admin/models/fields/dropboxfiles.php rename to admin/models/fields/externalsourcefiles.php index 83006a43..1c4e3369 100644 --- a/admin/models/fields/dropboxfiles.php +++ b/admin/models/fields/externalsourcefiles.php @@ -10,11 +10,11 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor - @subpackage dropboxfiles.php + @subpackage externalsourcefiles.php @author Llewellyn van der Merwe @copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -31,16 +31,16 @@ JFormHelper::loadFieldClass('list'); /** - * Dropboxfiles Form Field class for the Sermondistributor component + * Externalsourcefiles Form Field class for the Sermondistributor component */ -class JFormFieldDropboxfiles extends JFormFieldList +class JFormFieldExternalsourcefiles extends JFormFieldList { /** - * The dropboxfiles field type. + * The externalsourcefiles field type. * * @var string */ - public $type = 'dropboxfiles'; + public $type = 'externalsourcefiles'; /** * Override to add new button * @@ -149,15 +149,14 @@ function ".$buttonName."Button(value) { public function getOptions() { // set the default - $options[] = JHtml::_('select.option', '', JText::_('The local listing of the Manual Dropbox folder is empty.')); - $links = SermondistributorHelper::getDropboxLink('manual',2); - if (SermondistributorHelper::checkArray($links)) + $options[] = JHtml::_('select.option', '', JText::_('The local listing of the Manual External Source folder/s is empty.')); + $selection = SermondistributorHelper::getExternalSourceLink('manual', 2, false, 'select'); + if (SermondistributorHelper::checkArray($selection)) { $options = array(); - foreach ($links as $file => $link) + foreach ($selection as $key => $name) { - $name = substr($file, strrpos($file, '/') + 1); - $options[] = JHtml::_('select.option', $file, $name); + $options[] = JHtml::_('select.option', $key, $name); } } return $options; diff --git a/admin/models/fields/localfiles.php b/admin/models/fields/localfiles.php index dbe89bda..9747df78 100644 --- a/admin/models/fields/localfiles.php +++ b/admin/models/fields/localfiles.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage localfiles.php diff --git a/admin/models/fields/preachers.php b/admin/models/fields/preachers.php index d007eb34..ffd48fdc 100644 --- a/admin/models/fields/preachers.php +++ b/admin/models/fields/preachers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preachers.php diff --git a/admin/models/fields/series.php b/admin/models/fields/series.php index d2dcb5a7..d8729d86 100644 --- a/admin/models/fields/series.php +++ b/admin/models/fields/series.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.php diff --git a/admin/models/fields/sermon.php b/admin/models/fields/sermon.php index 059662d0..7a5b9edd 100644 --- a/admin/models/fields/sermon.php +++ b/admin/models/fields/sermon.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index 28d5bef7..4ca1a268 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage siteviewfolderlist.php diff --git a/admin/models/forms/external_source.js b/admin/models/forms/external_source.js new file mode 100644 index 00000000..86cf2092 --- /dev/null +++ b/admin/models/forms/external_source.js @@ -0,0 +1,1097 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage external_source.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// Some Global Values +jform_vvvvvwmvwd_required = false; + +// Initial Script +jQuery(document).ready(function() +{ + var externalsources_vvvvvwe = jQuery("#jform_externalsources").val(); + var permissiontype_vvvvvwe = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwe(externalsources_vvvvvwe,permissiontype_vvvvvwe); + + var externalsources_vvvvvwg = jQuery("#jform_externalsources").val(); + var permissiontype_vvvvvwg = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwg(externalsources_vvvvvwg,permissiontype_vvvvvwg); + + var externalsources_vvvvvwi = jQuery("#jform_externalsources").val(); + vvvvvwi(externalsources_vvvvvwi); + + var update_method_vvvvvwj = jQuery("#jform_update_method input[type='radio']:checked").val(); + vvvvvwj(update_method_vvvvvwj); + + var build_vvvvvwk = jQuery("#jform_build").val(); + vvvvvwk(build_vvvvvwk); + + var build_vvvvvwl = jQuery("#jform_build").val(); + vvvvvwl(build_vvvvvwl); + + var externalsources_vvvvvwm = jQuery("#jform_externalsources").val(); + var update_method_vvvvvwm = jQuery("#jform_update_method input[type='radio']:checked").val(); + vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm); + + var externalsources_vvvvvwo = jQuery("#jform_externalsources").val(); + var update_method_vvvvvwo = jQuery("#jform_update_method input[type='radio']:checked").val(); + vvvvvwo(externalsources_vvvvvwo,update_method_vvvvvwo); + + var externalsources_vvvvvwq = jQuery("#jform_externalsources").val(); + var dropboxoptions_vvvvvwq = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + var permissiontype_vvvvvwq = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwq(externalsources_vvvvvwq,dropboxoptions_vvvvvwq,permissiontype_vvvvvwq); + + var dropboxoptions_vvvvvwr = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + var externalsources_vvvvvwr = jQuery("#jform_externalsources").val(); + var permissiontype_vvvvvwr = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwr(dropboxoptions_vvvvvwr,externalsources_vvvvvwr,permissiontype_vvvvvwr); + + var permissiontype_vvvvvws = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + var externalsources_vvvvvws = jQuery("#jform_externalsources").val(); + var dropboxoptions_vvvvvws = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + vvvvvws(permissiontype_vvvvvws,externalsources_vvvvvws,dropboxoptions_vvvvvws); + + var externalsources_vvvvvwt = jQuery("#jform_externalsources").val(); + var dropboxoptions_vvvvvwt = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + var permissiontype_vvvvvwt = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwt(externalsources_vvvvvwt,dropboxoptions_vvvvvwt,permissiontype_vvvvvwt); + + var dropboxoptions_vvvvvwu = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + var externalsources_vvvvvwu = jQuery("#jform_externalsources").val(); + var permissiontype_vvvvvwu = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + vvvvvwu(dropboxoptions_vvvvvwu,externalsources_vvvvvwu,permissiontype_vvvvvwu); + + var permissiontype_vvvvvwv = jQuery("#jform_permissiontype input[type='radio']:checked").val(); + var externalsources_vvvvvwv = jQuery("#jform_externalsources").val(); + var dropboxoptions_vvvvvwv = jQuery("#jform_dropboxoptions input[type='radio']:checked").val(); + vvvvvwv(permissiontype_vvvvvwv,externalsources_vvvvvwv,dropboxoptions_vvvvvwv); + + var build_vvvvvww = jQuery("#jform_build").val(); + vvvvvww(build_vvvvvww); +}); + +// the vvvvvwe function +function vvvvvwe(externalsources_vvvvvwe,permissiontype_vvvvvwe) +{ + if (isSet(externalsources_vvvvvwe) && externalsources_vvvvvwe.constructor !== Array) + { + var temp_vvvvvwe = externalsources_vvvvvwe; + var externalsources_vvvvvwe = []; + externalsources_vvvvvwe.push(temp_vvvvvwe); + } + else if (!isSet(externalsources_vvvvvwe)) + { + var externalsources_vvvvvwe = []; + } + var externalsources = externalsources_vvvvvwe.some(externalsources_vvvvvwe_SomeFunc); + + if (isSet(permissiontype_vvvvvwe) && permissiontype_vvvvvwe.constructor !== Array) + { + var temp_vvvvvwe = permissiontype_vvvvvwe; + var permissiontype_vvvvvwe = []; + permissiontype_vvvvvwe.push(temp_vvvvvwe); + } + else if (!isSet(permissiontype_vvvvvwe)) + { + var permissiontype_vvvvvwe = []; + } + var permissiontype = permissiontype_vvvvvwe.some(permissiontype_vvvvvwe_SomeFunc); + + + // set this function logic + if (externalsources && permissiontype) + { + jQuery('#jform_dropboxoptions').closest('.control-group').show(); + } + else + { + jQuery('#jform_dropboxoptions').closest('.control-group').hide(); + } +} + +// the vvvvvwe Some function +function externalsources_vvvvvwe_SomeFunc(externalsources_vvvvvwe) +{ + // set the function logic + if (externalsources_vvvvvwe == 1) + { + return true; + } + return false; +} + +// the vvvvvwe Some function +function permissiontype_vvvvvwe_SomeFunc(permissiontype_vvvvvwe) +{ + // set the function logic + if (permissiontype_vvvvvwe == 'full') + { + return true; + } + return false; +} + +// the vvvvvwg function +function vvvvvwg(externalsources_vvvvvwg,permissiontype_vvvvvwg) +{ + if (isSet(externalsources_vvvvvwg) && externalsources_vvvvvwg.constructor !== Array) + { + var temp_vvvvvwg = externalsources_vvvvvwg; + var externalsources_vvvvvwg = []; + externalsources_vvvvvwg.push(temp_vvvvvwg); + } + else if (!isSet(externalsources_vvvvvwg)) + { + var externalsources_vvvvvwg = []; + } + var externalsources = externalsources_vvvvvwg.some(externalsources_vvvvvwg_SomeFunc); + + if (isSet(permissiontype_vvvvvwg) && permissiontype_vvvvvwg.constructor !== Array) + { + var temp_vvvvvwg = permissiontype_vvvvvwg; + var permissiontype_vvvvvwg = []; + permissiontype_vvvvvwg.push(temp_vvvvvwg); + } + else if (!isSet(permissiontype_vvvvvwg)) + { + var permissiontype_vvvvvwg = []; + } + var permissiontype = permissiontype_vvvvvwg.some(permissiontype_vvvvvwg_SomeFunc); + + + // set this function logic + if (externalsources && permissiontype) + { + jQuery('.app_limitation_note').closest('.control-group').show(); + } + else + { + jQuery('.app_limitation_note').closest('.control-group').hide(); + } +} + +// the vvvvvwg Some function +function externalsources_vvvvvwg_SomeFunc(externalsources_vvvvvwg) +{ + // set the function logic + if (externalsources_vvvvvwg == 1) + { + return true; + } + return false; +} + +// the vvvvvwg Some function +function permissiontype_vvvvvwg_SomeFunc(permissiontype_vvvvvwg) +{ + // set the function logic + if (permissiontype_vvvvvwg == 'app') + { + return true; + } + return false; +} + +// the vvvvvwi function +function vvvvvwi(externalsources_vvvvvwi) +{ + if (isSet(externalsources_vvvvvwi) && externalsources_vvvvvwi.constructor !== Array) + { + var temp_vvvvvwi = externalsources_vvvvvwi; + var externalsources_vvvvvwi = []; + externalsources_vvvvvwi.push(temp_vvvvvwi); + } + else if (!isSet(externalsources_vvvvvwi)) + { + var externalsources_vvvvvwi = []; + } + var externalsources = externalsources_vvvvvwi.some(externalsources_vvvvvwi_SomeFunc); + + + // set this function logic + if (externalsources) + { + jQuery('#jform_permissiontype').closest('.control-group').show(); + } + else + { + jQuery('#jform_permissiontype').closest('.control-group').hide(); + } +} + +// the vvvvvwi Some function +function externalsources_vvvvvwi_SomeFunc(externalsources_vvvvvwi) +{ + // set the function logic + if (externalsources_vvvvvwi == 1) + { + return true; + } + return false; +} + +// the vvvvvwj function +function vvvvvwj(update_method_vvvvvwj) +{ + // set the function logic + if (update_method_vvvvvwj == 2) + { + jQuery('#jform_update_timer').closest('.control-group').show(); + } + else + { + jQuery('#jform_update_timer').closest('.control-group').hide(); + } +} + +// the vvvvvwk function +function vvvvvwk(build_vvvvvwk) +{ + if (isSet(build_vvvvvwk) && build_vvvvvwk.constructor !== Array) + { + var temp_vvvvvwk = build_vvvvvwk; + var build_vvvvvwk = []; + build_vvvvvwk.push(temp_vvvvvwk); + } + else if (!isSet(build_vvvvvwk)) + { + var build_vvvvvwk = []; + } + var build = build_vvvvvwk.some(build_vvvvvwk_SomeFunc); + + + // set this function logic + if (build) + { + jQuery('.note_auto_dropbox').closest('.control-group').show(); + } + else + { + jQuery('.note_auto_dropbox').closest('.control-group').hide(); + } +} + +// the vvvvvwk Some function +function build_vvvvvwk_SomeFunc(build_vvvvvwk) +{ + // set the function logic + if (build_vvvvvwk == 2) + { + return true; + } + return false; +} + +// the vvvvvwl function +function vvvvvwl(build_vvvvvwl) +{ + if (isSet(build_vvvvvwl) && build_vvvvvwl.constructor !== Array) + { + var temp_vvvvvwl = build_vvvvvwl; + var build_vvvvvwl = []; + build_vvvvvwl.push(temp_vvvvvwl); + } + else if (!isSet(build_vvvvvwl)) + { + var build_vvvvvwl = []; + } + var build = build_vvvvvwl.some(build_vvvvvwl_SomeFunc); + + + // set this function logic + if (build) + { + jQuery('.note_manual_dropbox').closest('.control-group').show(); + } + else + { + jQuery('.note_manual_dropbox').closest('.control-group').hide(); + } +} + +// the vvvvvwl Some function +function build_vvvvvwl_SomeFunc(build_vvvvvwl) +{ + // set the function logic + if (build_vvvvvwl == 1) + { + return true; + } + return false; +} + +// the vvvvvwm function +function vvvvvwm(externalsources_vvvvvwm,update_method_vvvvvwm) +{ + if (isSet(externalsources_vvvvvwm) && externalsources_vvvvvwm.constructor !== Array) + { + var temp_vvvvvwm = externalsources_vvvvvwm; + var externalsources_vvvvvwm = []; + externalsources_vvvvvwm.push(temp_vvvvvwm); + } + else if (!isSet(externalsources_vvvvvwm)) + { + var externalsources_vvvvvwm = []; + } + var externalsources = externalsources_vvvvvwm.some(externalsources_vvvvvwm_SomeFunc); + + if (isSet(update_method_vvvvvwm) && update_method_vvvvvwm.constructor !== Array) + { + var temp_vvvvvwm = update_method_vvvvvwm; + var update_method_vvvvvwm = []; + update_method_vvvvvwm.push(temp_vvvvvwm); + } + else if (!isSet(update_method_vvvvvwm)) + { + var update_method_vvvvvwm = []; + } + var update_method = update_method_vvvvvwm.some(update_method_vvvvvwm_SomeFunc); + + + // set this function logic + if (externalsources && update_method) + { + jQuery('#jform_oauthtoken').closest('.control-group').show(); + if (jform_vvvvvwmvwd_required) + { + updateFieldRequired('oauthtoken',0); + jQuery('#jform_oauthtoken').prop('required','required'); + jQuery('#jform_oauthtoken').attr('aria-required',true); + jQuery('#jform_oauthtoken').addClass('required'); + jform_vvvvvwmvwd_required = false; + } + + } + else + { + jQuery('#jform_oauthtoken').closest('.control-group').hide(); + if (!jform_vvvvvwmvwd_required) + { + updateFieldRequired('oauthtoken',1); + jQuery('#jform_oauthtoken').removeAttr('required'); + jQuery('#jform_oauthtoken').removeAttr('aria-required'); + jQuery('#jform_oauthtoken').removeClass('required'); + jform_vvvvvwmvwd_required = true; + } + } +} + +// the vvvvvwm Some function +function externalsources_vvvvvwm_SomeFunc(externalsources_vvvvvwm) +{ + // set the function logic + if (externalsources_vvvvvwm == 1) + { + return true; + } + return false; +} + +// the vvvvvwm Some function +function update_method_vvvvvwm_SomeFunc(update_method_vvvvvwm) +{ + // set the function logic + if (update_method_vvvvvwm == 2) + { + return true; + } + return false; +} + +// the vvvvvwo function +function vvvvvwo(externalsources_vvvvvwo,update_method_vvvvvwo) +{ + if (isSet(externalsources_vvvvvwo) && externalsources_vvvvvwo.constructor !== Array) + { + var temp_vvvvvwo = externalsources_vvvvvwo; + var externalsources_vvvvvwo = []; + externalsources_vvvvvwo.push(temp_vvvvvwo); + } + else if (!isSet(externalsources_vvvvvwo)) + { + var externalsources_vvvvvwo = []; + } + var externalsources = externalsources_vvvvvwo.some(externalsources_vvvvvwo_SomeFunc); + + if (isSet(update_method_vvvvvwo) && update_method_vvvvvwo.constructor !== Array) + { + var temp_vvvvvwo = update_method_vvvvvwo; + var update_method_vvvvvwo = []; + update_method_vvvvvwo.push(temp_vvvvvwo); + } + else if (!isSet(update_method_vvvvvwo)) + { + var update_method_vvvvvwo = []; + } + var update_method = update_method_vvvvvwo.some(update_method_vvvvvwo_SomeFunc); + + + // set this function logic + if (externalsources && update_method) + { + jQuery('.generated_access_token_note').closest('.control-group').show(); + } + else + { + jQuery('.generated_access_token_note').closest('.control-group').hide(); + } +} + +// the vvvvvwo Some function +function externalsources_vvvvvwo_SomeFunc(externalsources_vvvvvwo) +{ + // set the function logic + if (externalsources_vvvvvwo == 1) + { + return true; + } + return false; +} + +// the vvvvvwo Some function +function update_method_vvvvvwo_SomeFunc(update_method_vvvvvwo) +{ + // set the function logic + if (update_method_vvvvvwo == 1) + { + return true; + } + return false; +} + +// the vvvvvwq function +function vvvvvwq(externalsources_vvvvvwq,dropboxoptions_vvvvvwq,permissiontype_vvvvvwq) +{ + if (isSet(externalsources_vvvvvwq) && externalsources_vvvvvwq.constructor !== Array) + { + var temp_vvvvvwq = externalsources_vvvvvwq; + var externalsources_vvvvvwq = []; + externalsources_vvvvvwq.push(temp_vvvvvwq); + } + else if (!isSet(externalsources_vvvvvwq)) + { + var externalsources_vvvvvwq = []; + } + var externalsources = externalsources_vvvvvwq.some(externalsources_vvvvvwq_SomeFunc); + + if (isSet(dropboxoptions_vvvvvwq) && dropboxoptions_vvvvvwq.constructor !== Array) + { + var temp_vvvvvwq = dropboxoptions_vvvvvwq; + var dropboxoptions_vvvvvwq = []; + dropboxoptions_vvvvvwq.push(temp_vvvvvwq); + } + else if (!isSet(dropboxoptions_vvvvvwq)) + { + var dropboxoptions_vvvvvwq = []; + } + var dropboxoptions = dropboxoptions_vvvvvwq.some(dropboxoptions_vvvvvwq_SomeFunc); + + if (isSet(permissiontype_vvvvvwq) && permissiontype_vvvvvwq.constructor !== Array) + { + var temp_vvvvvwq = permissiontype_vvvvvwq; + var permissiontype_vvvvvwq = []; + permissiontype_vvvvvwq.push(temp_vvvvvwq); + } + else if (!isSet(permissiontype_vvvvvwq)) + { + var permissiontype_vvvvvwq = []; + } + var permissiontype = permissiontype_vvvvvwq.some(permissiontype_vvvvvwq_SomeFunc); + + + // set this function logic + if (externalsources && dropboxoptions && permissiontype) + { + jQuery('#jform_sharedurl').closest('.control-group').show(); + } + else + { + jQuery('#jform_sharedurl').closest('.control-group').hide(); + } +} + +// the vvvvvwq Some function +function externalsources_vvvvvwq_SomeFunc(externalsources_vvvvvwq) +{ + // set the function logic + if (externalsources_vvvvvwq == 1) + { + return true; + } + return false; +} + +// the vvvvvwq Some function +function dropboxoptions_vvvvvwq_SomeFunc(dropboxoptions_vvvvvwq) +{ + // set the function logic + if (dropboxoptions_vvvvvwq == 1) + { + return true; + } + return false; +} + +// the vvvvvwq Some function +function permissiontype_vvvvvwq_SomeFunc(permissiontype_vvvvvwq) +{ + // set the function logic + if (permissiontype_vvvvvwq == 'full') + { + return true; + } + return false; +} + +// the vvvvvwr function +function vvvvvwr(dropboxoptions_vvvvvwr,externalsources_vvvvvwr,permissiontype_vvvvvwr) +{ + if (isSet(dropboxoptions_vvvvvwr) && dropboxoptions_vvvvvwr.constructor !== Array) + { + var temp_vvvvvwr = dropboxoptions_vvvvvwr; + var dropboxoptions_vvvvvwr = []; + dropboxoptions_vvvvvwr.push(temp_vvvvvwr); + } + else if (!isSet(dropboxoptions_vvvvvwr)) + { + var dropboxoptions_vvvvvwr = []; + } + var dropboxoptions = dropboxoptions_vvvvvwr.some(dropboxoptions_vvvvvwr_SomeFunc); + + if (isSet(externalsources_vvvvvwr) && externalsources_vvvvvwr.constructor !== Array) + { + var temp_vvvvvwr = externalsources_vvvvvwr; + var externalsources_vvvvvwr = []; + externalsources_vvvvvwr.push(temp_vvvvvwr); + } + else if (!isSet(externalsources_vvvvvwr)) + { + var externalsources_vvvvvwr = []; + } + var externalsources = externalsources_vvvvvwr.some(externalsources_vvvvvwr_SomeFunc); + + if (isSet(permissiontype_vvvvvwr) && permissiontype_vvvvvwr.constructor !== Array) + { + var temp_vvvvvwr = permissiontype_vvvvvwr; + var permissiontype_vvvvvwr = []; + permissiontype_vvvvvwr.push(temp_vvvvvwr); + } + else if (!isSet(permissiontype_vvvvvwr)) + { + var permissiontype_vvvvvwr = []; + } + var permissiontype = permissiontype_vvvvvwr.some(permissiontype_vvvvvwr_SomeFunc); + + + // set this function logic + if (dropboxoptions && externalsources && permissiontype) + { + jQuery('#jform_sharedurl').closest('.control-group').show(); + } + else + { + jQuery('#jform_sharedurl').closest('.control-group').hide(); + } +} + +// the vvvvvwr Some function +function dropboxoptions_vvvvvwr_SomeFunc(dropboxoptions_vvvvvwr) +{ + // set the function logic + if (dropboxoptions_vvvvvwr == 1) + { + return true; + } + return false; +} + +// the vvvvvwr Some function +function externalsources_vvvvvwr_SomeFunc(externalsources_vvvvvwr) +{ + // set the function logic + if (externalsources_vvvvvwr == 1) + { + return true; + } + return false; +} + +// the vvvvvwr Some function +function permissiontype_vvvvvwr_SomeFunc(permissiontype_vvvvvwr) +{ + // set the function logic + if (permissiontype_vvvvvwr == 'full') + { + return true; + } + return false; +} + +// the vvvvvws function +function vvvvvws(permissiontype_vvvvvws,externalsources_vvvvvws,dropboxoptions_vvvvvws) +{ + if (isSet(permissiontype_vvvvvws) && permissiontype_vvvvvws.constructor !== Array) + { + var temp_vvvvvws = permissiontype_vvvvvws; + var permissiontype_vvvvvws = []; + permissiontype_vvvvvws.push(temp_vvvvvws); + } + else if (!isSet(permissiontype_vvvvvws)) + { + var permissiontype_vvvvvws = []; + } + var permissiontype = permissiontype_vvvvvws.some(permissiontype_vvvvvws_SomeFunc); + + if (isSet(externalsources_vvvvvws) && externalsources_vvvvvws.constructor !== Array) + { + var temp_vvvvvws = externalsources_vvvvvws; + var externalsources_vvvvvws = []; + externalsources_vvvvvws.push(temp_vvvvvws); + } + else if (!isSet(externalsources_vvvvvws)) + { + var externalsources_vvvvvws = []; + } + var externalsources = externalsources_vvvvvws.some(externalsources_vvvvvws_SomeFunc); + + if (isSet(dropboxoptions_vvvvvws) && dropboxoptions_vvvvvws.constructor !== Array) + { + var temp_vvvvvws = dropboxoptions_vvvvvws; + var dropboxoptions_vvvvvws = []; + dropboxoptions_vvvvvws.push(temp_vvvvvws); + } + else if (!isSet(dropboxoptions_vvvvvws)) + { + var dropboxoptions_vvvvvws = []; + } + var dropboxoptions = dropboxoptions_vvvvvws.some(dropboxoptions_vvvvvws_SomeFunc); + + + // set this function logic + if (permissiontype && externalsources && dropboxoptions) + { + jQuery('#jform_sharedurl').closest('.control-group').show(); + } + else + { + jQuery('#jform_sharedurl').closest('.control-group').hide(); + } +} + +// the vvvvvws Some function +function permissiontype_vvvvvws_SomeFunc(permissiontype_vvvvvws) +{ + // set the function logic + if (permissiontype_vvvvvws == 'full') + { + return true; + } + return false; +} + +// the vvvvvws Some function +function externalsources_vvvvvws_SomeFunc(externalsources_vvvvvws) +{ + // set the function logic + if (externalsources_vvvvvws == 1) + { + return true; + } + return false; +} + +// the vvvvvws Some function +function dropboxoptions_vvvvvws_SomeFunc(dropboxoptions_vvvvvws) +{ + // set the function logic + if (dropboxoptions_vvvvvws == 1) + { + return true; + } + return false; +} + +// the vvvvvwt function +function vvvvvwt(externalsources_vvvvvwt,dropboxoptions_vvvvvwt,permissiontype_vvvvvwt) +{ + if (isSet(externalsources_vvvvvwt) && externalsources_vvvvvwt.constructor !== Array) + { + var temp_vvvvvwt = externalsources_vvvvvwt; + var externalsources_vvvvvwt = []; + externalsources_vvvvvwt.push(temp_vvvvvwt); + } + else if (!isSet(externalsources_vvvvvwt)) + { + var externalsources_vvvvvwt = []; + } + var externalsources = externalsources_vvvvvwt.some(externalsources_vvvvvwt_SomeFunc); + + if (isSet(dropboxoptions_vvvvvwt) && dropboxoptions_vvvvvwt.constructor !== Array) + { + var temp_vvvvvwt = dropboxoptions_vvvvvwt; + var dropboxoptions_vvvvvwt = []; + dropboxoptions_vvvvvwt.push(temp_vvvvvwt); + } + else if (!isSet(dropboxoptions_vvvvvwt)) + { + var dropboxoptions_vvvvvwt = []; + } + var dropboxoptions = dropboxoptions_vvvvvwt.some(dropboxoptions_vvvvvwt_SomeFunc); + + if (isSet(permissiontype_vvvvvwt) && permissiontype_vvvvvwt.constructor !== Array) + { + var temp_vvvvvwt = permissiontype_vvvvvwt; + var permissiontype_vvvvvwt = []; + permissiontype_vvvvvwt.push(temp_vvvvvwt); + } + else if (!isSet(permissiontype_vvvvvwt)) + { + var permissiontype_vvvvvwt = []; + } + var permissiontype = permissiontype_vvvvvwt.some(permissiontype_vvvvvwt_SomeFunc); + + + // set this function logic + if (externalsources && dropboxoptions && permissiontype) + { + jQuery('#jform_folder').closest('.control-group').show(); + } + else + { + jQuery('#jform_folder').closest('.control-group').hide(); + } +} + +// the vvvvvwt Some function +function externalsources_vvvvvwt_SomeFunc(externalsources_vvvvvwt) +{ + // set the function logic + if (externalsources_vvvvvwt == 1) + { + return true; + } + return false; +} + +// the vvvvvwt Some function +function dropboxoptions_vvvvvwt_SomeFunc(dropboxoptions_vvvvvwt) +{ + // set the function logic + if (dropboxoptions_vvvvvwt == 2) + { + return true; + } + return false; +} + +// the vvvvvwt Some function +function permissiontype_vvvvvwt_SomeFunc(permissiontype_vvvvvwt) +{ + // set the function logic + if (permissiontype_vvvvvwt == 'full') + { + return true; + } + return false; +} + +// the vvvvvwu function +function vvvvvwu(dropboxoptions_vvvvvwu,externalsources_vvvvvwu,permissiontype_vvvvvwu) +{ + if (isSet(dropboxoptions_vvvvvwu) && dropboxoptions_vvvvvwu.constructor !== Array) + { + var temp_vvvvvwu = dropboxoptions_vvvvvwu; + var dropboxoptions_vvvvvwu = []; + dropboxoptions_vvvvvwu.push(temp_vvvvvwu); + } + else if (!isSet(dropboxoptions_vvvvvwu)) + { + var dropboxoptions_vvvvvwu = []; + } + var dropboxoptions = dropboxoptions_vvvvvwu.some(dropboxoptions_vvvvvwu_SomeFunc); + + if (isSet(externalsources_vvvvvwu) && externalsources_vvvvvwu.constructor !== Array) + { + var temp_vvvvvwu = externalsources_vvvvvwu; + var externalsources_vvvvvwu = []; + externalsources_vvvvvwu.push(temp_vvvvvwu); + } + else if (!isSet(externalsources_vvvvvwu)) + { + var externalsources_vvvvvwu = []; + } + var externalsources = externalsources_vvvvvwu.some(externalsources_vvvvvwu_SomeFunc); + + if (isSet(permissiontype_vvvvvwu) && permissiontype_vvvvvwu.constructor !== Array) + { + var temp_vvvvvwu = permissiontype_vvvvvwu; + var permissiontype_vvvvvwu = []; + permissiontype_vvvvvwu.push(temp_vvvvvwu); + } + else if (!isSet(permissiontype_vvvvvwu)) + { + var permissiontype_vvvvvwu = []; + } + var permissiontype = permissiontype_vvvvvwu.some(permissiontype_vvvvvwu_SomeFunc); + + + // set this function logic + if (dropboxoptions && externalsources && permissiontype) + { + jQuery('#jform_folder').closest('.control-group').show(); + } + else + { + jQuery('#jform_folder').closest('.control-group').hide(); + } +} + +// the vvvvvwu Some function +function dropboxoptions_vvvvvwu_SomeFunc(dropboxoptions_vvvvvwu) +{ + // set the function logic + if (dropboxoptions_vvvvvwu == 2) + { + return true; + } + return false; +} + +// the vvvvvwu Some function +function externalsources_vvvvvwu_SomeFunc(externalsources_vvvvvwu) +{ + // set the function logic + if (externalsources_vvvvvwu == 1) + { + return true; + } + return false; +} + +// the vvvvvwu Some function +function permissiontype_vvvvvwu_SomeFunc(permissiontype_vvvvvwu) +{ + // set the function logic + if (permissiontype_vvvvvwu == 'full') + { + return true; + } + return false; +} + +// the vvvvvwv function +function vvvvvwv(permissiontype_vvvvvwv,externalsources_vvvvvwv,dropboxoptions_vvvvvwv) +{ + if (isSet(permissiontype_vvvvvwv) && permissiontype_vvvvvwv.constructor !== Array) + { + var temp_vvvvvwv = permissiontype_vvvvvwv; + var permissiontype_vvvvvwv = []; + permissiontype_vvvvvwv.push(temp_vvvvvwv); + } + else if (!isSet(permissiontype_vvvvvwv)) + { + var permissiontype_vvvvvwv = []; + } + var permissiontype = permissiontype_vvvvvwv.some(permissiontype_vvvvvwv_SomeFunc); + + if (isSet(externalsources_vvvvvwv) && externalsources_vvvvvwv.constructor !== Array) + { + var temp_vvvvvwv = externalsources_vvvvvwv; + var externalsources_vvvvvwv = []; + externalsources_vvvvvwv.push(temp_vvvvvwv); + } + else if (!isSet(externalsources_vvvvvwv)) + { + var externalsources_vvvvvwv = []; + } + var externalsources = externalsources_vvvvvwv.some(externalsources_vvvvvwv_SomeFunc); + + if (isSet(dropboxoptions_vvvvvwv) && dropboxoptions_vvvvvwv.constructor !== Array) + { + var temp_vvvvvwv = dropboxoptions_vvvvvwv; + var dropboxoptions_vvvvvwv = []; + dropboxoptions_vvvvvwv.push(temp_vvvvvwv); + } + else if (!isSet(dropboxoptions_vvvvvwv)) + { + var dropboxoptions_vvvvvwv = []; + } + var dropboxoptions = dropboxoptions_vvvvvwv.some(dropboxoptions_vvvvvwv_SomeFunc); + + + // set this function logic + if (permissiontype && externalsources && dropboxoptions) + { + jQuery('#jform_folder').closest('.control-group').show(); + } + else + { + jQuery('#jform_folder').closest('.control-group').hide(); + } +} + +// the vvvvvwv Some function +function permissiontype_vvvvvwv_SomeFunc(permissiontype_vvvvvwv) +{ + // set the function logic + if (permissiontype_vvvvvwv == 'full') + { + return true; + } + return false; +} + +// the vvvvvwv Some function +function externalsources_vvvvvwv_SomeFunc(externalsources_vvvvvwv) +{ + // set the function logic + if (externalsources_vvvvvwv == 1) + { + return true; + } + return false; +} + +// the vvvvvwv Some function +function dropboxoptions_vvvvvwv_SomeFunc(dropboxoptions_vvvvvwv) +{ + // set the function logic + if (dropboxoptions_vvvvvwv == 2) + { + return true; + } + return false; +} + +// the vvvvvww function +function vvvvvww(build_vvvvvww) +{ + if (isSet(build_vvvvvww) && build_vvvvvww.constructor !== Array) + { + var temp_vvvvvww = build_vvvvvww; + var build_vvvvvww = []; + build_vvvvvww.push(temp_vvvvvww); + } + else if (!isSet(build_vvvvvww)) + { + var build_vvvvvww = []; + } + var build = build_vvvvvww.some(build_vvvvvww_SomeFunc); + + + // set this function logic + if (build) + { + jQuery('.wiki_check_note').closest('.control-group').show(); + } + else + { + jQuery('.wiki_check_note').closest('.control-group').hide(); + } +} + +// the vvvvvww Some function +function build_vvvvvww_SomeFunc(build_vvvvvww) +{ + // set the function logic + if (build_vvvvvww != '') + { + return true; + } + return false; +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} + +jQuery(document).ready(function() +{ + var sharedurls = jQuery('#jform_sharedurl').val(); + if (sharedurls) { + getBuildTable(sharedurls,'jform_sharedurl'); + } + var folders = jQuery('#jform_folder').val(); + if (folders) { + getBuildTable(folders,'jform_folder'); + } + jQuery('.save-modal-data').text('Done'); +}); +function getBuildTable_server(string,idName){ + var getUrl = "index.php?option=com_sermondistributor&task=ajax.getBuildTable&format=json"; + if(token.length > 0 && string.length > 0 && idName.length > 0){ + var request = 'token='+token+'&idName='+idName+'&oject='+string; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getBuildTable(string,idName){ + getBuildTable_server(string,idName).done(function(result) { + if(result){ + buildTable(result,idName); + } else { + jQuery('#table_'+idName).remove(); + } + }) +} +function buildTable(result,idName){ + jQuery('#table_'+idName).remove(); + jQuery('#'+idName).closest('.control-group').append(result); +} diff --git a/admin/models/forms/external_source.xml b/admin/models/forms/external_source.xml new file mode 100644 index 00000000..99069063 --- /dev/null +++ b/admin/models/forms/external_source.xml @@ -0,0 +1,372 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index fa745aa6..f0f428d1 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_document.js @@ -23,289 +23,289 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvwevwd_required = false; -jform_vvvvvwfvwe_required = false; -jform_vvvvvwgvwf_required = false; -jform_vvvvvwhvwg_required = false; -jform_vvvvvwivwh_required = false; -jform_vvvvvwjvwi_required = false; +jform_vvvvvxavwe_required = false; +jform_vvvvvxbvwf_required = false; +jform_vvvvvxcvwg_required = false; +jform_vvvvvxdvwh_required = false; +jform_vvvvvxevwi_required = false; +jform_vvvvvxfvwj_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvvwe = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvvwe(location_vvvvvwe); + var location_vvvvvxa = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvvxa(location_vvvvvxa); - var location_vvvvvwf = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvvwf(location_vvvvvwf); + var location_vvvvvxb = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvvxb(location_vvvvvxb); - var type_vvvvvwg = jQuery("#jform_type").val(); - vvvvvwg(type_vvvvvwg); + var type_vvvvvxc = jQuery("#jform_type").val(); + vvvvvxc(type_vvvvvxc); - var type_vvvvvwh = jQuery("#jform_type").val(); - vvvvvwh(type_vvvvvwh); + var type_vvvvvxd = jQuery("#jform_type").val(); + vvvvvxd(type_vvvvvxd); - var type_vvvvvwi = jQuery("#jform_type").val(); - vvvvvwi(type_vvvvvwi); + var type_vvvvvxe = jQuery("#jform_type").val(); + vvvvvxe(type_vvvvvxe); - var target_vvvvvwj = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvvwj(target_vvvvvwj); + var target_vvvvvxf = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvvxf(target_vvvvvxf); }); -// the vvvvvwe function -function vvvvvwe(location_vvvvvwe) +// the vvvvvxa function +function vvvvvxa(location_vvvvvxa) { // set the function logic - if (location_vvvvvwe == 1) + if (location_vvvvvxa == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); - if (jform_vvvvvwevwd_required) + if (jform_vvvvvxavwe_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; + jform_vvvvvxavwe_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); - if (!jform_vvvvvwevwd_required) + if (!jform_vvvvvxavwe_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; + jform_vvvvvxavwe_required = true; } } } -// the vvvvvwf function -function vvvvvwf(location_vvvvvwf) +// the vvvvvxb function +function vvvvvxb(location_vvvvvxb) { // set the function logic - if (location_vvvvvwf == 2) + if (location_vvvvvxb == 2) { jQuery('#jform_site_view').closest('.control-group').show(); - if (jform_vvvvvwfvwe_required) + if (jform_vvvvvxbvwf_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; + jform_vvvvvxbvwf_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); - if (!jform_vvvvvwfvwe_required) + if (!jform_vvvvvxbvwf_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; + jform_vvvvvxbvwf_required = true; } } } -// the vvvvvwg function -function vvvvvwg(type_vvvvvwg) +// the vvvvvxc function +function vvvvvxc(type_vvvvvxc) { - if (isSet(type_vvvvvwg) && type_vvvvvwg.constructor !== Array) + if (isSet(type_vvvvvxc) && type_vvvvvxc.constructor !== Array) { - var temp_vvvvvwg = type_vvvvvwg; - var type_vvvvvwg = []; - type_vvvvvwg.push(temp_vvvvvwg); + var temp_vvvvvxc = type_vvvvvxc; + var type_vvvvvxc = []; + type_vvvvvxc.push(temp_vvvvvxc); } - else if (!isSet(type_vvvvvwg)) + else if (!isSet(type_vvvvvxc)) { - var type_vvvvvwg = []; + var type_vvvvvxc = []; } - var type = type_vvvvvwg.some(type_vvvvvwg_SomeFunc); + var type = type_vvvvvxc.some(type_vvvvvxc_SomeFunc); // set this function logic if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvvwgvwf_required) + if (jform_vvvvvxcvwg_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvvwgvwf_required = false; + jform_vvvvvxcvwg_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvvwgvwf_required) + if (!jform_vvvvvxcvwg_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvvwgvwf_required = true; + jform_vvvvvxcvwg_required = true; } } } -// the vvvvvwg Some function -function type_vvvvvwg_SomeFunc(type_vvvvvwg) +// the vvvvvxc Some function +function type_vvvvvxc_SomeFunc(type_vvvvvxc) { // set the function logic - if (type_vvvvvwg == 3) + if (type_vvvvvxc == 3) { return true; } return false; } -// the vvvvvwh function -function vvvvvwh(type_vvvvvwh) +// the vvvvvxd function +function vvvvvxd(type_vvvvvxd) { - if (isSet(type_vvvvvwh) && type_vvvvvwh.constructor !== Array) + if (isSet(type_vvvvvxd) && type_vvvvvxd.constructor !== Array) { - var temp_vvvvvwh = type_vvvvvwh; - var type_vvvvvwh = []; - type_vvvvvwh.push(temp_vvvvvwh); + var temp_vvvvvxd = type_vvvvvxd; + var type_vvvvvxd = []; + type_vvvvvxd.push(temp_vvvvvxd); } - else if (!isSet(type_vvvvvwh)) + else if (!isSet(type_vvvvvxd)) { - var type_vvvvvwh = []; + var type_vvvvvxd = []; } - var type = type_vvvvvwh.some(type_vvvvvwh_SomeFunc); + var type = type_vvvvvxd.some(type_vvvvvxd_SomeFunc); // set this function logic if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvvwhvwg_required) + if (jform_vvvvvxdvwh_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvvwhvwg_required = false; + jform_vvvvvxdvwh_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvvwhvwg_required) + if (!jform_vvvvvxdvwh_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvvwhvwg_required = true; + jform_vvvvvxdvwh_required = true; } } } -// the vvvvvwh Some function -function type_vvvvvwh_SomeFunc(type_vvvvvwh) +// the vvvvvxd Some function +function type_vvvvvxd_SomeFunc(type_vvvvvxd) { // set the function logic - if (type_vvvvvwh == 1) + if (type_vvvvvxd == 1) { return true; } return false; } -// the vvvvvwi function -function vvvvvwi(type_vvvvvwi) +// the vvvvvxe function +function vvvvvxe(type_vvvvvxe) { - if (isSet(type_vvvvvwi) && type_vvvvvwi.constructor !== Array) + if (isSet(type_vvvvvxe) && type_vvvvvxe.constructor !== Array) { - var temp_vvvvvwi = type_vvvvvwi; - var type_vvvvvwi = []; - type_vvvvvwi.push(temp_vvvvvwi); + var temp_vvvvvxe = type_vvvvvxe; + var type_vvvvvxe = []; + type_vvvvvxe.push(temp_vvvvvxe); } - else if (!isSet(type_vvvvvwi)) + else if (!isSet(type_vvvvvxe)) { - var type_vvvvvwi = []; + var type_vvvvvxe = []; } - var type = type_vvvvvwi.some(type_vvvvvwi_SomeFunc); + var type = type_vvvvvxe.some(type_vvvvvxe_SomeFunc); // set this function logic if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvvwivwh_required) + if (jform_vvvvvxevwi_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvvwivwh_required = false; + jform_vvvvvxevwi_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvvwivwh_required) + if (!jform_vvvvvxevwi_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvvwivwh_required = true; + jform_vvvvvxevwi_required = true; } } } -// the vvvvvwi Some function -function type_vvvvvwi_SomeFunc(type_vvvvvwi) +// the vvvvvxe Some function +function type_vvvvvxe_SomeFunc(type_vvvvvxe) { // set the function logic - if (type_vvvvvwi == 2) + if (type_vvvvvxe == 2) { return true; } return false; } -// the vvvvvwj function -function vvvvvwj(target_vvvvvwj) +// the vvvvvxf function +function vvvvvxf(target_vvvvvxf) { // set the function logic - if (target_vvvvvwj == 1) + if (target_vvvvvxf == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvvwjvwi_required) + if (jform_vvvvvxfvwj_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvvwjvwi_required = false; + jform_vvvvvxfvwj_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvvwjvwi_required) + if (!jform_vvvvvxfvwj_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvvwjvwi_required = true; + jform_vvvvvxfvwj_required = true; } } } diff --git a/admin/models/forms/local_listing.js b/admin/models/forms/local_listing.js new file mode 100644 index 00000000..c973ce70 --- /dev/null +++ b/admin/models/forms/local_listing.js @@ -0,0 +1,192 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage local_listing.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// Initial Script +jQuery(document).ready(function() +{ + var build_vvvvvwx = jQuery("#jform_build").val(); + vvvvvwx(build_vvvvvwx); + + var build_vvvvvwy = jQuery("#jform_build").val(); + vvvvvwy(build_vvvvvwy); + + var build_vvvvvwz = jQuery("#jform_build").val(); + vvvvvwz(build_vvvvvwz); +}); + +// the vvvvvwx function +function vvvvvwx(build_vvvvvwx) +{ + if (isSet(build_vvvvvwx) && build_vvvvvwx.constructor !== Array) + { + var temp_vvvvvwx = build_vvvvvwx; + var build_vvvvvwx = []; + build_vvvvvwx.push(temp_vvvvvwx); + } + else if (!isSet(build_vvvvvwx)) + { + var build_vvvvvwx = []; + } + var build = build_vvvvvwx.some(build_vvvvvwx_SomeFunc); + + + // set this function logic + if (build) + { + } + else + { + } +} + +// the vvvvvwx Some function +function build_vvvvvwx_SomeFunc(build_vvvvvwx) +{ + // set the function logic + if (build_vvvvvwx == 2) + { + return true; + } + return false; +} + +// the vvvvvwy function +function vvvvvwy(build_vvvvvwy) +{ + if (isSet(build_vvvvvwy) && build_vvvvvwy.constructor !== Array) + { + var temp_vvvvvwy = build_vvvvvwy; + var build_vvvvvwy = []; + build_vvvvvwy.push(temp_vvvvvwy); + } + else if (!isSet(build_vvvvvwy)) + { + var build_vvvvvwy = []; + } + var build = build_vvvvvwy.some(build_vvvvvwy_SomeFunc); + + + // set this function logic + if (build) + { + } + else + { + } +} + +// the vvvvvwy Some function +function build_vvvvvwy_SomeFunc(build_vvvvvwy) +{ + // set the function logic + if (build_vvvvvwy == 1) + { + return true; + } + return false; +} + +// the vvvvvwz function +function vvvvvwz(build_vvvvvwz) +{ + if (isSet(build_vvvvvwz) && build_vvvvvwz.constructor !== Array) + { + var temp_vvvvvwz = build_vvvvvwz; + var build_vvvvvwz = []; + build_vvvvvwz.push(temp_vvvvvwz); + } + else if (!isSet(build_vvvvvwz)) + { + var build_vvvvvwz = []; + } + var build = build_vvvvvwz.some(build_vvvvvwz_SomeFunc); + + + // set this function logic + if (build) + { + } + else + { + } +} + +// the vvvvvwz Some function +function build_vvvvvwz_SomeFunc(build_vvvvvwz) +{ + // set the function logic + if (build_vvvvvwz != '') + { + return true; + } + return false; +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} + +jQuery(document).ready(function() +{ + var sharedurls = jQuery('#jform_sharedurl').val(); + if (sharedurls) { + getBuildTable(sharedurls,'jform_sharedurl'); + } + var folders = jQuery('#jform_folder').val(); + if (folders) { + getBuildTable(folders,'jform_folder'); + } + jQuery('.save-modal-data').text('Done'); +}); +function getBuildTable_server(string,idName){ + var getUrl = "index.php?option=com_sermondistributor&task=ajax.getBuildTable&format=json"; + if(token.length > 0 && string.length > 0 && idName.length > 0){ + var request = 'token='+token+'&idName='+idName+'&oject='+string; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function getBuildTable(string,idName){ + getBuildTable_server(string,idName).done(function(result) { + if(result){ + buildTable(result,idName); + } else { + jQuery('#table_'+idName).remove(); + } + }) +} +function buildTable(result,idName){ + jQuery('#table_'+idName).remove(); + jQuery('#'+idName).closest('.control-group').append(result); +} diff --git a/admin/models/forms/local_listing.xml b/admin/models/forms/local_listing.xml new file mode 100644 index 00000000..ee2fd1a7 --- /dev/null +++ b/admin/models/forms/local_listing.xml @@ -0,0 +1,193 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/forms/preacher.js b/admin/models/forms/preacher.js index 52479ee1..ad4c715c 100644 --- a/admin/models/forms/preacher.js +++ b/admin/models/forms/preacher.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preacher.js diff --git a/admin/models/forms/series.js b/admin/models/forms/series.js index 7c81f8d9..1b734849 100644 --- a/admin/models/forms/series.js +++ b/admin/models/forms/series.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.js diff --git a/admin/models/forms/sermon.js b/admin/models/forms/sermon.js index f7c6666d..a22a73b8 100644 --- a/admin/models/forms/sermon.js +++ b/admin/models/forms/sermon.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.js @@ -36,14 +36,14 @@ jQuery(document).ready(function() vvvvvvv(source_vvvvvvv); var source_vvvvvvw = jQuery("#jform_source").val(); - var build_vvvvvvw = jQuery("#jform_build input[type='radio']:checked").val(); + var build_vvvvvvw = jQuery("#jform_build").val(); vvvvvvw(source_vvvvvvw,build_vvvvvvw); var source_vvvvvvy = jQuery("#jform_source").val(); - var build_vvvvvvy = jQuery("#jform_build input[type='radio']:checked").val(); + var build_vvvvvvy = jQuery("#jform_build").val(); vvvvvvy(source_vvvvvvy,build_vvvvvvy); - var build_vvvvvvz = jQuery("#jform_build input[type='radio']:checked").val(); + var build_vvvvvvz = jQuery("#jform_build").val(); var source_vvvvvvz = jQuery("#jform_source").val(); vvvvvvz(build_vvvvvvz,source_vvvvvvz); @@ -146,11 +146,11 @@ function vvvvvvw(source_vvvvvvw,build_vvvvvvw) // set this function logic if (source && build) { - jQuery('.note_auto_dropbox').closest('.control-group').show(); + jQuery('.note_auto_externalsource').closest('.control-group').show(); } else { - jQuery('.note_auto_dropbox').closest('.control-group').hide(); + jQuery('.note_auto_externalsource').closest('.control-group').hide(); } } @@ -217,7 +217,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy) jform_vvvvvvyvvx_required = false; } - jQuery('.note_manual_dropbox').closest('.control-group').show(); + jQuery('.note_manual_externalsource').closest('.control-group').show(); } else { @@ -230,7 +230,7 @@ function vvvvvvy(source_vvvvvvy,build_vvvvvvy) jQuery('#jform_manual_files').removeClass('required'); jform_vvvvvvyvvx_required = true; } - jQuery('.note_manual_dropbox').closest('.control-group').hide(); + jQuery('.note_manual_externalsource').closest('.control-group').hide(); } } @@ -297,7 +297,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz) jform_vvvvvvzvvy_required = false; } - jQuery('.note_manual_dropbox').closest('.control-group').show(); + jQuery('.note_manual_externalsource').closest('.control-group').show(); } else { @@ -310,7 +310,7 @@ function vvvvvvz(build_vvvvvvz,source_vvvvvvz) jQuery('#jform_manual_files').removeClass('required'); jform_vvvvvvzvvy_required = true; } - jQuery('.note_manual_dropbox').closest('.control-group').hide(); + jQuery('.note_manual_externalsource').closest('.control-group').hide(); } } diff --git a/admin/models/forms/sermon.xml b/admin/models/forms/sermon.xml index 63eb6d7e..f0a97983 100644 --- a/admin/models/forms/sermon.xml +++ b/admin/models/forms/sermon.xml @@ -201,7 +201,7 @@ + COM_SERMONDISTRIBUTOR_SERMON_EXTERNAL_SOURCE @@ -248,8 +248,8 @@ buttons="false" filter="safehtml" /> - - + + - - + + - + - + + + COM_SERMONDISTRIBUTOR_SERMON_MANUAL_LOCAL_SELECTION + COM_SERMONDISTRIBUTOR_SERMON_DYNAMIC_AUTOMATIC_BUILD loadForm('com_sermondistributor.help_document', 'help_document', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 09882a24..b315aba9 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_documents.php diff --git a/admin/models/import.php b/admin/models/import.php index bbb343c4..f00d7d00 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage import.php diff --git a/admin/models/local_listing.php b/admin/models/local_listing.php new file mode 100644 index 00000000..2487dbdd --- /dev/null +++ b/admin/models/local_listing.php @@ -0,0 +1,1011 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Sermondistributor Local_listing Model + */ +class SermondistributorModelLocal_listing extends JModelAdmin +{ + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_SERMONDISTRIBUTOR'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_sermondistributor.local_listing'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'local_listing', $prefix = 'SermondistributorTable', $config = array()) + { + return JTable::getInstance($type, $prefix, $config); + } + + /** + * Method to get id of item if found. + * + * @param array $value The value to search for. + * @param array $key The key to search in. + * + * @return int True on success. + */ + public function searchForId($value, $key = 'key') + { + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.id'); + + // From the sermondistributor_item table + $query->from($db->quoteName('#__sermondistributor_local_listing', 'a')); + + // where the key value is found + $query->where('a.'.$key.' = ' . $db->quote($value)); + + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadResult(); + } + return false; + } + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + // Get the basic encription. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object. + $basic = new FOFEncryptAes($basickey, 128); + + if (!empty($item->url) && $basickey && !is_numeric($item->url) && $item->url === base64_encode(base64_decode($item->url, true))) + { + // basic decript data url. + $item->url = rtrim($basic->decryptString($item->url), "\0"); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_sermondistributor.local_listing'); + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_sermondistributor.local_listing', 'local_listing', array('control' => 'jform', 'load_data' => $loadData)); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.state', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.state', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.created_by', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.created_by', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.created', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.created', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Modify the form based on Edit Name access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.name', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.name', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('name', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('name', 'readonly', 'true'); + if (!$form->getValue('name')) + { + // Disable fields while saving. + $form->setFieldAttribute('name', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('name', 'required', 'false'); + } + } + // Modify the form based on Edit Build access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.build', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.build', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('build', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('build', 'readonly', 'true'); + if (!$form->getValue('build')) + { + // Disable fields while saving. + $form->setFieldAttribute('build', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('build', 'required', 'false'); + } + } + // Modify the form based on Edit Size access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.size', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.size', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('size', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('size', 'readonly', 'true'); + if (!$form->getValue('size')) + { + // Disable fields while saving. + $form->setFieldAttribute('size', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('size', 'required', 'false'); + } + } + // Modify the form based on Edit External Source access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.external_source', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.external_source', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('external_source', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('external_source', 'readonly', 'true'); + if (!$form->getValue('external_source')) + { + // Disable fields while saving. + $form->setFieldAttribute('external_source', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('external_source', 'required', 'false'); + } + } + // Modify the form based on Edit Key access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.key', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.key', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('key', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('key', 'readonly', 'true'); + if (!$form->getValue('key')) + { + // Disable fields while saving. + $form->setFieldAttribute('key', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('key', 'required', 'false'); + } + } + // Modify the form based on Edit Url access controls. + if ($id != 0 && (!$user->authorise('local_listing.edit.url', 'com_sermondistributor.local_listing.' . (int) $id)) + || ($id == 0 && !$user->authorise('local_listing.edit.url', 'com_sermondistributor'))) + { + // Disable fields for display. + $form->setFieldAttribute('url', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('url', 'readonly', 'true'); + if (!$form->getValue('url')) + { + // Disable fields while saving. + $form->setFieldAttribute('url', 'filter', 'unset'); + // Disable fields while saving. + $form->setFieldAttribute('url', 'required', 'false'); + } + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'administrator/components/com_sermondistributor/models/forms/local_listing.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('local_listing.delete', 'com_sermondistributor.local_listing.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('local_listing.edit.state', 'com_sermondistributor.local_listing.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('local_listing.edit.state', 'com_sermondistributor'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('local_listing.edit', 'com_sermondistributor.local_listing.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('local_listing.edit', 'com_sermondistributor'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__sermondistributor_local_listing')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_sermondistributor.edit.local_listing.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqeFields() + { + return false; + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + 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. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + JArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('local_listing'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('local_listing'); + } + + if (!$this->canDo->get('local_listing.create') && !$this->canDo->get('local_listing.batch')) + { + return false; + } + + // get list of uniqe fields + $uniqeFields = $this->getUniqeFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('local_listing.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + + if (!$this->user->authorise('local_listing.edit', $contexts[$pk])) + + { + + // Not fatal error + + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + + continue; + + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $this->table->name = $this->generateUniqe('name',$this->table->name); + + // insert all set values + if (SermondistributorHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all uniqe fields + if (SermondistributorHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = SermondistributorHelper::getActions('local_listing'); + } + + if (!$this->canDo->get('local_listing.edit') && !$this->canDo->get('local_listing.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('local_listing.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('local_listing.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (SermondistributorHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' == $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // Get the basic encription key. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object + $basic = new FOFEncryptAes($basickey, 128); + + // Encript data url. + if (isset($data['url']) && $basickey) + { + $data['url'] = $basic->encryptString($data['url']); + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the uniqe field for save as copy + if ($input->get('task') == 'save2copy') + { + // Automatic handling of other uniqe fields + $uniqeFields = $this->getUniqeFields(); + if (SermondistributorHelper::checkArray($uniqeFields)) + { + foreach ($uniqeFields as $uniqeField) + { + $data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUniqe($field,$value) + { + + // set field value uniqe + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = JString::increment($value); + } + + return $value; + } + + /** + * Method to change the title & alias. + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = JString::increment($title); + } + + return $title; + } +} diff --git a/admin/models/local_listings.php b/admin/models/local_listings.php new file mode 100644 index 00000000..0d499c67 --- /dev/null +++ b/admin/models/local_listings.php @@ -0,0 +1,428 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Local_listings Model + */ +class SermondistributorModelLocal_listings extends JModelList +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by', + 'a.name','name', + 'a.build','build', + 'a.size','size', + 'a.external_source','external_source', + 'a.key','key' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); + $this->setState('filter.name', $name); + + $build = $this->getUserStateFromRequest($this->context . '.filter.build', 'filter_build'); + $this->setState('filter.build', $build); + + $size = $this->getUserStateFromRequest($this->context . '.filter.size', 'filter_size'); + $this->setState('filter.size', $size); + + $external_source = $this->getUserStateFromRequest($this->context . '.filter.external_source', 'filter_external_source'); + $this->setState('filter.external_source', $external_source); + + $key = $this->getUserStateFromRequest($this->context . '.filter.key', 'filter_key'); + $this->setState('filter.key', $key); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + $this->setState('filter.access', $access); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // set values to display correctly. + if (SermondistributorHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && $user->authorise('local_listing.access', 'com_sermondistributor')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // set selection value to a translatable value + if (SermondistributorHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert build + $item->build = $this->selectionTranslation($item->build, 'build'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of build language strings + if ($name == 'build') + { + $buildArray = array( + 0 => 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SELECT_AN_OPTION', + 1 => 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_MANUAL_LOCAL_SELECTION', + 2 => 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_DYNAMIC_AUTOMATIC_BUILD' + ); + // Now check if value is found in this array + if (isset($buildArray[$value]) && SermondistributorHelper::checkString($buildArray[$value])) + { + return $buildArray[$value]; + } + } + return $value; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the sermondistributor_item table + $query->from($db->quoteName('#__sermondistributor_local_listing', 'a')); + + // From the sermondistributor_external_source table. + $query->select($db->quoteName('g.description','external_source_description')); + $query->join('LEFT', $db->quoteName('#__sermondistributor_external_source', 'g') . ' ON (' . $db->quoteName('a.external_source') . ' = ' . $db->quoteName('g.id') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.name LIKE '.$search.' OR a.build LIKE '.$search.' OR a.key LIKE '.$search.')'); + } + } + + // Filter by Build. + if ($build = $this->getState('filter.build')) + { + $query->where('a.build = ' . $db->quote($db->escape($build))); + } + // Filter by external_source. + if ($external_source = $this->getState('filter.external_source')) + { + $query->where('a.external_source = ' . $db->quote($db->escape($external_source))); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'asc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks) + { + // setup the query + if (SermondistributorHelper::checkArray($pks)) + { + // Set a value to know this is exporting method. + $_export = true; + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the sermondistributor_local_listing table + $query->from($db->quoteName('#__sermondistributor_local_listing', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // Get the basic encription key. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object. + $basic = new FOFEncryptAes($basickey, 128); + + // set values to display correctly. + if (SermondistributorHelper::checkArray($items)) + { + // get user object. + $user = JFactory::getUser(); + foreach ($items as $nr => &$item) + { + $access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $item->id) && $user->authorise('local_listing.access', 'com_sermondistributor')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + if ($basickey && !is_numeric($item->url) && $item->url === base64_encode(base64_decode($item->url, true))) + { + // decrypt url + $item->url = $basic->decryptString($item->url); + } + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (SermondistributorHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__sermondistributor_local_listing"); + if (SermondistributorHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.build'); + $id .= ':' . $this->getState('filter.size'); + $id .= ':' . $this->getState('filter.external_source'); + $id .= ':' . $this->getState('filter.key'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_sermondistributor')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // reset query + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__sermondistributor_local_listing')); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Get Yesterdays date + $date = JFactory::getDate()->modify($time)->toSql(); + // reset query + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table + $query->update($db->quoteName('#__sermondistributor_local_listing'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/manual_updater.php b/admin/models/manual_updater.php new file mode 100644 index 00000000..262dd0f2 --- /dev/null +++ b/admin/models/manual_updater.php @@ -0,0 +1,153 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Sermondistributor Model for Manual_updater + */ +class SermondistributorModelManual_updater extends JModelList +{ + /** + * Model user data. + * + * @var strings + */ + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; + protected $app; + protected $input; + protected $uikitComp; + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the current user for authorisation checks + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + $this->initSet = true; + // Make sure all records load, since no pagination allowed. + $this->setState('list.limit', 0); + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Get from #__sermondistributor_external_source as a + $query->select($db->quoteName( + array('a.id','a.description','a.externalsources','a.build','a.update_method','a.update_timer','a.filetypes','a.oauthtoken','a.permissiontype','a.dropboxoptions','a.sharedurl','a.folder'), + array('id','description','externalsources','build','update_method','update_timer','filetypes','oauthtoken','permissiontype','dropboxoptions','sharedurl','folder'))); + $query->from($db->quoteName('#__sermondistributor_external_source', 'a')); + $query->where('a.update_method = 1'); + $query->where('a.published = 1'); + $query->order('a.description ASC'); + + // return the query object + return $query; + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + $user = JFactory::getUser(); + // check if this user has permission to access items + if (!$user->authorise('manual_updater.access', 'com_sermondistributor')) + { + $app = JFactory::getApplication(); + $app->enqueueMessage(JText::_('Not authorised!'), 'error'); + // redirect away if not a correct (TODO for now we go to default view) + $app->redirect('index.php?option=com_sermondistributor'); + return false; + } + // load parent items + $items = parent::getItems(); + + // Get the global params + $globalParams = JComponentHelper::getParams('com_sermondistributor', true); + + // Get the basic encription. + $basickey = SermondistributorHelper::getCryptKey('basic'); + // Get the encription object. + $basic = new FOFEncryptAes($basickey, 128); + + // Convert the parameter fields into objects. + foreach ($items as $nr => &$item) + { + // Always create a slug for sef URL's + $item->slug = (isset($item->alias)) ? $item->id.':'.$item->alias : $item->id; + if (SermondistributorHelper::checkString($item->filetypes)) + { + // Decode filetypes + $item->filetypes = json_decode($item->filetypes, true); + } + if (!empty($item->oauthtoken) && $basickey && !is_numeric($item->oauthtoken) && $item->oauthtoken === base64_encode(base64_decode($item->oauthtoken, true))) + { + // Decode oauthtoken + $item->oauthtoken = rtrim($basic->decryptString($item->oauthtoken), "\0"); + } + } + + // return items + return $items; + } + + + /** + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ + public function getUikitComp() + { + if (isset($this->uikitComp) && SermondistributorHelper::checkArray($this->uikitComp)) + { + return $this->uikitComp; + } + return false; + } +} diff --git a/admin/models/preacher.php b/admin/models/preacher.php index eb790fe2..b677cc84 100644 --- a/admin/models/preacher.php +++ b/admin/models/preacher.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preacher.php @@ -236,7 +236,7 @@ public function selectionTranslationVvvsermons($value,$name) $sourceArray = array( 0 => 'COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FOLDER', - 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', + 2 => 'COM_SERMONDISTRIBUTOR_SERMON_EXTERNAL_SOURCE', 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' ); // Now check if value is found in this array @@ -259,7 +259,8 @@ public function selectionTranslationVvvsermons($value,$name) * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_sermondistributor.preacher', 'preacher', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) diff --git a/admin/models/preachers.php b/admin/models/preachers.php index 673961c7..e87f4a90 100644 --- a/admin/models/preachers.php +++ b/admin/models/preachers.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preachers.php diff --git a/admin/models/series.php b/admin/models/series.php index 5d9ec4f9..26442d01 100644 --- a/admin/models/series.php +++ b/admin/models/series.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.php @@ -236,7 +236,7 @@ public function selectionTranslationVwcsermons($value,$name) $sourceArray = array( 0 => 'COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FOLDER', - 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', + 2 => 'COM_SERMONDISTRIBUTOR_SERMON_EXTERNAL_SOURCE', 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' ); // Now check if value is found in this array @@ -259,7 +259,8 @@ public function selectionTranslationVwcsermons($value,$name) * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_sermondistributor.series', 'series', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) diff --git a/admin/models/series_list.php b/admin/models/series_list.php index cc81675e..1e6cd915 100644 --- a/admin/models/series_list.php +++ b/admin/models/series_list.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series_list.php diff --git a/admin/models/sermon.php b/admin/models/sermon.php index cdd37857..07ba98f0 100644 --- a/admin/models/sermon.php +++ b/admin/models/sermon.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.php @@ -222,7 +222,8 @@ public function getVwbstastics() * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_sermondistributor.sermon', 'sermon', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) diff --git a/admin/models/sermondistributor.php b/admin/models/sermondistributor.php index 8e8bb9a0..e1cf39a9 100644 --- a/admin/models/sermondistributor.php +++ b/admin/models/sermondistributor.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermondistributor.php @@ -43,10 +43,13 @@ public function getIcons() $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.help_documents') + 'main' => array('png.preacher.add', 'png.preachers', 'png.sermon.add', 'png.sermons', 'png.sermons.catid', 'png.series.add', 'png.series_list', 'png.statistics', 'png.external_source.add', 'png.external_sources', 'png.manual_updater', 'png.local_listings', 'png.help_documents') ); // view access array $viewAccess = array( + 'manual_updater.access' => 'manual_updater.access', + 'manual_updater.submenu' => 'manual_updater.submenu', + 'manual_updater.dashboard_list' => 'manual_updater.dashboard_list', 'preacher.create' => 'preacher.create', 'preachers.access' => 'preacher.access', 'preacher.access' => 'preacher.access', @@ -70,6 +73,17 @@ public function getIcons() 'statistic.access' => 'statistic.access', 'statistics.submenu' => 'statistic.submenu', 'statistics.dashboard_list' => 'statistic.dashboard_list', + 'external_source.create' => 'external_source.create', + 'external_sources.access' => 'external_source.access', + 'external_source.access' => 'external_source.access', + 'external_sources.submenu' => 'external_source.submenu', + 'external_sources.dashboard_list' => 'external_source.dashboard_list', + 'external_source.dashboard_add' => 'external_source.dashboard_add', + 'local_listing.create' => 'local_listing.create', + 'local_listings.access' => 'local_listing.access', + 'local_listing.access' => 'local_listing.access', + 'local_listings.submenu' => 'local_listing.submenu', + 'local_listings.dashboard_list' => 'local_listing.dashboard_list', 'help_document.create' => 'help_document.create', 'help_documents.access' => 'help_document.access', 'help_document.access' => 'help_document.access', diff --git a/admin/models/sermons.php b/admin/models/sermons.php index a1a55c84..682f3e65 100644 --- a/admin/models/sermons.php +++ b/admin/models/sermons.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermons.php @@ -195,7 +195,7 @@ public function selectionTranslation($value,$name) $sourceArray = array( 0 => 'COM_SERMONDISTRIBUTOR_SERMON_SELECT_SOURCE', 1 => 'COM_SERMONDISTRIBUTOR_SERMON_LOCAL_FOLDER', - 2 => 'COM_SERMONDISTRIBUTOR_SERMON_DROPBOX', + 2 => 'COM_SERMONDISTRIBUTOR_SERMON_EXTERNAL_SOURCE', 3 => 'COM_SERMONDISTRIBUTOR_SERMON_URL' ); // Now check if value is found in this array diff --git a/admin/models/statistic.php b/admin/models/statistic.php index 89392527..1d1d2c96 100644 --- a/admin/models/statistic.php +++ b/admin/models/statistic.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistic.php @@ -116,7 +116,8 @@ public function getItem($pk = null) * @since 1.6 */ public function getForm($data = array(), $loadData = true) - { // Get the form. + { + // Get the form. $form = $this->loadForm('com_sermondistributor.statistic', 'statistic', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) diff --git a/admin/models/statistics.php b/admin/models/statistics.php index 02bdd837..0726695d 100644 --- a/admin/models/statistics.php +++ b/admin/models/statistics.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistics.php diff --git a/admin/sermondistributor.php b/admin/sermondistributor.php index 9e86078e..21760869 100644 --- a/admin/sermondistributor.php +++ b/admin/sermondistributor.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermondistributor.php diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index ba13f5fa..b15885f9 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_sermon` ( `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', `alias` CHAR(64) NOT NULL DEFAULT '', `auto_sermons` TEXT NOT NULL, - `build` TINYINT(1) NOT NULL DEFAULT '1', + `build` TINYINT(1) NOT NULL DEFAULT '0', `catid` INT(11) NOT NULL DEFAULT '0', `description` TEXT NOT NULL, `icon` CHAR(64) NOT NULL DEFAULT '', @@ -150,6 +150,75 @@ CREATE TABLE IF NOT EXISTS `#__sermondistributor_statistic` ( KEY `idx_series` (`series`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `build` TINYINT(1) NOT NULL DEFAULT '0', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `dropboxoptions` TINYINT(1) NOT NULL DEFAULT '1', + `externalsources` INT(11) NOT NULL DEFAULT '0', + `filetypes` TEXT NOT NULL, + `folder` TEXT NOT NULL, + `not_required` INT(1) NOT NULL DEFAULT '0', + `oauthtoken` TEXT NOT NULL, + `permissiontype` VARCHAR(64) NOT NULL DEFAULT '', + `sharedurl` TEXT NOT NULL, + `update_method` TINYINT NOT NULL DEFAULT '0', + `update_timer` INT(1) NOT NULL DEFAULT '0', + `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', + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) NOT NULL, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` int(11) NOT NULL DEFAULT '1', + `hits` int(11) NOT NULL DEFAULT '0', + `ordering` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_description` (`description`), + KEY `idx_externalsources` (`externalsources`), + KEY `idx_update_method` (`update_method`), + KEY `idx_build` (`build`), + KEY `idx_permissiontype` (`permissiontype`), + KEY `idx_dropboxoptions` (`dropboxoptions`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `build` TINYINT(1) NOT NULL DEFAULT '0', + `external_source` INT(11) NOT NULL DEFAULT '0', + `key` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `size` INT(50) NOT NULL DEFAULT '0', + `url` TEXT NOT NULL, + `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', + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) NOT NULL, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` int(11) NOT NULL DEFAULT '1', + `hits` int(11) NOT NULL DEFAULT '0', + `ordering` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_name` (`name`), + KEY `idx_build` (`build`), + KEY `idx_key` (`key`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `#__sermondistributor_help_document` ( `id` int(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index 3be116c3..80615850 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -2,4 +2,6 @@ DROP TABLE IF EXISTS `#__sermondistributor_preacher`; DROP TABLE IF EXISTS `#__sermondistributor_sermon`; DROP TABLE IF EXISTS `#__sermondistributor_series`; DROP TABLE IF EXISTS `#__sermondistributor_statistic`; +DROP TABLE IF EXISTS `#__sermondistributor_external_source`; +DROP TABLE IF EXISTS `#__sermondistributor_local_listing`; DROP TABLE IF EXISTS `#__sermondistributor_help_document`; diff --git a/admin/sql/updates/mysql/1.3.8.sql b/admin/sql/updates/mysql/1.3.8.sql new file mode 100644 index 00000000..12931b31 --- /dev/null +++ b/admin/sql/updates/mysql/1.3.8.sql @@ -0,0 +1,68 @@ +CREATE TABLE IF NOT EXISTS `#__sermondistributor_external_source` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `build` TINYINT(1) NOT NULL DEFAULT '0', + `description` VARCHAR(255) NOT NULL DEFAULT '', + `dropboxoptions` TINYINT(1) NOT NULL DEFAULT '1', + `externalsources` INT(11) NOT NULL DEFAULT '0', + `filetypes` TEXT NOT NULL, + `folder` TEXT NOT NULL, + `not_required` INT(1) NOT NULL DEFAULT '0', + `oauthtoken` TEXT NOT NULL, + `permissiontype` VARCHAR(64) NOT NULL DEFAULT '', + `sharedurl` TEXT NOT NULL, + `update_method` TINYINT NOT NULL DEFAULT '0', + `update_timer` INT(1) NOT NULL DEFAULT '0', + `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', + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) NOT NULL, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` int(11) NOT NULL DEFAULT '1', + `hits` int(11) NOT NULL DEFAULT '0', + `ordering` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_description` (`description`), + KEY `idx_externalsources` (`externalsources`), + KEY `idx_update_method` (`update_method`), + KEY `idx_build` (`build`), + KEY `idx_dropboxoptions` (`dropboxoptions`), + KEY `idx_permissiontype` (`permissiontype`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__sermondistributor_local_listing` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0', + `build` TINYINT(1) NOT NULL DEFAULT '0', + `external_source` int(11) NOT NULL DEFAULT '0', + `key` VARCHAR(255) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `size` INT(50) NOT NULL DEFAULT '0', + `url` TEXT NOT NULL, + `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', + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) NOT NULL, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` int(11) NOT NULL DEFAULT '1', + `hits` int(11) NOT NULL DEFAULT '0', + `ordering` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`), + KEY `idx_name` (`name`), + KEY `idx_build` (`build`), + KEY `idx_key` (`key`) +) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; diff --git a/admin/tables/external_source.php b/admin/tables/external_source.php new file mode 100644 index 00000000..2ce9c424 --- /dev/null +++ b/admin/tables/external_source.php @@ -0,0 +1,351 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla table library +jimport('joomla.database.table'); + +/** + * External_sources Table class + */ +class SermondistributorTableExternal_source extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__sermondistributor_external_source', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.external_source')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the External_source table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New external_source. A external_source created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('external_source', 'SermondistributorTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('external_source', 'sermondistributorTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_sermondistributor.external_source.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_sermondistributor.external_source.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_sermondistributor'); + + return $asset->id; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); + } + + return $this->alias; + } + +} diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index f1e78c74..4b1ad1d8 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage help_document.php diff --git a/admin/tables/local_listing.php b/admin/tables/local_listing.php new file mode 100644 index 00000000..ddb504b4 --- /dev/null +++ b/admin/tables/local_listing.php @@ -0,0 +1,351 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla table library +jimport('joomla.database.table'); + +/** + * Local_listings Table class + */ +class SermondistributorTableLocal_listing extends JTable +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__sermondistributor_local_listing', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_sermondistributor.local_listing')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Local_listing table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New local_listing. A local_listing created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('local_listing', 'SermondistributorTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('local_listing', 'sermondistributorTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = JString::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_sermondistributor.local_listing.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_sermondistributor.local_listing.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_sermondistributor'); + + return $asset->id; + } + + /** + * Generate a valid alias from title / date. + * Remains public to be able to check for duplicated alias before saving + * + * @return string + */ + public function generateAlias() + { + if (empty($this->alias)) + { + $this->alias = $this->name; + } + + $this->alias = JApplication::stringURLSafe($this->alias); + + if (trim(str_replace('-', '', $this->alias)) == '') + { + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); + } + + return $this->alias; + } + +} diff --git a/admin/tables/preacher.php b/admin/tables/preacher.php index 241f26b7..b41f10da 100644 --- a/admin/tables/preacher.php +++ b/admin/tables/preacher.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage preacher.php diff --git a/admin/tables/series.php b/admin/tables/series.php index c9552316..5f3db2fa 100644 --- a/admin/tables/series.php +++ b/admin/tables/series.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage series.php diff --git a/admin/tables/sermon.php b/admin/tables/sermon.php index 676eba1c..733350a8 100644 --- a/admin/tables/sermon.php +++ b/admin/tables/sermon.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage sermon.php diff --git a/admin/tables/statistic.php b/admin/tables/statistic.php index 2fc3fee6..10c9f233 100644 --- a/admin/tables/statistic.php +++ b/admin/tables/statistic.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage statistic.php diff --git a/admin/views/external_source/submitbutton.js b/admin/views/external_source/submitbutton.js new file mode 100644 index 00000000..c27f2ee7 --- /dev/null +++ b/admin/views/external_source/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 1.4.0 + @build 27th November, 2016 + @created 22nd October, 2015 + @package Sermon Distributor + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var isValid=true; + var action = task.split('.'); + if (action[1] != 'cancel' && action[1] != 'close'){ + var forms = $$('form.form-validate'); + for (var i=0;i + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +$componentParams = JComponentHelper::getParams('com_sermondistributor'); +?> + + + + diff --git a/admin/views/external_source/tmpl/index.html b/admin/views/external_source/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/external_source/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/external_source/view.html.php b/admin/views/external_source/view.html.php new file mode 100644 index 00000000..891fab37 --- /dev/null +++ b/admin/views/external_source/view.html.php @@ -0,0 +1,206 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * External_source View class + */ +class SermondistributorViewExternal_source extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode('
', $errors)); + return false; + } + + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = SermondistributorHelper::getActions('external_source',$this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; + if ($this->refid) + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } + + // Set the toolbar + $this->addToolBar(); + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW' : 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('external_source.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('external_source.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('external_source.edit')) + { + // We can save the record. + JToolBarHelper::save('external_source.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('external_source.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('external_source.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('external_source.create')) + { + JToolBarHelper::apply('external_source.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('external_source.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('external_source.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('external_source.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('external_source.edit')) + { + // We can save the new record + JToolBarHelper::apply('external_source.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('external_source.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('external_source.create')) + { + JToolBarHelper::custom('external_source.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('external_source.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('external_source.edit') && $canVersion) + { + JToolbarHelper::versions('com_sermondistributor.external_source', $this->item->id); + } + if ($this->canDo->get('external_source.create')) + { + JToolBarHelper::custom('external_source.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('external_source.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('external_source'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return SermondistributorHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + $document = JFactory::getDocument(); + $document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW' : 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/external_source.css"); + // Add Ajax Token + $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_sermondistributor/views/external_source/submitbutton.js"); + // add JavaScripts + $document->addScript( JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit.min.js' ); + // add the style sheets + $document->addStyleSheet( JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit.gradient.min.css' ); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/external_sources/index.html b/admin/views/external_sources/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/external_sources/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default.php b/admin/views/external_sources/tmpl/default.php new file mode 100644 index 00000000..714825f7 --- /dev/null +++ b/admin/views/external_sources/tmpl/default.php @@ -0,0 +1,99 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// load tooltip behavior +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', 'select'); + +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_sermondistributor&task=external_sources.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'external_sourceList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_batch_body.php b/admin/views/external_sources/tmpl/default_batch_body.php new file mode 100644 index 00000000..3473b5ee --- /dev/null +++ b/admin/views/external_sources/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_batch_footer.php b/admin/views/external_sources/tmpl/default_batch_footer.php new file mode 100644 index 00000000..72bdbc73 --- /dev/null +++ b/admin/views/external_sources/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_body.php b/admin/views/external_sources/tmpl/default_body.php new file mode 100644 index 00000000..19a741f0 --- /dev/null +++ b/admin/views/external_sources/tmpl/default_body.php @@ -0,0 +1,129 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_sermondistributor&view=external_sources&task=external_source.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = SermondistributorHelper::getActions('external_source',$item,'external_sources'); + ?> + + + get('external_source.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('external_source.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('external_source.edit')): ?> +
+ escape($item->description); ?> + checked_out): ?> + name, $item->checked_out_time, 'external_sources.', $canCheckin); ?> + +
+ +
escape($item->description); ?>
+ + + + externalsources); ?> + + + get('external_source.edit')): ?> +
+ update_method); ?> + checked_out): ?> + name, $item->checked_out_time, 'external_sources.', $canCheckin); ?> + +
+ +
update_method); ?>
+ + + + filetypes); ?> + + + build); ?> + + + get('external_source.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'external_sources.', true, 'cb'); ?> + + published, $i, 'external_sources.', false, 'cb'); ?> + + + published, $i, 'external_sources.', true, 'cb'); ?> + + + published, $i, 'external_sources.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_foot.php b/admin/views/external_sources/tmpl/default_foot.php new file mode 100644 index 00000000..209c8c55 --- /dev/null +++ b/admin/views/external_sources/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_head.php b/admin/views/external_sources/tmpl/default_head.php new file mode 100644 index 00000000..8b2065b4 --- /dev/null +++ b/admin/views/external_sources/tmpl/default_head.php @@ -0,0 +1,73 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + +
', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/external_sources/tmpl/default_toolbar.php b/admin/views/external_sources/tmpl/default_toolbar.php new file mode 100644 index 00000000..117708aa --- /dev/null +++ b/admin/views/external_sources/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/admin/views/external_sources/tmpl/index.html b/admin/views/external_sources/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/external_sources/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/external_sources/view.html.php b/admin/views/external_sources/view.html.php new file mode 100644 index 00000000..2910e86d --- /dev/null +++ b/admin/views/external_sources/view.html.php @@ -0,0 +1,427 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Sermondistributor View class for the External_sources + */ +class SermondistributorViewExternal_sources extends JViewLegacy +{ + /** + * External_sources view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + SermondistributorHelper::addSubmenu('external_sources'); + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode('
', $errors)); + return false; + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = SermondistributorHelper::getActions('external_source'); + $this->canEdit = $this->canDo->get('external_source.edit'); + $this->canState = $this->canDo->get('external_source.edit.state'); + $this->canCreate = $this->canDo->get('external_source.create'); + $this->canDelete = $this->canDo->get('external_source.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES'), 'puzzle'); + JHtmlSidebar::setAction('index.php?option=com_sermondistributor&view=external_sources'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('external_source.add'); + } + + // Only load if there are items + if (SermondistributorHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('external_source.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('external_sources.publish'); + JToolBarHelper::unpublishList('external_sources.unpublish'); + JToolBarHelper::archiveList('external_sources.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('external_sources.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'external_sources.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('external_sources.trash'); + } + + if ($this->canDo->get('core.export') && $this->canDo->get('external_source.export')) + { + JToolBarHelper::custom('external_sources.exportData', 'download', '', 'COM_SERMONDISTRIBUTOR_EXPORT_DATA', true); + } + } + + if ($this->canDo->get('core.import') && $this->canDo->get('external_source.import')) + { + JToolBarHelper::custom('external_sources.importData', 'upload', '', 'COM_SERMONDISTRIBUTOR_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('external_sources'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_sermondistributor'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Set Externalsources Selection + $this->externalsourcesOptions = $this->getTheExternalsourcesSelections(); + if ($this->externalsourcesOptions) + { + // Externalsources Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL').' -', + 'filter_externalsources', + JHtml::_('select.options', $this->externalsourcesOptions, 'value', 'text', $this->state->get('filter.externalsources')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Externalsources Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL').' -', + 'batch[externalsources]', + JHtml::_('select.options', $this->externalsourcesOptions, 'value', 'text') + ); + } + } + + // Set Update Method Selection + $this->update_methodOptions = $this->getTheUpdate_methodSelections(); + if ($this->update_methodOptions) + { + // Update Method Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL').' -', + 'filter_update_method', + JHtml::_('select.options', $this->update_methodOptions, 'value', 'text', $this->state->get('filter.update_method')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Update Method Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL').' -', + 'batch[update_method]', + JHtml::_('select.options', $this->update_methodOptions, 'value', 'text') + ); + } + } + + // Set Build Selection + $this->buildOptions = $this->getTheBuildSelections(); + if ($this->buildOptions) + { + // Build Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL').' -', + 'filter_build', + JHtml::_('select.options', $this->buildOptions, 'value', 'text', $this->state->get('filter.build')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Build Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL').' -', + 'batch[build]', + JHtml::_('select.options', $this->buildOptions, 'value', 'text') + ); + } + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $document = JFactory::getDocument(); + $document->setTitle(JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/external_sources.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return SermondistributorHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.description' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_DESCRIPTION_LABEL'), + 'a.externalsources' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EXTERNALSOURCES_LABEL'), + 'a.update_method' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_METHOD_LABEL'), + 'a.build' => JText::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheExternalsourcesSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('externalsources')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('externalsources') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $filter = array(); + foreach ($results as $externalsources) + { + // Translate the externalsources selection + $text = $model->selectionTranslation($externalsources,'externalsources'); + // Now add the externalsources and its text to the options array + $filter[] = JHtml::_('select.option', $externalsources, JText::_($text)); + } + return $filter; + } + return false; + } + + protected function getTheUpdate_methodSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('update_method')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('update_method') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $filter = array(); + foreach ($results as $update_method) + { + // Translate the update_method selection + $text = $model->selectionTranslation($update_method,'update_method'); + // Now add the update_method and its text to the options array + $filter[] = JHtml::_('select.option', $update_method, JText::_($text)); + } + return $filter; + } + return false; + } + + protected function getTheBuildSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('build')); + $query->from($db->quoteName('#__sermondistributor_external_source')); + $query->order($db->quoteName('build') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $filter = array(); + foreach ($results as $build) + { + // Translate the build selection + $text = $model->selectionTranslation($build,'build'); + // Now add the build and its text to the options array + $filter[] = JHtml::_('select.option', $build, JText::_($text)); + } + return $filter; + } + return false; + } +} diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js index 276212d2..77f458f1 100644 --- a/admin/views/help_document/submitbutton.js +++ b/admin/views/help_document/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage submitbutton.js diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 2e072ebf..2940995c 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage edit.php @@ -125,93 +125,93 @@ + + + diff --git a/admin/views/local_listing/tmpl/index.html b/admin/views/local_listing/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/local_listing/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/local_listing/view.html.php b/admin/views/local_listing/view.html.php new file mode 100644 index 00000000..489f2543 --- /dev/null +++ b/admin/views/local_listing/view.html.php @@ -0,0 +1,206 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Local_listing View class + */ +class SermondistributorViewLocal_listing extends JViewLegacy +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode('
', $errors)); + return false; + } + + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = SermondistributorHelper::getActions('local_listing',$this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $this->referral = ''; + if ($this->refid) + { + // return to the item that refered to this item + $this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that refered to this item + $this->referral = '&ref='.(string)$this->ref; + } + + // Set the toolbar + $this->addToolBar(); + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NEW' : 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if ($this->refid || $this->ref) + { + if ($this->canDo->get('local_listing.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('local_listing.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('local_listing.edit')) + { + // We can save the record. + JToolBarHelper::save('local_listing.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('local_listing.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('local_listing.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('local_listing.create')) + { + JToolBarHelper::apply('local_listing.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('local_listing.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('local_listing.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('local_listing.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('local_listing.edit')) + { + // We can save the new record + JToolBarHelper::apply('local_listing.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('local_listing.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('local_listing.create')) + { + JToolBarHelper::custom('local_listing.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('local_listing.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('local_listing.edit') && $canVersion) + { + JToolbarHelper::versions('com_sermondistributor.local_listing', $this->item->id); + } + if ($this->canDo->get('local_listing.create')) + { + JToolBarHelper::custom('local_listing.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('local_listing.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('local_listing'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return SermondistributorHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + $document = JFactory::getDocument(); + $document->setTitle(JText::_($isNew ? 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NEW' : 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EDIT')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/local_listing.css"); + // Add Ajax Token + $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + $document->addScript(JURI::root() . $this->script); + $document->addScript(JURI::root() . "administrator/components/com_sermondistributor/views/local_listing/submitbutton.js"); + // add JavaScripts + $document->addScript( JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit.min.js' ); + // add the style sheets + $document->addStyleSheet( JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit.gradient.min.css' ); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/local_listings/index.html b/admin/views/local_listings/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/local_listings/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default.php b/admin/views/local_listings/tmpl/default.php new file mode 100644 index 00000000..31276566 --- /dev/null +++ b/admin/views/local_listings/tmpl/default.php @@ -0,0 +1,99 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// load tooltip behavior +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', 'select'); + +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_sermondistributor&task=local_listings.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'local_listingList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} + +?> + +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +items)): ?> + loadTemplate('toolbar');?> +
+ +
+ + loadTemplate('toolbar');?> + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + + + +
+ + + + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_batch_body.php b/admin/views/local_listings/tmpl/default_batch_body.php new file mode 100644 index 00000000..1304bee7 --- /dev/null +++ b/admin/views/local_listings/tmpl/default_batch_body.php @@ -0,0 +1,32 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_batch_footer.php b/admin/views/local_listings/tmpl/default_batch_footer.php new file mode 100644 index 00000000..8847abfd --- /dev/null +++ b/admin/views/local_listings/tmpl/default_batch_footer.php @@ -0,0 +1,37 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_body.php b/admin/views/local_listings/tmpl/default_body.php new file mode 100644 index 00000000..ba684f95 --- /dev/null +++ b/admin/views/local_listings/tmpl/default_body.php @@ -0,0 +1,120 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$edit = "index.php?option=com_sermondistributor&view=local_listings&task=local_listing.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = SermondistributorHelper::getActions('local_listing',$item,'local_listings'); + ?> + + + get('local_listing.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive'; + } + else + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('local_listing.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + + get('local_listing.edit')): ?> +
+ escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'local_listings.', $canCheckin); ?> + +
+ +
escape($item->name); ?>
+ + + + build); ?> + + + escape($item->size); ?> + + + escape($item->external_source_description); ?> + + + escape($item->key); ?> + + + get('local_listing.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'local_listings.', true, 'cb'); ?> + + published, $i, 'local_listings.', false, 'cb'); ?> + + + published, $i, 'local_listings.', true, 'cb'); ?> + + + published, $i, 'local_listings.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_foot.php b/admin/views/local_listings/tmpl/default_foot.php new file mode 100644 index 00000000..209c8c55 --- /dev/null +++ b/admin/views/local_listings/tmpl/default_foot.php @@ -0,0 +1,32 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_head.php b/admin/views/local_listings/tmpl/default_head.php new file mode 100644 index 00000000..b9e36b91 --- /dev/null +++ b/admin/views/local_listings/tmpl/default_head.php @@ -0,0 +1,73 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + + canEdit&& $this->canState): ?> + +
', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/local_listings/tmpl/default_toolbar.php b/admin/views/local_listings/tmpl/default_toolbar.php new file mode 100644 index 00000000..4373cecb --- /dev/null +++ b/admin/views/local_listings/tmpl/default_toolbar.php @@ -0,0 +1,59 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/admin/views/local_listings/tmpl/index.html b/admin/views/local_listings/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/local_listings/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/local_listings/view.html.php b/admin/views/local_listings/view.html.php new file mode 100644 index 00000000..4dc73b3e --- /dev/null +++ b/admin/views/local_listings/view.html.php @@ -0,0 +1,334 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Sermondistributor View class for the Local_listings + */ +class SermondistributorViewLocal_listings extends JViewLegacy +{ + /** + * Local_listings view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + SermondistributorHelper::addSubmenu('local_listings'); + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode('
', $errors)); + return false; + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + $this->listOrder = $this->escape($this->state->get('list.ordering')); + $this->listDirn = $this->escape($this->state->get('list.direction')); + $this->saveOrder = $this->listOrder == 'ordering'; + // get global action permissions + $this->canDo = SermondistributorHelper::getActions('local_listing'); + $this->canEdit = $this->canDo->get('local_listing.edit'); + $this->canState = $this->canDo->get('local_listing.edit.state'); + $this->canCreate = $this->canDo->get('local_listing.create'); + $this->canDelete = $this->canDo->get('local_listing.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS'), 'link'); + JHtmlSidebar::setAction('index.php?option=com_sermondistributor&view=local_listings'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('local_listing.add'); + } + + // Only load if there are items + if (SermondistributorHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('local_listing.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('local_listings.publish'); + JToolBarHelper::unpublishList('local_listings.unpublish'); + JToolBarHelper::archiveList('local_listings.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('local_listings.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'local_listings.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('local_listings.trash'); + } + + if ($this->canDo->get('core.export') && $this->canDo->get('local_listing.export')) + { + JToolBarHelper::custom('local_listings.exportData', 'download', '', 'COM_SERMONDISTRIBUTOR_EXPORT_DATA', true); + } + } + + if ($this->canDo->get('core.import') && $this->canDo->get('local_listing.import')) + { + JToolBarHelper::custom('local_listings.importData', 'upload', '', 'COM_SERMONDISTRIBUTOR_IMPORT_DATA', false); + } + + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('local_listings'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_sermondistributor'); + } + + if ($this->canState) + { + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_PUBLISHED'), + 'filter_published', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + ); + // only load if batch allowed + if ($this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + } + + JHtmlSidebar::addFilter( + JText::_('JOPTION_SELECT_ACCESS'), + 'filter_access', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Set Build Selection + $this->buildOptions = $this->getTheBuildSelections(); + if ($this->buildOptions) + { + // Build Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL').' -', + 'filter_build', + JHtml::_('select.options', $this->buildOptions, 'value', 'text', $this->state->get('filter.build')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Build Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL').' -', + 'batch[build]', + JHtml::_('select.options', $this->buildOptions, 'value', 'text') + ); + } + } + + // Set External Source Description Selection + $this->external_sourceDescriptionOptions = JFormHelper::loadFieldType('Externalsource')->getOptions(); + if ($this->external_sourceDescriptionOptions) + { + // External Source Description Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL').' -', + 'filter_external_source', + JHtml::_('select.options', $this->external_sourceDescriptionOptions, 'value', 'text', $this->state->get('filter.external_source')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // External Source Description Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL').' -', + 'batch[external_source]', + JHtml::_('select.options', $this->external_sourceDescriptionOptions, 'value', 'text') + ); + } + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $document = JFactory::getDocument(); + $document->setTitle(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS')); + $document->addStyleSheet(JURI::root() . "administrator/components/com_sermondistributor/assets/css/local_listings.css"); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return SermondistributorHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.name' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NAME_LABEL'), + 'a.build' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_BUILD_LABEL'), + 'a.size' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_SIZE_LABEL'), + 'g.description' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EXTERNAL_SOURCE_LABEL'), + 'a.key' => JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_KEY_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } + + protected function getTheBuildSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('build')); + $query->from($db->quoteName('#__sermondistributor_local_listing')); + $query->order($db->quoteName('build') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $filter = array(); + foreach ($results as $build) + { + // Translate the build selection + $text = $model->selectionTranslation($build,'build'); + // Now add the build and its text to the options array + $filter[] = JHtml::_('select.option', $build, JText::_($text)); + } + return $filter; + } + return false; + } +} diff --git a/admin/views/manual_updater/index.html b/admin/views/manual_updater/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/manual_updater/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/manual_updater/tmpl/default.php b/admin/views/manual_updater/tmpl/default.php new file mode 100644 index 00000000..bf6f5a59 --- /dev/null +++ b/admin/views/manual_updater/tmpl/default.php @@ -0,0 +1,192 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the needed module for translation +$model = SermondistributorHelper::getModel('external_sources'); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +?> +canDo->get('manual_updater.access')): ?> + +
+ + +
+items) && SermondistributorHelper::checkArray($this->items)): ?> + +
+ + items as $item): ?> + description).$item->id; ?> + '. $item->description . ' (' . JText::_($model->selectionTranslation($item->build, 'build')) . ')
'; ?> + +
+ + +
+
+

+
+ id, 1, 2); ?> + + + id, $item->id.$target.$item->build)): ?> + id.$target.$item->build); ?> + + JText::_('COM_SERMONDISTRIBUTOR_THERE_WAS_AN_ERROR_DURING_THE_LAST_UPDATE_ATTEMPT')), $error); ?> + + + + + + + + + +
+ + + +
+

+
+ + +

+ diff --git a/admin/views/manual_updater/tmpl/index.html b/admin/views/manual_updater/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/admin/views/manual_updater/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/manual_updater/view.html.php b/admin/views/manual_updater/view.html.php new file mode 100644 index 00000000..70f8cf84 --- /dev/null +++ b/admin/views/manual_updater/view.html.php @@ -0,0 +1,184 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Sermondistributor View class for the Manual_updater + */ +class SermondistributorViewManual_updater extends JViewLegacy +{ + // Overwriting JView display method + function display($tpl = null) + { + // get component params + $this->params = JComponentHelper::getParams('com_sermondistributor'); + // get the application + $this->app = JFactory::getApplication(); + // get the user object + $this->user = JFactory::getUser(); + // get global action permissions + $this->canDo = SermondistributorHelper::getActions('manual_updater'); + // Initialise variables. + $this->items = $this->get('Items'); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode("\n", $errors)); + return false; + } + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + // add the tool bar + $this->addToolBar(); + } + + // set the document + $this->setDocument(); + + parent::display($tpl); + } + + /** + * Prepares the document + */ + protected function setDocument() + { + + // always make sure jquery is loaded. + JHtml::_('jquery.framework'); + // Load the header checker class. + require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' ); + // Initialize the header checker. + $HeaderCheck = new HeaderCheck; + + // Load uikit options. + $uikit = $this->params->get('uikit_load'); + // Set script size. + $size = $this->params->get('uikit_min'); + // Set css style. + $style = $this->params->get('uikit_style'); + + // The uikit css. + if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/uikit'.$style.$size.'.css'); + } + // The uikit js. + if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/uikit'.$size.'.js'); + } + + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'uk-form'; + } + + // Load the needed uikit components in this view. + if ($uikit != 2 && isset($uikitComp) && SermondistributorHelper::checkArray($uikitComp)) + { + // load just in case. + jimport('joomla.filesystem.file'); + // loading... + foreach ($uikitComp as $class) + { + foreach (SermondistributorHelper::$uk_components[$class] as $name) + { + // check if the CSS file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css')) + { + // load the css. + $this->document->addStyleSheet(JURI::root(true) .'/media/com_sermondistributor/uikit/css/components/'.$name.$style.$size.'.css'); + } + // check if the JavaScript file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js')) + { + // load the js. + $this->document->addScript(JURI::root(true) .'/media/com_sermondistributor/uikit/js/components/'.$name.$size.'.js'); + } + } + } + } + // add the document default css file + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_sermondistributor/assets/css/manual_updater.css'); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + // hide the main menu + $this->app->input->set('hidemainmenu', true); + // add title to the page + JToolbarHelper::title(JText::_('COM_SERMONDISTRIBUTOR_MANUAL_UPDATER'),'cogs'); + // add the back button + // JToolBarHelper::custom('manual_updater.back', 'undo-2', '', 'COM_SERMONDISTRIBUTOR_BACK', false); + // add cpanel button + JToolBarHelper::custom('manual_updater.dashboard', 'grid-2', '', 'COM_SERMONDISTRIBUTOR_DASH', false); + if ($this->canDo->get('manual_updater.external_sources')) + { + // add External Sources button. + JToolBarHelper::custom('manual_updater.gotoExternalSources', 'puzzle', '', 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES', false); + } + + // set help url for this view if found + $help_url = SermondistributorHelper::getHelpUrl('manual_updater'); + if (SermondistributorHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_SERMONDISTRIBUTOR_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_sermondistributor'); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + // use the helper htmlEscape method instead. + return SermondistributorHelper::htmlEscape($var, $this->_charset); + } +} diff --git a/admin/views/preacher/submitbutton.js b/admin/views/preacher/submitbutton.js index ff06e610..4f970f49 100644 --- a/admin/views/preacher/submitbutton.js +++ b/admin/views/preacher/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage submitbutton.js diff --git a/admin/views/preacher/tmpl/edit.php b/admin/views/preacher/tmpl/edit.php index 2bb7ac6d..19c98960 100644 --- a/admin/views/preacher/tmpl/edit.php +++ b/admin/views/preacher/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.3.8 - @build 2nd November, 2016 + @version 1.4.0 + @build 27th November, 2016 @created 22nd October, 2015 @package Sermon Distributor @subpackage edit.php @@ -33,7 +33,29 @@ JHtml::_('behavior.keepalive'); $componentParams = JComponentHelper::getParams('com_sermondistributor'); ?> -
+ +