Compare commits

...

8 Commits

Author SHA1 Message Date
Robot 304c0cd388
Stable release of v3.0.3
Removed the not_required field from the sermon model. #36.
2024-02-11 19:24:51 +02:00
Robot 3bca4fe609
Stable release of v3.0.2
Add the HTML class to the site default layout.
2024-02-10 13:39:52 +02:00
Robot e63079caff
Stable release of v3.0.0
Moved all classes to 'use' classes away from JText format. Build with new JCB 3.1.31 beta.
2024-02-10 11:13:31 +02:00
Llewellyn van der Merwe b40bc5b293
Upgraded to JCB 3.1.24 2023-05-29 14:29:14 +02:00
Llewellyn van der Merwe 1869c940d3
Upgraded to JCB 3.1.0 2022-05-27 07:37:27 +02:00
Llewellyn van der Merwe 2aa520e444
update 2022-03-03 05:49:35 +02:00
Llewellyn van der Merwe 02a60ab714
Upgraded to JCB v2.12.10 2021-08-16 19:11:44 +02:00
Llewellyn van der Merwe b72b3d5048
Upgraded to JCB v2.12.6 2021-02-07 05:15:42 +02:00
410 changed files with 45070 additions and 41107 deletions

69
.octojpack Normal file
View File

@ -0,0 +1,69 @@
{
"global": {
"packager": "Vast Development Method",
"packager_url": "https://dev.vdm.io/",
"url": "git.vdm.dev",
"api": "https://git.vdm.dev/api/v1"
},
"package": {
"name": "PKG_SERMONDISTRIBUTOR",
"code_name": "sermondistributor",
"package_name": "pkg_sermondistributor",
"min_joomla_version": "3.8",
"max_joomla_version": "3.10",
"copyright": "Copyright (C) 2015 Llewellyn van der Merwe. All rights reserved.",
"copyright_year": "2015",
"license": "GNU General Public License version 2; see LICENSE",
"license_file": "LICENSE",
"author": "Llewellyn van der Merwe",
"author_email": "joomla@vdm.io",
"author_url": "https://io.vdm.dev/",
"description": "The Sermon Distributor.",
"version_id": "com_sermondistributor",
"update_servers": "https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/sermondistributor_update_server.xml"
},
"repository": {
"owner": "christian",
"repo": "pkg-sermondistributor"
},
"files": [
{
"owner": "christian",
"repo": "Joomla-Sermon-Distributor",
"id": "com_sermondistributor",
"type": "component",
"mode": "master"
},
{
"owner": "christian",
"repo": "mod_dailylight",
"id": "mod_dailylight",
"type": "module",
"client": "site",
"mode": "master"
},
{
"owner": "christian",
"repo": "mod_dailyscripture",
"id": "mod_dailyscripture",
"type": "module",
"client": "site",
"mode": "master"
}
],
"languages": [
{
"tag": "en-GB",
"ini": "sys.ini",
"key": "PKG_SERMONDISTRIBUTOR",
"value": "Sermon Distributor Package"
},
{
"tag": "en-GB",
"ini": "ini",
"key": "PKG_SERMONDISTRIBUTOR",
"value": "Sermon Distributor Package"
}
]
}

20
CHANGELOG.md Normal file
View File

@ -0,0 +1,20 @@
# v3.0.3
- Removed the not_required field from the sermon model. #36
# v3.0.2
- Add the HTML class to the site default layout.
# v3.0.1
- Fix missing ComponentHelper class in localfiles field type.
# v3.0.0
- Moved all classes to 'use' classes away from JText format.
- Build with new JCB 3.1.31 beta
# v2.1.1
- Moved over to a Joomla Package

View File

@ -1,10 +1,10 @@
# Sermon Distributor (2.0.x) # Sermon Distributor (3.0.x)
![Sermon Distributor image](https://raw.githubusercontent.com/Llewellynvdm/Joomla-Sermon-Distributor/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") ![Sermon Distributor image](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor")
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox. Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip) The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
**If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)** **If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
@ -24,74 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/) + *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015 + *First Build*: 22nd October, 2015
+ *Last Build*: 15th January, 2021 + *Last Build*: 11th February, 2024
+ *Version*: 2.0.x + *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass: ## Build Time :hourglass:
**204 Hours** or **26 Eight Hour Days** (actual time the author saved - **243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **73062** + *Line count*: **87039**
+ *File count*: **460** + *File count*: **595**
+ *Folder count*: **93** + *Folder count*: **113**
**134 Hours** or **16 Eight Hour Days** (the actual time the author spent) **160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @51hours** = codingtime / 4; > **debugging @61hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7; > **planning @35hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10; > **mapping @24hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;) > **office @40hours** = codingtime / 6;)
**338 Hours** or **42 Eight Hour Days** **403 Hours** or **50 Eight Hour Days**
(a total of the realistic time frame for this project) (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**, > (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.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **8.4 weeks** or **1.8 months** Project duration: **10 weeks** or **2.1 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Contributors
This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
### Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)]
[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)]
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)

View File

@ -1,10 +1,10 @@
# Sermon Distributor (2.0.x) # Sermon Distributor (3.0.x)
![Sermon Distributor image](https://raw.githubusercontent.com/Llewellynvdm/Joomla-Sermon-Distributor/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor") ![Sermon Distributor image](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/admin/assets/images/vdm-component.jpg "The Sermon Distributor")
Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox. Distributor is a highly advanced sermon distributor that runs on the [Joomla 3.x](http://www.joomla.org) framework. You can link a shared folder from Dropbox to the component and use Dropbox as your file host, not to mention the advanced auto builder that gives you the ability to simply load sermons to your website by only adding them to Dropbox.
The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://github.com/SermonDistributor/Joomla-3-Component/archive/master.zip) The best way to see all your options is to install this component on you Joomla website and test all features yourself. Here is a [direct download link](https://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
**If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)** **If you like our component please rate it on the [Joomla Index](http://extensions.joomla.org/extensions/extension/living/religion/sermon-distributor)**
@ -24,74 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/) + *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015 + *First Build*: 22nd October, 2015
+ *Last Build*: 15th January, 2021 + *Last Build*: 11th February, 2024
+ *Version*: 2.0.x + *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass: ## Build Time :hourglass:
**204 Hours** or **26 Eight Hour Days** (actual time the author saved - **243 Hours** or **30 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **73062** + *Line count*: **87039**
+ *File count*: **460** + *File count*: **595**
+ *Folder count*: **93** + *Folder count*: **113**
**134 Hours** or **16 Eight Hour Days** (the actual time the author spent) **160 Hours** or **20 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @51hours** = codingtime / 4; > **debugging @61hours** = codingtime / 4;
> **planning @29hours** = codingtime / 7; > **planning @35hours** = codingtime / 7;
> **mapping @20hours** = codingtime / 10; > **mapping @24hours** = codingtime / 10;
> **office @34hours** = codingtime / 6;) > **office @40hours** = codingtime / 6;)
**338 Hours** or **42 Eight Hour Days** **403 Hours** or **50 Eight Hour Days**
(a total of the realistic time frame for this project) (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**, > (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.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **8.4 weeks** or **1.8 months** Project duration: **10 weeks** or **2.1 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Contributors
This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
### Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)]
[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)]
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<access component="com_sermondistributor"> <access component="com_sermondistributor">
<section name="component"> <section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" /> <action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" /> <action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" />
@ -222,5 +222,5 @@
<action name="core.edit" title="JACTION_EDIT" description="COM_CATEGORIES_ACCESS_EDIT_DESC" /> <action name="core.edit" title="JACTION_EDIT" description="COM_CATEGORIES_ACCESS_EDIT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" /> <action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" /> <action name="core.edit.own" title="JACTION_EDITOWN" description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" />
</section> </section>
</access> </access>

View File

@ -1,28 +1,28 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage admin.css @subpackage admin.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */
.no-click { .no-click {
pointer-events: none; pointer-events: none;
} }

View File

@ -1,176 +1,176 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage dashboard.css @subpackage dashboard.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */
.dashboard-container { .dashboard-container {
margin-left: 10px; margin-left: 10px;
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
} }
.dashboard-container [class*="span"] { .dashboard-container [class*="span"] {
display: block; display: block;
float: none; float: none;
margin-left: 0; margin-left: 0;
width: auto; width: auto;
} }
.dashboard-container:before, .dashboard-container:after { .dashboard-container:before, .dashboard-container:after {
content: ""; content: "";
display: table; display: table;
} }
.dashboard-container:after { .dashboard-container:after {
clear: both; clear: both;
} }
.dashboard-container [class*="span"] { .dashboard-container [class*="span"] {
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
float: left; float: left;
min-height: 145px; min-height: 145px;
min-width: 96px; min-width: 96px;
width: 100%; width: 100%;
} }
.dashboard-container [class*="span"]:first-child { .dashboard-container [class*="span"]:first-child {
margin-left: 0; margin-left: 0;
} }
.dashboard-wraper { .dashboard-wraper {
background: none repeat scroll 0 0 hsl(0, 0%, 93%); background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px; border-radius: 5px;
float: left; float: left;
margin: 1%; margin: 1%;
padding: 3px; padding: 3px;
width: 17%; width: 17%;
min-height: 194px; min-height: 194px;
min-width: 96px; min-width: 96px;
} }
.dashboard-content a { .dashboard-content a {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%); border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%); color: hsl(0, 0%, 20%);
display: block; display: block;
min-height: 89px; min-height: 89px;
padding: 10px; padding: 10px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
} }
.dashboard-content a:hover { .dashboard-content a:hover {
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%); color: hsl(200, 100%, 30%);
text-decoration: none; text-decoration: none;
} }
.dashboard-title { .dashboard-title {
display: block; display: block;
padding-top: 5px; padding-top: 5px;
} }
.dashboard-info { .dashboard-info {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%); border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%); color: hsl(0, 0%, 20%);
display: block; display: block;
font-size: 12px; font-size: 12px;
padding: 10px; padding: 10px;
text-align: center; text-align: center;
} }
.dashboard-info span { .dashboard-info span {
display: block; display: block;
text-align: center; text-align: center;
} }
.dashboard-info img { .dashboard-info img {
margin: 0 auto; margin: 0 auto;
} }
.dashboard-table { .dashboard-table {
border-top: 1px solid hsl(0, 0%, 87%); border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px; margin-top: 5px;
width: 100%; width: 100%;
} }
.dashboard-info h5 { .dashboard-info h5 {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
} }
.dashboard-block { .dashboard-block {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%); border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px; border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset; box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px; margin-bottom: 20px;
} }
.dashboard-block .dashboard-block-head { .dashboard-block .dashboard-block-head {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%); border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%); box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px; height: 40px;
position: relative; position: relative;
} }
.dashboard-block .dashboard-block-head h5 { .dashboard-block .dashboard-block-head h5 {
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
padding-left: 10px; padding-left: 10px;
padding-top: 11px; padding-top: 11px;
text-transform: uppercase; text-transform: uppercase;
} }
.dashboard-block .dashboard-block-content { .dashboard-block .dashboard-block-content {
background: none repeat scroll 0 0 hsl(0, 0%, 93%); background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px;
} }
.dashboard-block .dashboard-block-box { .dashboard-block .dashboard-block-box {
background: none repeat scroll 0 0 hsl(0, 0%, 100%); background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%); border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset; box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
} }
.dashboard-block .dashboard-block-content .dashboard-block-box { .dashboard-block .dashboard-block-content .dashboard-block-box {
margin-top: 0 !important; margin-top: 0 !important;
} }
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table { .dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.dashboard-block-table { .dashboard-block-table {
background-color: hsla(0, 0%, 0%, 0); background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
margin-bottom: 20px; margin-bottom: 20px;
max-width: 100%; max-width: 100%;
width: 100%; width: 100%;
} }
.dashboard-block-table th, .dashboard-block-table td { .dashboard-block-table th, .dashboard-block-table td {
border-top: 1px solid hsl(0, 0%, 87%); border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px; line-height: 20px;
padding: 5px; padding: 5px;
text-align: left; text-align: left;
vertical-align: middle; vertical-align: middle;
} }
.dashboard-badge { .dashboard-badge {
background-color: hsl(0, 0%, 60%); background-color: hsl(0, 0%, 60%);
border-radius: 9px; border-radius: 9px;
color: hsl(0, 0%, 100%); color: hsl(0, 0%, 100%);
font-size: 11.844px; font-size: 11.844px;
font-weight: bold; font-weight: bold;
line-height: 14px; line-height: 14px;
padding: 1px 9px 2px; padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25); text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline; vertical-align: baseline;
white-space: nowrap; white-space: nowrap;
} }

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage external_source.css @subpackage external_source.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage external_sources.css @subpackage external_sources.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.css @subpackage help_document.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_documents.css @subpackage help_documents.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage local_listing.css @subpackage local_listing.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage local_listings.css @subpackage local_listings.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage manual_updater.css @subpackage manual_updater.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.css @subpackage preacher.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.css @subpackage preachers.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.css @subpackage series.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series_list.css @subpackage series_list.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.css @subpackage sermon.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons.css @subpackage sermons.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.css @subpackage statistic.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

View File

@ -1,26 +1,26 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistics.css @subpackage statistics.css
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */ /* CSS Document */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -1,24 +1,24 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage admin.js @subpackage admin.js
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
/* JS Document */ /* JS Document */

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<config> <config>
<fieldset <fieldset
addrulepath="/administrator/components/com_sermondistributor/models/rules" addrulepath="/administrator/components/com_sermondistributor/models/rules"
addfieldpath="/administrator/components/com_sermondistributor/models/fields" addfieldpath="/administrator/components/com_sermondistributor/models/fields"
@ -60,8 +60,8 @@
last="50000" last="50000"
step="10" step="10"
/> />
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_4 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" /> <field type="spacer" name="spacer_hr_4" hr="true" class="spacer_hr_4" />
<field name="autorTitle" <field name="autorTitle"
type="spacer" type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR" label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
@ -301,6 +301,18 @@
name="uikit_config" name="uikit_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LABEL" label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC"> description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC">
<field name="add_jquery_framework"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD_DESC"
class="btn-group btn-group-yesno"
default="">
<!-- Option Set. -->
<option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_REMOVE</option>"
<option value="1">
COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD</option>"
</field>
<field name="uikit_version" <field name="uikit_version"
type="radio" type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_LABEL" label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_LABEL"
@ -393,7 +405,7 @@
<option value="2"> <option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option> COM_SERMONDISTRIBUTOR_CONFIG_JPLAYER</option>
<option value="3"> <option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_HTML_FIVE_BASIC</option> COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC</option>
</field> </field>
</fieldset> </fieldset>
<fieldset <fieldset
@ -917,8 +929,8 @@
<option value="0"> <option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option> COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field> </field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_1 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" /> <field type="spacer" name="spacer_hr_1" hr="true" class="spacer_hr_1" />
<!-- Preacher_sermons_display Field. Type: Radio. (joomla) --> <!-- Preacher_sermons_display Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -1352,8 +1364,8 @@
<option value="0"> <option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option> COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field> </field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_2 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" /> <field type="spacer" name="spacer_hr_2" hr="true" class="spacer_hr_2" />
<!-- Category_sermons_display Field. Type: Radio. (joomla) --> <!-- Category_sermons_display Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -1787,8 +1799,8 @@
<option value="0"> <option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option> COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field> </field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_3 Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" /> <field type="spacer" name="spacer_hr_3" hr="true" class="spacer_hr_3" />
<!-- Series_sermons_display Field. Type: Radio. (joomla) --> <!-- Series_sermons_display Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -1967,20 +1979,20 @@
<option value="0"> <option value="0">
COM_SERMONDISTRIBUTOR_CONFIG_NO</option> COM_SERMONDISTRIBUTOR_CONFIG_NO</option>
</field> </field>
</fieldset> </fieldset>
<fieldset <fieldset
name="permissions" name="permissions"
label="JCONFIG_PERMISSIONS_LABEL" label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"> description="JCONFIG_PERMISSIONS_DESC">
<field <field
name="rules" name="rules"
type="rules" type="rules"
label="JCONFIG_PERMISSIONS_LABEL" label="JCONFIG_PERMISSIONS_LABEL"
class="inputbox" class="inputbox"
validate="rules" validate="rules"
filter="rules" filter="rules"
component="com_sermondistributor" component="com_sermondistributor"
section="component" section="component"
/> />
</fieldset> </fieldset>
</config> </config>

View File

@ -1,109 +1,114 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage controller.php @subpackage controller.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
/** use Joomla\CMS\Language\Text;
* General Controller of Sermondistributor component use Joomla\CMS\Router\Route;
*/ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
class SermondistributorController extends JControllerLegacy use VDM\Joomla\Utilities\StringHelper;
{
/** /**
* Constructor. * General Controller of Sermondistributor component
* */
* @param array $config An optional associative array of configuration settings. class SermondistributorController extends BaseController
* Recognized key values include 'name', 'default_task', 'model_path', and {
* 'view_path' (this list is not meant to be comprehensive). /**
* * Constructor.
* @since 3.0 *
*/ * @param array $config An optional associative array of configuration settings.
public function __construct($config = array()) * Recognized key values include 'name', 'default_task', 'model_path', and
{ * 'view_path' (this list is not meant to be comprehensive).
// set the default view *
$config['default_view'] = 'sermondistributor'; * @since 3.0
*/
parent::__construct($config); public function __construct($config = [])
} {
// set the default view
/** $config['default_view'] = 'sermondistributor';
* display task
* parent::__construct($config);
* @return void }
*/
function display($cachable = false, $urlparams = false) /**
{ * display task
// set default view if not set *
$view = $this->input->getCmd('view', 'sermondistributor'); * @return void
$data = $this->getViewRelation($view); */
$layout = $this->input->get('layout', null, 'WORD'); function display($cachable = false, $urlparams = false)
$id = $this->input->getInt('id'); {
// set default view if not set
// Check for edit form. $view = $this->input->getCmd('view', 'sermondistributor');
if(SermondistributorHelper::checkArray($data)) $data = $this->getViewRelation($view);
{ $layout = $this->input->get('layout', null, 'WORD');
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_sermondistributor.edit.'.$data['view'], $id)) $id = $this->input->getInt('id');
{
// Somehow the person just went to the form - we don't allow that. // Check for edit form.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); if(UtilitiesArrayHelper::check($data))
$this->setMessage($this->getError(), 'error'); {
// check if item was opend from other then its own list view if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_sermondistributor.edit.'.$data['view'], $id))
$ref = $this->input->getCmd('ref', 0); {
$refid = $this->input->getInt('refid', 0); // Somehow the person just went to the form - we don't allow that.
// set redirect $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
if ($refid > 0 && SermondistributorHelper::checkString($ref)) $this->setMessage($this->getError(), 'error');
{ // check if item was opend from other then its own list view
// redirect to item of ref $ref = $this->input->getCmd('ref', 0);
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); $refid = $this->input->getInt('refid', 0);
} // set redirect
elseif (SermondistributorHelper::checkString($ref)) if ($refid > 0 && StringHelper::check($ref))
{ {
// redirect to item of ref
// redirect to ref $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.(string)$ref, false)); }
} elseif (StringHelper::check($ref))
else {
{
// normal redirect back to the list view // redirect to ref
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view='.$data['views'], false)); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.(string)$ref, false));
} }
else
return false; {
} // normal redirect back to the list view
} $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view='.$data['views'], false));
}
return parent::display($cachable, $urlparams);
} return false;
}
protected function getViewRelation($view) }
{
// check the we have a value return parent::display($cachable, $urlparams);
if (SermondistributorHelper::checkString($view)) }
{
// the view relationships protected function getViewRelation($view)
{
// check the we have a value
if (StringHelper::check($view))
{
// the view relationships
$views = array( $views = array(
'preacher' => 'preachers', 'preacher' => 'preachers',
'sermon' => 'sermons', 'sermon' => 'sermons',
@ -111,21 +116,21 @@ class SermondistributorController extends JControllerLegacy
'statistic' => 'statistics', 'statistic' => 'statistics',
'external_source' => 'external_sources', 'external_source' => 'external_sources',
'local_listing' => 'local_listings', 'local_listing' => 'local_listings',
'help_document' => 'help_documents' 'help_document' => 'help_documents'
); );
// check if this is a list view // check if this is a list view
if (in_array($view, $views)) if (in_array($view, $views))
{ {
// this is a list view // this is a list view
return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view); return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view);
} }
// check if it is an edit view // check if it is an edit view
elseif (array_key_exists($view, $views)) elseif (array_key_exists($view, $views))
{ {
// this is a edit view // this is a edit view
return array('edit' => true, 'view' => $view, 'views' => $views[$view]); return array('edit' => true, 'view' => $view, 'views' => $views[$view]);
} }
} }
return false; return false;
} }
} }

View File

@ -1,79 +1,98 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage ajax.json.php @subpackage ajax.json.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
/** use Joomla\CMS\Session\Session;
* Sermondistributor Ajax Controller use Joomla\Utilities\ArrayHelper;
*/
class SermondistributorControllerAjax extends JControllerLegacy /**
{ * Sermondistributor Ajax Base Controller
public function __construct($config) */
{ class SermondistributorControllerAjax extends BaseController
parent::__construct($config); {
// make sure all json stuff are set public function __construct($config)
JFactory::getDocument()->setMimeEncoding( 'application/json' ); {
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); parent::__construct($config);
JResponse::setHeader("Access-Control-Allow-Origin", "*"); // make sure all json stuff are set
Factory::getDocument()->setMimeEncoding( 'application/json' );
// get the application
$app = Factory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks // load the tasks
$this->registerTask('isNew', 'ajax'); $this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax'); $this->registerTask('isRead', 'ajax');
$this->registerTask('getBuildTable', 'ajax'); $this->registerTask('getBuildTable', 'ajax');
$this->registerTask('getSourceStatus', 'ajax'); $this->registerTask('getSourceStatus', 'ajax');
$this->registerTask('getCronPath', 'ajax'); $this->registerTask('getCronPath', 'ajax');
$this->registerTask('updateLocalListingExternal', 'ajax'); $this->registerTask('updateLocalListingExternal', 'ajax');
} }
public function ajax() public function ajax()
{ {
$user = JFactory::getUser(); // get the user for later use
$jinput = JFactory::getApplication()->input; $user = Factory::getUser();
// Check Token! // get the input values
$token = JSession::getFormToken(); $jinput = Factory::getApplication()->input;
$call_token = $jinput->get('token', 0, 'ALNUM'); // check if we should return raw
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) $returnRaw = $jinput->get('raw', false, 'BOOLEAN');
{ // return to a callback function
$task = $this->getTask(); $callback = $jinput->get('callback', null, 'CMD');
switch($task) // Check Token!
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
$task = $this->getTask();
switch($task)
{ {
case 'isNew': case 'isNew':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING'); $noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0) if($noticeValue && $user->id != 0)
{ {
$result = $this->getModel('ajax')->isNew($noticeValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isNew($noticeValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -86,12 +105,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
@ -101,17 +124,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'isRead': case 'isRead':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$noticeValue = $jinput->get('notice', NULL, 'STRING'); $noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0) if($noticeValue && $user->id != 0)
{ {
$result = $this->getModel('ajax')->isRead($noticeValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isRead($noticeValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -124,12 +154,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
@ -139,18 +173,25 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getBuildTable': case 'getBuildTable':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idNameValue = $jinput->get('idName', NULL, 'WORD'); $idNameValue = $jinput->get('idName', NULL, 'WORD');
$ojectValue = $jinput->get('oject', NULL, 'STRING'); $ojectValue = $jinput->get('oject', NULL, 'STRING');
if($idNameValue && $user->id != 0 && $ojectValue) if($idNameValue && $user->id != 0 && $ojectValue)
{ {
$result = $this->getModel('ajax')->getBuildTable($idNameValue, $ojectValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getBuildTable($idNameValue, $ojectValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -163,12 +204,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
@ -178,17 +223,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getSourceStatus': case 'getSourceStatus':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT'); $idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0) if($idValue && $user->id != 0)
{ {
$result = $this->getModel('ajax')->getSourceStatus($idValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getSourceStatus($idValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -201,12 +253,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
@ -216,17 +272,24 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'getCronPath': case 'getCronPath':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$getTypeValue = $jinput->get('getType', NULL, 'WORD'); $getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0) if($getTypeValue && $user->id != 0)
{ {
$result = $this->getModel('ajax')->getCronPath($getTypeValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getCronPath($getTypeValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -239,12 +302,16 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
@ -254,20 +321,27 @@ class SermondistributorControllerAjax extends JControllerLegacy
case 'updateLocalListingExternal': case 'updateLocalListingExternal':
try try
{ {
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT'); $idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT'); $targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT'); $typeValue = $jinput->get('type', NULL, 'INT');
$sleutelValue = $jinput->get('sleutel', NULL, 'CMD'); $sleutelValue = $jinput->get('sleutel', NULL, 'CMD');
if($idValue && $user->id != 0 && $targetValue && $typeValue && $sleutelValue) if($idValue && $user->id != 0 && $targetValue && $typeValue && $sleutelValue)
{ {
$result = $this->getModel('ajax')->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue); $ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue);
}
else
{
$result = false;
}
} }
else else
{ {
$result = false; $result = false;
} }
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback . "(".json_encode($result).");"; echo $callback . "(".json_encode($result).");";
} }
@ -280,30 +354,39 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($result).");"; echo "(".json_encode($result).");";
} }
} }
catch(Exception $e) catch(\Exception $e)
{ {
if($callback = $jinput->get('callback', null, 'CMD')) if($callback)
{ {
echo $callback."(".json_encode($e).");"; echo $callback."(".json_encode($e).");";
} }
elseif($returnRaw)
{
echo json_encode($e);
}
else else
{ {
echo "(".json_encode($e).");"; echo "(".json_encode($e).");";
} }
} }
break; break;
} }
} }
else else
{ {
if($callback = $jinput->get('callback', null, 'CMD')) // return to a callback function
{ if($callback)
echo $callback."(".json_encode(false).");"; {
} echo $callback."(".json_encode(false).");";
else }
{ elseif($returnRaw)
echo "(".json_encode(false).");"; {
} echo json_encode(false);
} }
} else
} {
echo "(".json_encode(false).");";
}
}
}
}

View File

@ -1,82 +1,89 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage external_source.php @subpackage external_source.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* External_source Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerExternal_source extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * External_source Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerExternal_source extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'External_sources'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = [])
{
$this->view_list = 'External_sources'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
} }
public function clearLocalListing() public function clearLocalListing()
{ {
// Check for request forgeries. // Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// get the data // get the data
$originalData = $this->input->post->get('jform', array(), 'array'); $originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0) if (isset($originalData['id']) && $originalData['id'] > 0)
{ {
// get the needed // get the needed
$app = JFactory::getApplication(); $app = Factory::getApplication();
$lang = JFactory::getLanguage(); $lang = Factory::getLanguage();
$model = $this->getModel(); $model = $this->getModel();
$user = JFactory::getUser(); $user = Factory::getUser();
$context = "$this->option.edit.$this->context"; $context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.clear_local_listing', 'com_sermondistributor')) if (!$user->authorise('external_source.clear_local_listing', 'com_sermondistributor'))
{ {
// force production is not permitted // force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING'), 'error'); $app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING'), 'error');
// Save the data in the session. // Save the data in the session.
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
@ -88,12 +95,12 @@ class SermondistributorControllerExternal_source extends JControllerForm
if (!$cleared) if (!$cleared)
{ {
// force production is not permitted // force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED'), 'error'); $app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED'), 'error');
// Save the data in the session. // Save the data in the session.
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
@ -101,23 +108,23 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false; return false;
} }
// force production is not permitted // force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY'), 'success'); $app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY'), 'success');
// Save the data in the session. // Save the data in the session.
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
); );
return true; return true;
} }
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE')); $this->setError(Text::_('COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error'); $this->setMessage($this->getError(), 'error');
// Redirect back to the list screen. // Redirect back to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list 'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false . $this->getRedirectToListAppend(), false
) )
@ -128,26 +135,26 @@ class SermondistributorControllerExternal_source extends JControllerForm
public function resetUpdateStatus() public function resetUpdateStatus()
{ {
// Check for request forgeries. // Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// get the data // get the data
$originalData = $this->input->post->get('jform', array(), 'array'); $originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0) if (isset($originalData['id']) && $originalData['id'] > 0)
{ {
// get the needed // get the needed
$app = JFactory::getApplication(); $app = Factory::getApplication();
$lang = JFactory::getLanguage(); $lang = Factory::getLanguage();
$model = $this->getModel(); $model = $this->getModel();
$user = JFactory::getUser(); $user = Factory::getUser();
$context = "$this->option.edit.$this->context"; $context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.reset_update_status', 'com_sermondistributor')) if (!$user->authorise('external_source.reset_update_status', 'com_sermondistributor'))
{ {
// force production is not permitted // force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS'), 'error'); $app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS'), 'error');
// Save the data in the session. // Save the data in the session.
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
@ -164,7 +171,7 @@ class SermondistributorControllerExternal_source extends JControllerForm
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
@ -172,43 +179,43 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false; return false;
} }
// reset update status success // reset update status success
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL'), 'success'); $app->enqueueMessage(Text::_('COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL'), 'success');
// Save the data in the session. // Save the data in the session.
$app->setUserState($context . '.data', $originalData); $app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen. // Redirect back to the edit screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item 'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false . $this->getRedirectToItemAppend($originalData['id'], 'id'), false
) )
); );
return true; return true;
} }
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE')); $this->setError(Text::_('COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error'); $this->setMessage($this->getError(), 'error');
// Redirect back to the list screen. // Redirect back to the list screen.
$this->setRedirect( $this->setRedirect(
JRoute::_( Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list 'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false . $this->getRedirectToListAppend(), false
) )
); );
return false; return false;
} }
/** /**
* Method override to check if you can add a new record. * Method override to check if you can add a new record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowAdd($data = array()) protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('external_source.access', 'com_sermondistributor'); $access = $user->authorise('external_source.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -216,30 +223,30 @@ class SermondistributorControllerExternal_source extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('external_source.create', $this->option); return $user->authorise('external_source.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $recordId) && $user->authorise('external_source.access', 'com_sermondistributor')); $access = ($user->authorise('external_source.access', 'com_sermondistributor.external_source.' . (int) $recordId) && $user->authorise('external_source.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -280,199 +287,198 @@ class SermondistributorControllerExternal_source extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('external_source.edit', $this->option); return $user->authorise('external_source.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('External_source', '', []);
// Preset the redirect
$this->setRedirect(Route::_('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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage external_sources.php @subpackage external_sources.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* External_sources Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerExternal_sources extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * External_sources Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerExternal_sources extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'External_source', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'External_source', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerExternal_sources extends JControllerAdmin
$model = $this->getModel('External_sources'); $model = $this->getModel('External_sources');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'External_sources_'.$date->format('jS_F_Y'),'External sources exported ('.$date->format('jS F, Y').')','external sources'); 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. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerExternal_sources extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('external_source.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('external_source.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('External_sources'); $model = $this->getModel('External_sources');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('external_source_VDM_IMPORTHEADERS', $headers); $session->set('external_source_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'external_sources'); $session->set('backto_VDM_IMPORT', 'external_sources');
$session->set('dataType_VDM_IMPORTINTO', 'external_source'); $session->set('dataType_VDM_IMPORTINTO', 'external_source');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_EXTERNAL_SOURCES');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,128 +1,132 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help.php @subpackage help.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
/** use Joomla\CMS\Uri\Uri;
* Sermondistributor Help Controller use Joomla\CMS\Session\Session;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerHelp extends JControllerLegacy
{ /**
public function __construct($config) * Sermondistributor Help Base Controller
{ */
parent::__construct($config); class SermondistributorControllerHelp extends BaseController
// load the tasks {
$this->registerTask('getText', 'help'); public function __construct($config)
} {
parent::__construct($config);
public function help() // load the tasks
{ $this->registerTask('getText', 'help');
$user = JFactory::getUser(); }
$jinput = JFactory::getApplication()->input;
// Check Token! public function help()
$token = JSession::getFormToken(); {
$call_token = $jinput->get('token', 0, 'ALNUM'); $user = Factory::getUser();
if($user->id != 0 && $token == $call_token) $jinput = Factory::getApplication()->input;
{ // Check Token!
$task = $this->getTask(); $token = Session::getFormToken();
switch($task){ $call_token = $jinput->get('token', 0, 'ALNUM');
case 'getText': if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
try {
{ $task = $this->getTask();
$idValue = $jinput->get('id', 0, 'INT'); switch($task){
if($idValue) case 'getText':
{ try
$result = $this->getHelpDocumentText($idValue); {
} $idValue = $jinput->get('id', 0, 'INT');
else if($idValue)
{ {
$result = ''; $result = $this->getHelpDocumentText($idValue);
} }
echo $result; else
// stop execution gracefully {
jexit(); $result = '';
} }
catch(Exception $e) echo $result;
{ // stop execution gracefully
// stop execution gracefully jexit();
jexit(); }
} catch(Exception $e)
break; {
} // stop execution gracefully
} jexit();
else }
{ break;
// stop execution gracefully }
jexit(); }
} else
} {
// stop execution gracefully
protected function getHelpDocumentText($id) jexit();
{ }
$db = JFactory::getDbo(); }
$query = $db->getQuery(true);
$query->select(array('a.title','a.content')); protected function getHelpDocumentText($id)
$query->from('#__sermondistributor_help_document AS a'); {
$query->where('a.id = '.(int) $id); $db = Factory::getDbo();
$query->where('a.published = 1'); $query = $db->getQuery(true);
$db->setQuery($query); $query->select(array('a.title','a.content'));
$db->execute(); $query->from('#__sermondistributor_help_document AS a');
if($db->getNumRows()) $query->where('a.id = '.(int) $id);
{ $query->where('a.published = 1');
$text = array(); $db->setQuery($query);
$document = $db->loadObject(); $db->execute();
// fix image issue if($db->getNumRows())
$images['src="images'] = 'src="'.JURI::root().'images'; {
$images["src='images"] = "src='".JURI::root()."images"; $text = [];
$images['src="/images'] = 'src="'.JURI::root().'images'; $document = $db->loadObject();
$images["src='/images"] = "src='".JURI::root()."images"; // fix image issue
// set document template $images['src="images'] = 'src="'.Uri::root().'images';
$text[] = "<!doctype html>"; $images["src='images"] = "src='".Uri::root()."images";
$text[] = '<html>'; $images['src="/images'] = 'src="'.Uri::root().'images';
$text[] = "<head>"; $images["src='/images"] = "src='".Uri::root()."images";
$text[] = '<meta charset="utf-8">'; // set document template
$text[] = "<title>".$document->title."</title>"; $text[] = "<!doctype html>";
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_sermondistributor/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>'; $text[] = '<html>';
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_sermondistributor/uikit/js/uikit.min.js"></script>'; $text[] = "<head>";
$text[] = "</head>"; $text[] = '<meta charset="utf-8">';
$text[] = '<body><br />'; $text[] = "<title>".$document->title."</title>";
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">'; $text[] = '<link type="text/css" href="'.Uri::root().'media/com_sermondistributor/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">'; $text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_sermondistributor/uikit/js/uikit.min.js"></script>';
// build the help text $text[] = "</head>";
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>"; $text[] = '<body><br />';
$text[] = str_replace(array_keys($images),array_values($images),$document->content); $text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
// end template $text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
$text[] = '</div><br /><br />'; // build the help text
$text[] = '</div>'; $text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
$text[] = "</body>"; $text[] = str_replace(array_keys($images),array_values($images),$document->content);
$text[] = "</html>"; // end template
$text[] = '</div><br /><br />';
return implode("\n",$text); $text[] = '</div>';
} $text[] = "</body>";
return false; $text[] = "</html>";
}
} return implode("\n",$text);
}
return false;
}
}

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_document.php @subpackage help_document.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Help_document Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerHelp_document extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Help_document Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerHelp_document extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('help_document.access', 'com_sermondistributor'); $access = $user->authorise('help_document.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,30 +81,30 @@ class SermondistributorControllerHelp_document extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('help_document.create', $this->option); return $user->authorise('help_document.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor')); $access = ($user->authorise('help_document.access', 'com_sermondistributor.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -138,199 +145,198 @@ class SermondistributorControllerHelp_document extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('help_document.edit', $this->option); return $user->authorise('help_document.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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('Help_document', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Help_document', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage help_documents.php @subpackage help_documents.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Help_documents Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerHelp_documents extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Help_documents Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerHelp_documents extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Help_document', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Help_document', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
$model = $this->getModel('Help_documents'); $model = $this->getModel('Help_documents');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents'); SermondistributorHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerHelp_documents extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Help_documents'); $model = $this->getModel('Help_documents');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('help_document_VDM_IMPORTHEADERS', $headers); $session->set('help_document_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'help_documents'); $session->set('backto_VDM_IMPORT', 'help_documents');
$session->set('dataType_VDM_IMPORTINTO', 'help_document'); $session->set('dataType_VDM_IMPORTINTO', 'help_document');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=help_documents', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,68 +1,73 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage import.php @subpackage import.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\BaseController;
* Sermondistributor Import Controller use Joomla\CMS\Router\Route;
*/ use Joomla\CMS\Session\Session;
class SermondistributorControllerImport extends JControllerLegacy use Joomla\Utilities\ArrayHelper;
{
/** /**
* Import an spreadsheet. * Sermondistributor Import Base Controller
* */
* @return void class SermondistributorControllerImport extends BaseController
*/ {
public function import() /**
{ * Import an spreadsheet.
// Check for request forgeries *
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); * @return void
*/
$model = $this->getModel('import'); public function import()
if ($model->import()) {
{ // Check for request forgeries
$cache = JFactory::getCache('mod_menu'); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits $model = $this->getModel('import');
} if ($model->import())
{
$app = JFactory::getApplication(); $cache = Factory::getCache('mod_menu');
$redirect_url = $app->getUserState('com_sermondistributor.redirect_url'); $cache->clean();
if (empty($redirect_url)) // TODO: Reset the users acl here as well to kill off any missing bits
{ }
$redirect_url = JRoute::_('index.php?option=com_sermondistributor&view=import', false);
} $app = Factory::getApplication();
else $redirect_url = $app->getUserState('com_sermondistributor.redirect_url');
{ if (empty($redirect_url))
// wipe out the user state when we're going to redirect {
$app->setUserState('com_sermondistributor.redirect_url', ''); $redirect_url = Route::_('index.php?option=com_sermondistributor&view=import', false);
$app->setUserState('com_sermondistributor.message', ''); }
$app->setUserState('com_sermondistributor.extension_message', ''); else
} {
$this->setRedirect($redirect_url); // wipe out the user state when we're going to redirect
} $app->setUserState('com_sermondistributor.redirect_url', '');
} $app->setUserState('com_sermondistributor.message', '');
$app->setUserState('com_sermondistributor.extension_message', '');
}
$this->setRedirect($redirect_url);
}
}

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage local_listing.php @subpackage local_listing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Local_listing Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerLocal_listing extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Local_listing Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerLocal_listing extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Local_listings'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Local_listings'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('local_listing.access', 'com_sermondistributor'); $access = $user->authorise('local_listing.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,30 +81,30 @@ class SermondistributorControllerLocal_listing extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('local_listing.create', $this->option); return $user->authorise('local_listing.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $recordId) && $user->authorise('local_listing.access', 'com_sermondistributor')); $access = ($user->authorise('local_listing.access', 'com_sermondistributor.local_listing.' . (int) $recordId) && $user->authorise('local_listing.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -138,199 +145,198 @@ class SermondistributorControllerLocal_listing extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('local_listing.edit', $this->option); return $user->authorise('local_listing.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Local_listing', '', []);
// Preset the redirect
$this->setRedirect(Route::_('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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage local_listings.php @subpackage local_listings.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Local_listings Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerLocal_listings extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Local_listings Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerLocal_listings extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Local_listing', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Local_listing', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerLocal_listings extends JControllerAdmin
$model = $this->getModel('Local_listings'); $model = $this->getModel('Local_listings');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Local_listings_'.$date->format('jS_F_Y'),'Local listings exported ('.$date->format('jS F, Y').')','local listings'); 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. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerLocal_listings extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('local_listing.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('local_listing.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Local_listings'); $model = $this->getModel('Local_listings');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('local_listing_VDM_IMPORTHEADERS', $headers); $session->set('local_listing_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'local_listings'); $session->set('backto_VDM_IMPORT', 'local_listings');
$session->set('dataType_VDM_IMPORTINTO', 'local_listing'); $session->set('dataType_VDM_IMPORTINTO', 'local_listing');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_LOCAL_LISTINGS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=local_listings', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,59 +1,71 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage manual_updater.php @subpackage manual_updater.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Manual_updater Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerManual_updater extends JControllerAdmin use Joomla\CMS\Session\Session;
{
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_MANUAL_UPDATER'; /**
/** * Manual_updater Admin Controller
* Proxy for getModel. */
* @since 2.5 class SermondistributorControllerManual_updater extends AdminController
*/ {
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = array()) /**
{ * The prefix to use with controller messages.
$model = parent::getModel($name, $prefix, array('ignore_request' => true)); *
* @var string
return $model; * @since 1.6
} */
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_MANUAL_UPDATER';
public function dashboard()
{ /**
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor', false)); * Proxy for getModel.
return; * @since 2.5
*/
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = [])
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
} }
public function gotoExternalSources() public function dashboard()
{
$this->setRedirect(Route::_('index.php?option=com_sermondistributor', false));
return;
}
public function gotoExternalSources()
{ {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=external_sources', false)); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=external_sources', false));
return; return;
} }
} }

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preacher.php @subpackage preacher.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Preacher Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerPreacher extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Preacher Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerPreacher extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Preachers'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Preachers'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('preacher.access', 'com_sermondistributor'); $access = $user->authorise('preacher.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,30 +81,30 @@ class SermondistributorControllerPreacher extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('preacher.create', $this->option); return $user->authorise('preacher.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor')); $access = ($user->authorise('preacher.access', 'com_sermondistributor.preacher.' . (int) $recordId) && $user->authorise('preacher.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -138,199 +145,198 @@ class SermondistributorControllerPreacher extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('preacher.edit', $this->option); return $user->authorise('preacher.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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('Preacher', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Preacher', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage preachers.php @subpackage preachers.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Preachers Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerPreachers extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Preachers Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerPreachers extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_PREACHERS'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_PREACHERS';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Preacher', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Preacher', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerPreachers extends JControllerAdmin
$model = $this->getModel('Preachers'); $model = $this->getModel('Preachers');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers'); SermondistributorHelper::xls($data,'Preachers_'.$date->format('jS_F_Y'),'Preachers exported ('.$date->format('jS F, Y').')','preachers');
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerPreachers extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Preachers'); $model = $this->getModel('Preachers');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('preacher_VDM_IMPORTHEADERS', $headers); $session->set('preacher_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'preachers'); $session->set('backto_VDM_IMPORT', 'preachers');
$session->set('dataType_VDM_IMPORTINTO', 'preacher'); $session->set('dataType_VDM_IMPORTINTO', 'preacher');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_PREACHERS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=preachers', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series.php @subpackage series.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Series Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerSeries extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Series Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerSeries extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Series_list'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Series_list'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('series.access', 'com_sermondistributor'); $access = $user->authorise('series.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,30 +81,30 @@ class SermondistributorControllerSeries extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('series.create', $this->option); return $user->authorise('series.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor')); $access = ($user->authorise('series.access', 'com_sermondistributor.series.' . (int) $recordId) && $user->authorise('series.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -138,199 +145,198 @@ class SermondistributorControllerSeries extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('series.edit', $this->option); return $user->authorise('series.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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('Series', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Series', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage series_list.php @subpackage series_list.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Series_list Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerSeries_list extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Series_list Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerSeries_list extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERIES_LIST'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERIES_LIST';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Series', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Series', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
$model = $this->getModel('Series_list'); $model = $this->getModel('Series_list');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list'); SermondistributorHelper::xls($data,'Series_list_'.$date->format('jS_F_Y'),'Series list exported ('.$date->format('jS F, Y').')','series list');
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerSeries_list extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Series_list'); $model = $this->getModel('Series_list');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('series_VDM_IMPORTHEADERS', $headers); $session->set('series_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'series_list'); $session->set('backto_VDM_IMPORT', 'series_list');
$session->set('dataType_VDM_IMPORTINTO', 'series'); $session->set('dataType_VDM_IMPORTINTO', 'series');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERIES_LIST');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=series_list', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermon.php @subpackage sermon.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Sermon Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerSermon extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Sermon Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerSermon extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Sermons'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Sermons'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor'); $access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,23 +81,23 @@ class SermondistributorControllerSermon extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('sermon.create', $this->option); return $user->authorise('sermon.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ // get user object. { // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
@ -137,199 +144,198 @@ class SermondistributorControllerSermon extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('sermon.edit', $this->option); return $user->authorise('sermon.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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('Sermon', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Sermon', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,34 +1,41 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermondistributor.php @subpackage sermondistributor.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** use Joomla\CMS\Factory;
* Sermondistributor Controller use Joomla\CMS\Language\Text;
*/ use Joomla\CMS\MVC\Controller\AdminController;
class SermondistributorControllerSermondistributor extends JControllerAdmin use Joomla\Utilities\ArrayHelper;
{ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
}
/**
* Sermondistributor Admin Controller
*/
class SermondistributorControllerSermondistributor extends AdminController
{
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons.php @subpackage sermons.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Sermons Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerSermons extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Sermons Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerSermons extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERMONS'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERMONS';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Sermon', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Sermon', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerSermons extends JControllerAdmin
$model = $this->getModel('Sermons'); $model = $this->getModel('Sermons');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons'); SermondistributorHelper::xls($data,'Sermons_'.$date->format('jS_F_Y'),'Sermons exported ('.$date->format('jS F, Y').')','sermons');
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerSermons extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Sermons'); $model = $this->getModel('Sermons');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('sermon_VDM_IMPORTHEADERS', $headers); $session->set('sermon_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'sermons'); $session->set('backto_VDM_IMPORT', 'sermons');
$session->set('dataType_VDM_IMPORTINTO', 'sermon'); $session->set('dataType_VDM_IMPORTINTO', 'sermon');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_SERMONS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=sermons', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,72 +1,79 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistic.php @subpackage statistic.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\FormController;
* Statistic Controller use Joomla\CMS\MVC\Model\BaseDatabaseModel;
*/ use Joomla\Utilities\ArrayHelper;
class SermondistributorControllerStatistic extends JControllerForm use Joomla\CMS\Router\Route;
{ use Joomla\CMS\Session\Session;
/** use Joomla\CMS\Uri\Uri;
* Current or most recently performed task.
* /**
* @var string * Statistic Form Controller
* @since 12.2 */
* @note Replaces _task. class SermondistributorControllerStatistic extends FormController
*/ {
protected $task; /**
* Current or most recently performed task.
/** *
* Class constructor. * @var string
* * @since 12.2
* @param array $config A named array of configuration variables. * @note Replaces _task.
* */
* @since 1.6 protected $task;
*/
public function __construct($config = array()) /**
{ * Class constructor.
$this->view_list = 'Statistics'; // safeguard for setting the return view listing to the main view. *
parent::__construct($config); * @param array $config A named array of configuration variables.
} *
* @since 1.6
/** */
* Method override to check if you can add a new record. public function __construct($config = [])
* {
* @param array $data An array of input data. $this->view_list = 'Statistics'; // safeguard for setting the return view listing to the main view.
* parent::__construct($config);
* @return boolean }
*
* @since 1.6 /**
*/ * Method override to check if you can add a new record.
protected function allowAdd($data = array()) *
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{ {
// Get user object. // Get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Access check. // Access check.
$access = $user->authorise('statistic.access', 'com_sermondistributor'); $access = $user->authorise('statistic.access', 'com_sermondistributor');
if (!$access) if (!$access)
@ -74,30 +81,30 @@ class SermondistributorControllerStatistic extends JControllerForm
return false; return false;
} }
// In the absense of better information, revert to the component permissions. // In the absence of better information, revert to the component permissions.
return $user->authorise('statistic.create', $this->option); return $user->authorise('statistic.create', $this->option);
} }
/** /**
* Method override to check if you can edit an existing record. * Method override to check if you can edit an existing record.
* *
* @param array $data An array of input data. * @param array $data An array of input data.
* @param string $key The name of the key for the primary key. * @param string $key The name of the key for the primary key.
* *
* @return boolean * @return boolean
* *
* @since 1.6 * @since 1.6
*/ */
protected function allowEdit($data = array(), $key = 'id') protected function allowEdit($data = [], $key = 'id')
{ {
// get user object. // get user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// get record id. // get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0; $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check. // Access check.
$access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor')); $access = ($user->authorise('statistic.access', 'com_sermondistributor.statistic.' . (int) $recordId) && $user->authorise('statistic.access', 'com_sermondistributor'));
if (!$access) if (!$access)
{ {
return false; return false;
@ -138,199 +145,198 @@ class SermondistributorControllerStatistic extends JControllerForm
} }
} }
// Since there is no permission, revert to the component permissions. // Since there is no permission, revert to the component permissions.
return $user->authorise('statistic.edit', $this->option); return $user->authorise('statistic.edit', $this->option);
} }
/** /**
* Gets the URL arguments to append to an item redirect. * Gets the URL arguments to append to an item redirect.
* *
* @param integer $recordId The primary key id for the item. * @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id. * @param string $urlVar The name of the URL variable for the id.
* *
* @return string The arguments to append to the redirect URL. * @return string The arguments to append to the redirect URL.
* *
* @since 1.6 * @since 1.6
*/ */
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
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('Statistic', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$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
)
);
}
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; // get the referral options (old method use return instead see parent)
} $ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
}
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Statistic', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics' . $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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, 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 referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -1,71 +1,78 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage statistics.php @subpackage statistics.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/** use Joomla\CMS\MVC\Controller\AdminController;
* Statistics Controller use Joomla\Utilities\ArrayHelper;
*/ use Joomla\CMS\Router\Route;
class SermondistributorControllerStatistics extends JControllerAdmin use Joomla\CMS\Session\Session;
{ use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/** use VDM\Joomla\Utilities\ObjectHelper;
* The prefix to use with controller messages.
* /**
* @var string * Statistics Admin Controller
* @since 1.6 */
*/ class SermondistributorControllerStatistics extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_STATISTICS'; {
/**
/** * The prefix to use with controller messages.
* Method to get a model object, loading it if required. *
* * @var string
* @param string $name The model name. Optional. * @since 1.6
* @param string $prefix The class prefix. Optional. */
* @param array $config Configuration array for model. Optional. protected $text_prefix = 'COM_SERMONDISTRIBUTOR_STATISTICS';
*
* @return JModelLegacy The model. /**
* * Method to get a model object, loading it if required.
* @since 1.6 *
*/ * @param string $name The model name. Optional.
public function getModel($name = 'Statistic', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true)) * @param string $prefix The class prefix. Optional.
{ * @param array $config Configuration array for model. Optional.
return parent::getModel($name, $prefix, $config); *
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Statistic', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} }
public function exportData() public function exportData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user. // check if export is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor')) if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{ {
// Get the input // Get the input
$input = JFactory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
$pks = ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
@ -73,16 +80,16 @@ class SermondistributorControllerStatistics extends JControllerAdmin
$model = $this->getModel('Statistics'); $model = $this->getModel('Statistics');
// get the data to export // get the data to export
$data = $model->getExportData($pks); $data = $model->getExportData($pks);
if (SermondistributorHelper::checkArray($data)) if (UtilitiesArrayHelper::check($data))
{ {
// now set the data to the spreadsheet // now set the data to the spreadsheet
$date = JFactory::getDate(); $date = Factory::getDate();
SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics'); SermondistributorHelper::xls($data,'Statistics_'.$date->format('jS_F_Y'),'Statistics exported ('.$date->format('jS F, Y').')','statistics');
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return; return;
} }
@ -90,32 +97,32 @@ class SermondistributorControllerStatistics extends JControllerAdmin
public function importData() public function importData()
{ {
// Check for request forgeries // Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user. // check if import is allowed for this user.
$user = JFactory::getUser(); $user = Factory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor')) if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{ {
// Get the import model // Get the import model
$model = $this->getModel('Statistics'); $model = $this->getModel('Statistics');
// get the headers to import // get the headers to import
$headers = $model->getExImPortHeaders(); $headers = $model->getExImPortHeaders();
if (SermondistributorHelper::checkObject($headers)) if (ObjectHelper::check($headers))
{ {
// Load headers to session. // Load headers to session.
$session = JFactory::getSession(); $session = Factory::getSession();
$headers = json_encode($headers); $headers = json_encode($headers);
$session->set('statistic_VDM_IMPORTHEADERS', $headers); $session->set('statistic_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'statistics'); $session->set('backto_VDM_IMPORT', 'statistics');
$session->set('dataType_VDM_IMPORTINTO', 'statistic'); $session->set('dataType_VDM_IMPORTINTO', 'statistic');
// Redirect to import view. // Redirect to import view.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_SELECT_FILE_FOR_STATISTICS');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=import', false), $message); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=import', false), $message);
return; return;
} }
} }
// Redirect to the list screen with error. // Redirect to the list screen with error.
$message = JText::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED'); $message = Text::_('COM_SERMONDISTRIBUTOR_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_sermondistributor&view=statistics', false), $message, 'error');
return; return;
} }
} }

View File

@ -1,84 +1,102 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage headercheck.php @subpackage headercheck.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
class sermondistributorHeaderCheck use Joomla\CMS\Factory;
{
function js_loaded($script_name) class sermondistributorHeaderCheck
{ {
// UIkit check point protected $document = null;
if (strpos($script_name,'uikit') !== false) protected $app = null;
{
$app = JFactory::getApplication(); function js_loaded($script_name)
$getTemplateName = $app->getTemplate('template')->template; {
// UIkit check point
if (strpos($getTemplateName,'yoo') !== false) if (strpos($script_name,'uikit') !== false)
{ {
return true; if (!$this->app)
} {
} $this->app = Factory::getApplication();
}
$document = JFactory::getDocument();
$head_data = $document->getHeadData(); $getTemplateName = $this->app->getTemplate('template')->template;
foreach (array_keys($head_data['scripts']) as $script) if (strpos($getTemplateName,'yoo') !== false)
{ {
if (stristr($script, $script_name)) return true;
{ }
return true; }
}
} if (!$this->document)
{
return false; $this->document = Factory::getDocument();
} }
function css_loaded($script_name) $head_data = $this->document->getHeadData();
{ foreach (array_keys($head_data['scripts']) as $script)
// UIkit check point {
if (strpos($script_name,'uikit') !== false) if (stristr($script, $script_name))
{ {
$app = JFactory::getApplication(); return true;
$getTemplateName = $app->getTemplate('template')->template; }
}
if (strpos($getTemplateName,'yoo') !== false)
{ return false;
return true; }
}
} function css_loaded($script_name)
{
$document = JFactory::getDocument(); // UIkit check point
$head_data = $document->getHeadData(); if (strpos($script_name,'uikit') !== false)
{
foreach (array_keys($head_data['styleSheets']) as $script) if (!$this->app)
{ {
if (stristr($script, $script_name)) $this->app = Factory::getApplication();
{ }
return true;
} $getTemplateName = $this->app->getTemplate('template')->template;
} if (strpos($getTemplateName,'yoo') !== false)
{
return false; return true;
} }
} }
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['styleSheets']) as $script)
{
if (stristr($script, $script_name))
{
return true;
}
}
return false;
}
}

View File

@ -1,91 +1,91 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage batch_.php @subpackage batch_.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('JPATH_PLATFORM') or die; defined('JPATH_PLATFORM') or die;
/** /**
* Utility class to render a list view batch selection options * Utility class to render a list view batch selection options
* *
* @since 3.0 * @since 3.0
*/ */
abstract class JHtmlBatch_ abstract class JHtmlBatch_
{ {
/** /**
* ListSelection * ListSelection
* *
* @var array * @var array
* @since 3.0 * @since 3.0
*/ */
protected static $ListSelection = array(); protected static $ListSelection = [];
/** /**
* Render the batch selection options. * Render the batch selection options.
* *
* @return string The necessary HTML to display the batch selection options * @return string The necessary HTML to display the batch selection options
* *
* @since 3.0 * @since 3.0
*/ */
public static function render() public static function render()
{ {
// Collect display data // Collect display data
$data = new stdClass; $data = new stdClass;
$data->ListSelection = static::getListSelection(); $data->ListSelection = static::getListSelection();
// Create a layout object and ask it to render the batch selection options // Create a layout object and ask it to render the batch selection options
$layout = new JLayoutFile('batchselection'); $layout = new JLayoutFile('batchselection');
$batchHtml = $layout->render($data); $batchHtml = $layout->render($data);
return $batchHtml; return $batchHtml;
} }
/** /**
* Method to add a list selection to the batch modal * Method to add a list selection to the batch modal
* *
* @param string $label Label for the menu item. * @param string $label Label for the menu item.
* @param string $name Name for the filter. Also used as id. * @param string $name Name for the filter. Also used as id.
* @param string $options Options for the select field. * @param string $options Options for the select field.
* @param bool $noDefault Don't the label as the empty option * @param bool $noDefault Don't the label as the empty option
* *
* @return void * @return void
* *
* @since 3.0 * @since 3.0
*/ */
public static function addListSelection($label, $name, $options, $noDefault = false) public static function addListSelection($label, $name, $options, $noDefault = false)
{ {
array_push(static::$ListSelection, array('label' => $label, 'name' => $name, 'options' => $options, 'noDefault' => $noDefault)); array_push(static::$ListSelection, array('label' => $label, 'name' => $name, 'options' => $options, 'noDefault' => $noDefault));
} }
/** /**
* Returns an array of all ListSelection * Returns an array of all ListSelection
* *
* @return array * @return array
* *
* @since 3.0 * @since 3.0
*/ */
public static function getListSelection() public static function getListSelection()
{ {
return static::$ListSelection; return static::$ListSelection;
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ COM_SERMONDISTRIBUTOR_EXPORT_DATA_DESC="Allows users in this group to export dat
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS="External Sources Access" 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_ACCESS_DESC="Allows the users in this group to access access external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE="External Sources Batch Use" 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_BATCH_USE_DESC="Allows the 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="External Sources Create"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE_DESC="Allows the users in this group to create create external sources" 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="External Sources Dashboard Add"
@ -35,7 +35,7 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OWN_DESC="Allows the users in this g
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_STATE="External Sources Edit State" 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_STATE_DESC="Allows the users in this group to update the state of the external source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION="External Sources Edit Version" 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_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT="External Sources Export" 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_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="External Sources Import"
@ -49,7 +49,7 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS_DESC="Al
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS="Help Documents Access" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS="Help Documents Access"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE="Help Documents Create" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
@ -63,7 +63,7 @@ COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_OWN_DESC="Allows the users in this gro
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE="Help Documents Edit State" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE="Help Documents Edit State"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the help document" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the help document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION="Help Documents Edit Version" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION="Help Documents Edit Version"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version help documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT="Help Documents Export" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT="Help Documents Export"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT_DESC="Allows the users in this group to export export help documents" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EXPORT_DESC="Allows the users in this group to export export help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_IMPORT="Help Documents Import" COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_IMPORT="Help Documents Import"
@ -75,7 +75,7 @@ COM_SERMONDISTRIBUTOR_IMPORT_DATA_DESC="Allows users in this group to import dat
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS="Local Listings Access" 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_ACCESS_DESC="Allows the users in this group to access access local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_BATCH_USE="Local Listings Batch Use" 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_BATCH_USE_DESC="Allows the 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="Local Listings Create"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_CREATE_DESC="Allows the users in this group to create create local listings" 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="Local Listings Dashboard List"
@ -105,7 +105,7 @@ COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_STATE_DESC="Allows the users in this g
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL="Local Listings Edit Url" COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL="Local Listings Edit Url"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL_DESC="Allows the users in this group to edit url of local listing" COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_URL_DESC="Allows the users in this group to edit url of local listing"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION="Local Listings Edit Version" 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_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT="Local Listings Export" 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_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="Local Listings Import"
@ -147,7 +147,7 @@ COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_DESC="Allows the users in this group to a
COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE="Preachers (Site) Access" COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE="Preachers (Site) Access"
COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE_DESC="Allows the users in this group to access site preachers." COM_SERMONDISTRIBUTOR_PREACHERS_ACCESS_SITE_DESC="Allows the users in this group to access site preachers."
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE="Preachers Batch Use" COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE="Preachers Batch Use"
COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch preachers" COM_SERMONDISTRIBUTOR_PREACHERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_CREATE="Preachers Create" COM_SERMONDISTRIBUTOR_PREACHERS_CREATE="Preachers Create"
COM_SERMONDISTRIBUTOR_PREACHERS_CREATE_DESC="Allows the users in this group to create create preachers" COM_SERMONDISTRIBUTOR_PREACHERS_CREATE_DESC="Allows the users in this group to create create preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_DASHBOARD_ADD="Preachers Dashboard Add" COM_SERMONDISTRIBUTOR_PREACHERS_DASHBOARD_ADD="Preachers Dashboard Add"
@ -167,7 +167,7 @@ COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_OWN_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE="Preachers Edit State" COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE="Preachers Edit State"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the preacher" COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the preacher"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION="Preachers Edit Version" COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION="Preachers Edit Version"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version preachers" COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT="Preachers Export" COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT="Preachers Export"
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT_DESC="Allows the users in this group to export export preachers" COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT_DESC="Allows the users in this group to export export preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_IMPORT="Preachers Import" COM_SERMONDISTRIBUTOR_PREACHERS_IMPORT="Preachers Import"
@ -183,7 +183,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE="Series List (Site) Access" COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE="Series List (Site) Access"
COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE_DESC="Allows the users in this group to access site series list." COM_SERMONDISTRIBUTOR_SERIES_LIST_ACCESS_SITE_DESC="Allows the users in this group to access site series list."
COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE="Series List Batch Use" COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE="Series List Batch Use"
COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch series list" COM_SERMONDISTRIBUTOR_SERIES_LIST_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE="Series List Create" COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE="Series List Create"
COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE_DESC="Allows the users in this group to create create series list" COM_SERMONDISTRIBUTOR_SERIES_LIST_CREATE_DESC="Allows the users in this group to create create series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_DASHBOARD_ADD="Series List Dashboard Add" COM_SERMONDISTRIBUTOR_SERIES_LIST_DASHBOARD_ADD="Series List Dashboard Add"
@ -203,7 +203,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_OWN_DESC="Allows the users in this group
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE="Series List Edit State" COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE="Series List Edit State"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE_DESC="Allows the users in this group to update the state of the series" COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_STATE_DESC="Allows the users in this group to update the state of the series"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION="Series List Edit Version" COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION="Series List Edit Version"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows users in this group to edit versions of version series list" COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT="Series List Export" COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT="Series List Export"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT_DESC="Allows the users in this group to export export series list" COM_SERMONDISTRIBUTOR_SERIES_LIST_EXPORT_DESC="Allows the users in this group to export export series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_IMPORT="Series List Import" COM_SERMONDISTRIBUTOR_SERIES_LIST_IMPORT="Series List Import"
@ -213,7 +213,7 @@ COM_SERMONDISTRIBUTOR_SERIES_LIST_SUBMENU_DESC="Allows the users in this group t
COM_SERMONDISTRIBUTOR_SERMONS_ACCESS="Sermons Access" COM_SERMONDISTRIBUTOR_SERMONS_ACCESS="Sermons Access"
COM_SERMONDISTRIBUTOR_SERMONS_ACCESS_DESC="Allows the users in this group to access access sermons" COM_SERMONDISTRIBUTOR_SERMONS_ACCESS_DESC="Allows the users in this group to access access sermons"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE="Sermons Batch Use" COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE="Sermons Batch Use"
COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch sermons" COM_SERMONDISTRIBUTOR_SERMONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch sermons"
COM_SERMONDISTRIBUTOR_SERMONS_CREATE="Sermons Create" COM_SERMONDISTRIBUTOR_SERMONS_CREATE="Sermons Create"
COM_SERMONDISTRIBUTOR_SERMONS_CREATE_DESC="Allows the users in this group to create create sermons" COM_SERMONDISTRIBUTOR_SERMONS_CREATE_DESC="Allows the users in this group to create create sermons"
COM_SERMONDISTRIBUTOR_SERMONS_DASHBOARD_ADD="Sermons Dashboard Add" COM_SERMONDISTRIBUTOR_SERMONS_DASHBOARD_ADD="Sermons Dashboard Add"
@ -233,7 +233,7 @@ COM_SERMONDISTRIBUTOR_SERMONS_EDIT_OWN_DESC="Allows the users in this group to e
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE="Sermons Edit State" COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE="Sermons Edit State"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the sermon" COM_SERMONDISTRIBUTOR_SERMONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the sermon"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION="Sermons Edit Version" COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION="Sermons Edit Version"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version sermons" COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version sermons"
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT="Sermons Export" COM_SERMONDISTRIBUTOR_SERMONS_EXPORT="Sermons Export"
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT_DESC="Allows the users in this group to export export sermons" COM_SERMONDISTRIBUTOR_SERMONS_EXPORT_DESC="Allows the users in this group to export export sermons"
COM_SERMONDISTRIBUTOR_SERMONS_IMPORT="Sermons Import" COM_SERMONDISTRIBUTOR_SERMONS_IMPORT="Sermons Import"
@ -245,7 +245,7 @@ COM_SERMONDISTRIBUTOR_SERMON_ACCESS_SITE_DESC="Allows the users in this group to
COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS="Statistics Access" COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS="Statistics Access"
COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS_DESC="Allows the users in this group to access access statistics" COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS_DESC="Allows the users in this group to access access statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE="Statistics Batch Use" COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE="Statistics Batch Use"
COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch statistics" COM_SERMONDISTRIBUTOR_STATISTICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_CREATE="Statistics Create" COM_SERMONDISTRIBUTOR_STATISTICS_CREATE="Statistics Create"
COM_SERMONDISTRIBUTOR_STATISTICS_CREATE_DESC="Allows the users in this group to create create statistics" COM_SERMONDISTRIBUTOR_STATISTICS_CREATE_DESC="Allows the users in this group to create create statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_DASHBOARD_LIST="Statistics Dashboard List" COM_SERMONDISTRIBUTOR_STATISTICS_DASHBOARD_LIST="Statistics Dashboard List"
@ -263,7 +263,7 @@ COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_OWN_DESC="Allows the users in this group t
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE="Statistics Edit State" COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE="Statistics Edit State"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE_DESC="Allows the users in this group to update the state of the statistic" COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_STATE_DESC="Allows the users in this group to update the state of the statistic"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION="Statistics Edit Version" COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION="Statistics Edit Version"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version statistics" COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT="Statistics Export" COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT="Statistics Export"
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT_DESC="Allows the users in this group to export export statistics" COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT_DESC="Allows the users in this group to export export statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_IMPORT="Statistics Import" COM_SERMONDISTRIBUTOR_STATISTICS_IMPORT="Statistics Import"

View File

@ -1,61 +1,62 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage batchselection.php @subpackage batchselection.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('JPATH_BASE') or die; defined('JPATH_BASE') or die;
JHtmlBehavior::core(); use Joomla\CMS\Language\Text;
$divWrapper = range(1,120,2); JHtmlBehavior::core();
$counter = 0; $divWrapper = range(1,120,2);
?> $counter = 0;
<?php if ($displayData->ListSelection) : ?> ?>
<div class="row-fluid"> <?php if ($displayData->ListSelection) : ?>
<?php foreach ($displayData->ListSelection as $ListSelection) : ?> <div class="row-fluid">
<div class="control-group span6"> <?php foreach ($displayData->ListSelection as $ListSelection) : ?>
<div class="controls"> <div class="control-group span6">
<label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label> <div class="controls">
<select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small"> <label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label>
<?php if (!$ListSelection['noDefault']) : ?> <select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small">
<option value=""><?php echo $ListSelection['label']; ?></option> <?php if (!$ListSelection['noDefault']) : ?>
<?php endif; ?> <option value=""><?php echo $ListSelection['label']; ?></option>
<?php echo $ListSelection['options']; ?> <?php endif; ?>
</select> <?php echo $ListSelection['options']; ?>
</div> </select>
</div> </div>
<?php if (in_array($counter,$divWrapper)) : ?> </div>
</div> <?php if (in_array($counter,$divWrapper)) : ?>
<div class="row-fluid"> </div>
<?php endif; ?> <div class="row-fluid">
<?php $counter++; ?> <?php endif; ?>
<?php endforeach; ?> <?php $counter++; ?>
</div> <?php endforeach; ?>
<div class="control-group radio" id="batch-move-copy"> </div>
<div class="controls"> <div class="control-group radio" id="batch-move-copy">
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c"> <div class="controls">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo JText::_('Copy'); ?></label> <label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m"> <input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo Text::_('Copy'); ?></label>
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo JText::_('Update'); ?></label> <label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
</div> <input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo Text::_('Update'); ?></label>
</div> </div>
</div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage build_option_fullwidth.php @subpackage build_option_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'build', 'build',
'note_manual_externalsource', 'note_manual_externalsource',
'note_auto_externalsource' 'note_auto_externalsource'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description', 'description',
'externalsources' 'externalsources'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'sharedurl', 'sharedurl',
'folder', 'folder',
'apicronjob_note' 'apicronjob_note'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'oauthtoken', 'oauthtoken',
'generated_access_token_note', 'generated_access_token_note',
'permissiontype', 'permissiontype',
'app_limitation_note', 'app_limitation_note',
'dropboxoptions' 'dropboxoptions'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'update_method', 'update_method',
'update_timer', 'update_timer',
'filetypes' 'filetypes'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_under.php @subpackage details_under.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'not_required' 'not_required'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
'modified', 'modified',
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publlshing.php @subpackage publlshing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'published', 'published',
'ordering', 'ordering',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'content' 'content'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'target', 'target',
'groups', 'groups',
'location', 'location',
'admin_view', 'admin_view',
'site_view' 'site_view'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'type', 'type',
'url', 'url',
'article' 'article'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_under.php @subpackage details_under.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'not_required' 'not_required'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,54 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); use Joomla\CMS\Language\Text;
// JLayout for standard handling of metadata fields in the administrator content edit screens. $form = $displayData->getForm();
$fieldSets = $form->getFieldsets('metadata');
?> // JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?> ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p> <?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php endif; ?> <?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php <?php endif; ?>
// Include the real fields in this panel.
if ($name == 'vdmmetadata') <?php
{ // Include the real fields in this panel.
echo $form->renderField('metadesc'); if ($name == 'vdmmetadata')
echo $form->renderField('metakey'); {
} echo $form->renderField('metadesc');
echo $form->renderField('metakey');
foreach ($form->getFieldset($name) as $field) }
{
if ($field->name != 'jform[metadata][tags][]') foreach ($form->getFieldset($name) as $field)
{ {
echo $field->renderField(); if ($field->name != 'jform[metadata][tags][]')
} {
} ?> echo $field->renderField();
<?php endforeach; ?> }
} ?>
<?php endforeach; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'created', 'created',
'created_by', 'created_by',
'modified', 'modified',
@ -48,17 +48,17 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'access', 'access',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'name', 'name',
'size' 'size'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'key', 'key',
'url' 'url'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'external_source' 'external_source'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'build' 'build'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
'modified', 'modified',
'modified_by' 'modified_by'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publlshing.php @subpackage publlshing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'published', 'published',
'ordering', 'ordering',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'name', 'name',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'icon' 'icon'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,56 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'email', 'email',
'website' 'website'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,54 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); use Joomla\CMS\Language\Text;
// JLayout for standard handling of metadata fields in the administrator content edit screens. $form = $displayData->getForm();
$fieldSets = $form->getFieldsets('metadata');
?> // JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?> ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p> <?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php endif; ?> <?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php <?php endif; ?>
// Include the real fields in this panel.
if ($name == 'vdmmetadata') <?php
{ // Include the real fields in this panel.
echo $form->renderField('metadesc'); if ($name == 'vdmmetadata')
echo $form->renderField('metakey'); {
} echo $form->renderField('metadesc');
echo $form->renderField('metakey');
foreach ($form->getFieldset($name) as $field) }
{
if ($field->name != 'jform[metadata][tags][]') foreach ($form->getFieldset($name) as $field)
{ {
echo $field->renderField(); if ($field->name != 'jform[metadata][tags][]')
} {
} ?> echo $field->renderField();
<?php endforeach; ?> }
} ?>
<?php endforeach; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
@ -49,17 +49,17 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'access', 'access',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,46 +1,52 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons_fullwidth.php @subpackage sermons_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// set the defaults use Joomla\CMS\Factory;
$items = $displayData->vvvsermons; use Joomla\CMS\Language\Text;
$user = JFactory::getUser(); use Joomla\CMS\HTML\HTMLHelper as Html;
$id = $displayData->item->id; use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vvvsermons;
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=preacher&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_sermondistributor&view=preacher&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (SermondistributorHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=preacher&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -54,46 +60,46 @@ $new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" .
// set the create new and close URL // set the create new and close URL
$close_new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; $close_new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// load the action object // load the action object
$can = SermondistributorHelper::getActions('sermon'); $can = SermondistributorHelper::getActions('sermon');
?> ?>
<div class="form-vertical"> <div class="form-vertical">
<?php if ($can->get('sermon.create')): ?> <?php if ($can->get('sermon.create')): ?>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a> <a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('preacher.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_CLOSE_NEW'); ?></a> <a class="btn btn-small" onclick="Joomla.submitbutton('preacher.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_CLOSE_NEW'); ?></a>
</div><br /><br /> </div><br /><br />
<?php endif; ?> <?php endif; ?>
<?php if (SermondistributorHelper::checkArray($items)): ?> <?php if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons"> <table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead> <thead>
<tr> <tr>
<th data-toggle="true"> <th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th> </th>
<th data-hide="all"> <th data-hide="all">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th> </th>
<th width="10" data-hide="phone,tablet"> <th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th> </th>
<th width="5" data-type="numeric" data-hide="phone,tablet"> <th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -101,7 +107,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons'); $canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?> ?>
<tr> <tr>
@ -109,7 +115,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php if ($canDo->get('sermon.edit')): ?> <?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->name); ?> <?php echo $displayData->escape($item->name); ?>
@ -119,7 +125,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php echo $displayData->escape($item->preacher_name); ?> <?php echo $displayData->escape($item->preacher_name); ?>
</td> </td>
<td> <td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> <?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a> <a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->series_name); ?> <?php echo $displayData->escape($item->series_name); ?>
@ -136,33 +142,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->link_type); ?> <?php echo Text::_($item->link_type); ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->source); ?> <?php echo Text::_($item->source); ?>
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-value="1"> <td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-value="2"> <td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-value="3"> <td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-value="4"> <td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -182,7 +188,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'name', 'name',
'alias' 'alias'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'icon' 'icon'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'scripture' 'scripture'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,54 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); use Joomla\CMS\Language\Text;
// JLayout for standard handling of metadata fields in the administrator content edit screens. $form = $displayData->getForm();
$fieldSets = $form->getFieldsets('metadata');
?> // JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?> ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p> <?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php endif; ?> <?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php <?php endif; ?>
// Include the real fields in this panel.
if ($name == 'vdmmetadata') <?php
{ // Include the real fields in this panel.
echo $form->renderField('metadesc'); if ($name == 'vdmmetadata')
echo $form->renderField('metakey'); {
} echo $form->renderField('metadesc');
echo $form->renderField('metakey');
foreach ($form->getFieldset($name) as $field) }
{
if ($field->name != 'jform[metadata][tags][]') foreach ($form->getFieldset($name) as $field)
{ {
echo $field->renderField(); if ($field->name != 'jform[metadata][tags][]')
} {
} ?> echo $field->renderField();
<?php endforeach; ?> }
} ?>
<?php endforeach; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
@ -49,17 +49,17 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'access', 'access',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,46 +1,52 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage sermons_fullwidth.php @subpackage sermons_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// set the defaults use Joomla\CMS\Factory;
$items = $displayData->vwcsermons; use Joomla\CMS\Language\Text;
$user = JFactory::getUser(); use Joomla\CMS\HTML\HTMLHelper as Html;
$id = $displayData->item->id; use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vwcsermons;
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit"; $edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=series&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_sermondistributor&view=series&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (SermondistributorHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=series&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -52,43 +58,43 @@ else
// set the create new URL // set the create new URL
$new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref; $new = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit" . $ref;
// load the action object // load the action object
$can = SermondistributorHelper::getActions('sermon'); $can = SermondistributorHelper::getActions('sermon');
?> ?>
<div class="form-vertical"> <div class="form-vertical">
<?php if ($can->get('sermon.create')): ?> <?php if ($can->get('sermon.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a><br /><br /> <a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_SERMONDISTRIBUTOR_NEW'); ?></a><br /><br />
<?php endif; ?> <?php endif; ?>
<?php if (SermondistributorHelper::checkArray($items)): ?> <?php if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons"> <table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead> <thead>
<tr> <tr>
<th data-toggle="true"> <th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th> </th>
<th data-hide="all"> <th data-hide="all">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th> </th>
<th width="10" data-hide="phone,tablet"> <th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th> </th>
<th width="5" data-type="numeric" data-hide="phone,tablet"> <th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -96,7 +102,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons'); $canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?> ?>
<tr> <tr>
@ -104,14 +110,14 @@ $can = SermondistributorHelper::getActions('sermon');
<?php if ($canDo->get('sermon.edit')): ?> <?php if ($canDo->get('sermon.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'sermons.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->name); ?> <?php echo $displayData->escape($item->name); ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> <?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a> <a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->preacher_name); ?> <?php echo $displayData->escape($item->preacher_name); ?>
@ -131,33 +137,33 @@ $can = SermondistributorHelper::getActions('sermon');
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->link_type); ?> <?php echo Text::_($item->link_type); ?>
</td> </td>
<td> <td>
<?php echo JText::_($item->source); ?> <?php echo Text::_($item->source); ?>
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-value="1"> <td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-value="2"> <td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-value="3"> <td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-value="4"> <td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -177,7 +183,7 @@ $can = SermondistributorHelper::getActions('sermon');
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -1,59 +1,59 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'name', 'name',
'alias', 'alias',
'preacher' 'preacher'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_fullwidth.php @subpackage details_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'scripture', 'scripture',
'short_description', 'short_description',
'icon' 'icon'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'series', 'series',
'catid', 'catid',
'tags' 'tags'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_under.php @subpackage details_under.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'not_required', 'not_required',
'auto_sermons' 'auto_sermons'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage files_fullwidth.php @subpackage files_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'link_type', 'link_type',
'note_link_directed', 'note_link_directed',
'note_link_encrypted', 'note_link_encrypted',
@ -48,19 +48,19 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'note_auto_externalsource', 'note_auto_externalsource',
'manual_files', 'manual_files',
'local_files', 'local_files',
'url' 'url'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical"> <div class="form-vertical">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,54 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); use Joomla\CMS\Language\Text;
// JLayout for standard handling of metadata fields in the administrator content edit screens. $form = $displayData->getForm();
$fieldSets = $form->getFieldsets('metadata');
?> // JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?> ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p> <?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php endif; ?> <?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php <?php endif; ?>
// Include the real fields in this panel.
if ($name == 'vdmmetadata') <?php
{ // Include the real fields in this panel.
echo $form->renderField('metadesc'); if ($name == 'vdmmetadata')
echo $form->renderField('metakey'); {
} echo $form->renderField('metadesc');
echo $form->renderField('metakey');
foreach ($form->getFieldset($name) as $field) }
{
if ($field->name != 'jform[metadata][tags][]') foreach ($form->getFieldset($name) as $field)
{ {
echo $field->renderField(); if ($field->name != 'jform[metadata][tags][]')
} {
} ?> echo $field->renderField();
<?php endforeach; ?> }
} ?>
<?php endforeach; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
@ -49,17 +49,17 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'access', 'access',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,46 +1,52 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage stastics_fullwidth.php @subpackage stastics_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// set the defaults use Joomla\CMS\Factory;
$items = $displayData->vwbstastics; use Joomla\CMS\Language\Text;
$user = JFactory::getUser(); use Joomla\CMS\HTML\HTMLHelper as Html;
$id = $displayData->item->id; use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vwbstastics;
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL // set the edit URL
$edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit"; $edit = "index.php?option=com_sermondistributor&view=statistics&task=statistic.edit";
// set a return value // set a return value
$return = ($id) ? "index.php?option=com_sermondistributor&view=sermon&layout=edit&id=" . $id : ""; $return = ($id) ? "index.php?option=com_sermondistributor&view=sermon&layout=edit&id=" . $id : "";
// check for a return value // check for a return value
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64')) if ($_return = $jinput->get('return', null, 'base64'))
{ {
$return .= "&return=" . $_return; $return .= "&return=" . $_return;
} }
// check if return value was set // check if return value was set
if (SermondistributorHelper::checkString($return)) if (StringHelper::check($return))
{ {
// set the referral values // set the referral values
$ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); $ref = ($id) ? "&ref=sermon&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
@ -48,34 +54,34 @@ if (SermondistributorHelper::checkString($return))
else else
{ {
$ref = ($id) ? "&ref=sermon&refid=" . $id : ""; $ref = ($id) ? "&ref=sermon&refid=" . $id : "";
} }
?> ?>
<div class="form-vertical"> <div class="form-vertical">
<?php if (SermondistributorHelper::checkArray($items)): ?> <?php if (ArrayHelper::check($items)): ?>
<table class="footable table data statistics metro-blue" data-page-size="20" data-filter="#filter_statistics"> <table class="footable table data statistics metro-blue" data-page-size="20" data-filter="#filter_statistics">
<thead> <thead>
<tr> <tr>
<th data-toggle="true"> <th data-toggle="true">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_FILENAME_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERMON_LABEL'); ?>
</th> </th>
<th data-hide="phone"> <th data-hide="phone">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_PREACHER_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_SERIES_LABEL'); ?>
</th> </th>
<th data-hide="phone,tablet"> <th data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_COUNTER_LABEL'); ?>
</th> </th>
<th width="10" data-hide="phone,tablet"> <th width="10" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_STATUS'); ?>
</th> </th>
<th width="5" data-type="numeric" data-hide="phone,tablet"> <th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_STATISTIC_ID'); ?>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -83,7 +89,7 @@ else
<?php foreach ($items as $i => $item): ?> <?php foreach ($items as $i => $item): ?>
<?php <?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out); $userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('statistic',$item,'statistics'); $canDo = SermondistributorHelper::getActions('statistic',$item,'statistics');
?> ?>
<tr> <tr>
@ -91,7 +97,7 @@ else
<?php if ($canDo->get('statistic.edit')): ?> <?php if ($canDo->get('statistic.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $item->filename; ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $item->filename; ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?> <?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'statistics.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else: ?>
<?php echo $item->filename; ?> <?php echo $item->filename; ?>
@ -101,14 +107,14 @@ else
<?php echo $displayData->escape($item->sermon_name); ?> <?php echo $displayData->escape($item->sermon_name); ?>
</td> </td>
<td> <td>
<?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int)$item->preacher)): ?> <?php if ($user->authorise('preacher.edit', 'com_sermondistributor.preacher.' . (int) $item->preacher)): ?>
<a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a> <a href="index.php?option=com_sermondistributor&view=preachers&task=preacher.edit&id=<?php echo $item->preacher; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->preacher_name); ?></a>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->preacher_name); ?> <?php echo $displayData->escape($item->preacher_name); ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int)$item->series)): ?> <?php if ($user->authorise('series.edit', 'com_sermondistributor.series.' . (int) $item->series)): ?>
<a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a> <a href="index.php?option=com_sermondistributor&view=all_series&task=series.edit&id=<?php echo $item->series; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->series_name); ?></a>
<?php else: ?> <?php else: ?>
<?php echo $displayData->escape($item->series_name); ?> <?php echo $displayData->escape($item->series_name); ?>
@ -119,26 +125,26 @@ else
</td> </td>
<?php if ($item->published == 1): ?> <?php if ($item->published == 1): ?>
<td class="center" data-value="1"> <td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 0): ?> <?php elseif ($item->published == 0): ?>
<td class="center" data-value="2"> <td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>"> <span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == 2): ?> <?php elseif ($item->published == 2): ?>
<td class="center" data-value="3"> <td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>"> <span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span> </span>
</td> </td>
<?php elseif ($item->published == -2): ?> <?php elseif ($item->published == -2): ?>
<td class="center" data-value="4"> <td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>"> <span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo JText::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?> <?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span> </span>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -158,7 +164,7 @@ else
</table> </table>
<?php else: ?> <?php else: ?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -1,58 +1,58 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_above.php @subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'filename', 'filename',
'sermon' 'sermon'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header"> <div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -1,56 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_left.php @subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'preacher', 'preacher',
'series' 'series'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,55 +1,55 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage details_right.php @subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'counter' 'counter'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,54 +1,56 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage metadata.php @subpackage metadata.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); use Joomla\CMS\Language\Text;
// JLayout for standard handling of metadata fields in the administrator content edit screens. $form = $displayData->getForm();
$fieldSets = $form->getFieldsets('metadata');
?> // JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?> ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p> <?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php endif; ?> <?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<?php <?php endif; ?>
// Include the real fields in this panel.
if ($name == 'vdmmetadata') <?php
{ // Include the real fields in this panel.
echo $form->renderField('metadesc'); if ($name == 'vdmmetadata')
echo $form->renderField('metakey'); {
} echo $form->renderField('metadesc');
echo $form->renderField('metakey');
foreach ($form->getFieldset($name) as $field) }
{
if ($field->name != 'jform[metadata][tags][]') foreach ($form->getFieldset($name) as $field)
{ {
echo $field->renderField(); if ($field->name != 'jform[metadata][tags][]')
} {
} ?> echo $field->renderField();
<?php endforeach; ?> }
} ?>
<?php endforeach; ?>

View File

@ -1,44 +1,44 @@
<?php <?php
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/ /*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __ ____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__ /\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __ \ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\ \/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/ /\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\ \ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/ \/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/ /------------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.x @version 3.0.x
@created 22nd October, 2015 @created 22nd October, 2015
@package Sermon Distributor @package Sermon Distributor
@subpackage publishing.php @subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/> @author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved @copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
A sermon distributor that links to Dropbox. A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/ /----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form // get the form
$form = $displayData->getForm(); $form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID) // get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId()); $layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method // Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around // this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. // seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php // example of layout name: details_left.php
// example of method name: getFields_details_left() // example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1]; $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title', 'title',
'created', 'created',
'created_by', 'created_by',
@ -49,17 +49,17 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'access', 'access',
'version', 'version',
'hits', 'hits',
'id' 'id'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: [];
?> ?>
<?php if ($fields && count((array) $fields)) :?> <?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>

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