Compare commits

..

3 Commits
5.x ... master

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
803 changed files with 67929 additions and 26504 deletions

View File

@ -1,139 +0,0 @@
name: Bug Report
about: Draft a report to aid in our Debugging efforts.
title: "[BUG]: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
We value your effort in reporting an bug! Your feedback is essential for us to address and fix the problem.
- type: textarea
id: what-happened
attributes:
label: What Happened?
description: Please provide a detailed description of the issue and explain what outcome you anticipate.
placeholder: Describe the issue you experienced.
value: ""
validations:
required: true
- type: markdown
attributes:
value: |
# Environment Details
- type: dropdown
id: joomla_version
attributes:
label: Which Joomla version are you using?
multiple: true
options:
- Latest
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: sermon_distributor_version
attributes:
label: Which Joomla Sermon Distributor version are you using?
multiple: true
options:
- Latest
- v5.0
- v3.0
- v2.1
- v2.0
- Other
validations:
required: true
- type: dropdown
id: php_version
attributes:
label: Which PHP version are you using?
multiple: true
options:
- Latest
- PHP 8.3
- PHP 8.2
- PHP 8.1
- PHP 8.0
- PHP 7.4
- Other
validations:
required: true
- type: dropdown
id: apache_version
attributes:
label: Which Apache version are you using?
multiple: true
options:
- Latest
- Apache 2.4
- Apache 2.2
- Apache 2.0
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Where did this issue occur?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermon Categories(admin_views)
- Series List(admin_views)
- Series(admin_view)
- Statistics(admin_view)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preachers(site_views)
- Preacher(site_view)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: On which browsers did you encounter the issue?
multiple: true
options:
- Chrome
- Firefox
- Microsoft Edge
- Safari
- Opera
- Brave
- Vivaldi
validations:
required: true
- type: dropdown
id: os
attributes:
label: What operating system are you currently using?
multiple: true
options:
- Windows (Desktop)
- macOS (Desktop)
- Linux (Desktop)
- Other
validations:
required: true
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,83 +0,0 @@
name: Enhancement Request
about: Suggest an idea for Joomla-Sermon-Distributor
title: "[ENHANCEMENT]: "
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an enhancement! Your input is crucial for our innovation and progress. To assist us better, please share detailed information about your idea.
- type: textarea
id: enhancement-details
attributes:
label: Enhancement Details
description: Could you detail the enhancement you're suggesting? Explain the issue it addresses or the new feature it introduces.
placeholder: Please give an in-depth explanation of your proposed enhancement.
validations:
required: true
- type: markdown
attributes:
value: |
# Context and Priority
- type: dropdown
id: system
attributes:
label: On which Joomla version will this enhancement have an impact?
multiple: true
options:
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which part of the extension will be affected by this enhancement?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermons Categories(admin_views)
- Series List(admin_view)
- Series(admin_views)
- Statistics(admin_views)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preacher(site_view)
- Preachers(site_views)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: textarea
id: benefits
attributes:
label: Expected Benefits
description: What advantages can be anticipated from this enhancement? How does it contribute to the improvement of the system?
placeholder: Detail the advantages that this enhancement will provide.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Supply additional context or screenshots related to the enhancement request in this space.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,83 +0,0 @@
name: Task
about: Create a task for project management
title: "[TASK]: "
labels:
- task
body:
- type: markdown
attributes:
value: |
Thanks for setting up the task! Tasks assist us in arranging and ranking our work. Kindly provide comprehensive details about the task for clarity and efficient tracking.
- type: textarea
id: task-details
attributes:
label: Task Details
description: Please describe the task. What are the specific actions required?
placeholder: Provide a detailed description of the task.
validations:
required: true
- type: markdown
attributes:
value: |
# Task Context and Priority
- type: dropdown
id: system
attributes:
label: Which Joomla version is this task related to?
multiple: true
options:
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which area of the extension does this task impact?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermon Categories(admin_views)
- Series List(admin_views)
- Series(admin_view)
- Statistics(admin_view)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preachers(site_views)
- Preacher(site_view)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: textarea
id: task-objective
attributes:
label: Task Objective
description: What's the aim or purpose of this task? How will it contribute to the project or system's success?
placeholder: Describe the goal and anticipated result of the task.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Please share any extra context, files, or screenshots that could aid in comprehending or carrying out the task.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,83 +0,0 @@
name: Documentation
about: Propose improvements to the documentation or highlight any issues found within it.
title: "[DOCUMENTATION]: "
labels:
- documentation
body:
- type: markdown
attributes:
value: |
We appreciate your input on our documentation! Clear and comprehensive documentation plays a vital role in enabling users to effectively interact with our systems. To assist us in making improvements, kindly offer thorough details regarding your suggestion or the specific problem you've encountered.
- type: textarea
id: documentation-details
attributes:
label: Documentation Details
description: Please explain the specific problem with the documentation or the improvements you recommend. Is it a missing topic, unclear instructions, outdated content, or something else?
placeholder: Detail the issue with the documentation or suggest improvements..
validations:
required: true
- type: markdown
attributes:
value: |
# Specific Context
- type: dropdown
id: system
attributes:
label: Which Joomla version does this documentation relate to?
multiple: true
options:
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which area of the extension does this documentation concern?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermon Categories(admin_views)
- Series List(admin_views)
- Series(admin_view)
- Statistics(admin_view)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preachers(site_views)
- Preacher(site_view)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: textarea
id: expected-outcome
attributes:
label: Expected Outcome
description: What outcomes do you anticipate from this change in documentation? How will it benifit the users or enhance the project?
placeholder: Explain the expected result of this change in the documentation.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Share any extra details, files, or screenshots that could help in understanding or applying the documentation change.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,126 +0,0 @@
name: Performance Issue
about: Recommend or propose performance improvements
title: "[PERFORMANCE]: "
labels:
- performance
body:
- type: markdown
attributes:
value: |
Appreciation for tackling performance challenges! Optimizing performance is vital for our system's efficiency and the user experience. Could you offer more comprehensive details to aid in identifying and resolving the suggested performance issue or improvement?
- type: textarea
id: performance-details
attributes:
label: Performance Details
description: Please outline the performance problem or the enhancements you propose. Is it related to speed, resource usage, responsiveness, or something else?
placeholder: Offer an in-depth explanation of the performance challenge or improvement.
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Systems and Context
- type: dropdown
id: system
attributes:
label: Which Joomla version is affected by this performance issue?
multiple: true
options:
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which part of the extension will be affected by this performance issue?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermons Categories(admin_views)
- Series List(admin_view)
- Series(admin_views)
- Statistics(admin_views)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preacher(site_view)
- Preachers(site_views)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: Which browsers did you experience the performance problem on?
multiple: true
options:
- Chrome
- Firefox
- Microsoft Edge
- Safari
- Opera
- Brave
- Vivaldi
validations:
required: true
- type: dropdown
id: os
attributes:
label: Which operating system are you using?
multiple: true
options:
- Windows (Desktop)
- macOS (Desktop)
- Linux (Desktop)
- Other
validations:
required: true
- type: textarea
id: replication-steps
attributes:
label: Steps to Replicate
description: If possible, share a step-by-step guide to replicate the performance problem.
placeholder: Explain how to replicate the problem.
validations:
required: false
- type: textarea
id: impact-assessment
attributes:
label: Impact Assessment
description: How does the performance problem impact the system or its users? How severe is its effect?
placeholder: Explain the impact of the performance problem.
validations:
required: true
- type: textarea
id: proposed-solutions
attributes:
label: Proposed Solutions or Ideas
description: If you have any suggestions or ideas for resolving the performance problem, please share them here.
placeholder: Share any potential solutions or improvement problem.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Provide any additional context, benchmarks, logs, or screenshots that might help in understanding or addressing the performance problem.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,86 +0,0 @@
name: Refactoring Task
about: Recommend or identify the necessity for code refactoring.
title: "[REFACTOR]: "
labels:
- refactor
body:
- type: markdown
attributes:
value: |
We appreciate your commitment to enhancing the maintainability and quality of our codebase! Code refactoring plays a crucial role in ensuring our system remains efficient and easy to manage. To assist us effectively, please share comprehensive details about the refactoring task you are suggesting or identifying.
- type: textarea
id: refactoring-details
attributes:
label: Refactoring Details
description: Outline the refactoring task, specifying which code segment requires attention and the reasons behind this need. What improvements are expected from this refactoring?
placeholder: Provide an in-depth explanation of the refactoring task?
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Components and Context
- type: dropdown
id: system
attributes:
label: Which Joomla version does this refactoring task relate to?
multiple: true
options:
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which area of the extension will be impacted by this refactoring?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermon Categories(admin_views)
- Series List(admin_views)
- Series(admin_view)
- Statistics(admin_view)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preachers(site_views)
- Preacher(site_view)
- Series(site_view)
- Series List(site_views)
- Back-end (Just Code)
- Front-end (Just GUI)
- All
- Other
validations:
required: true
- type: textarea
id: expected-outcome
attributes:
label: Expected Outcome
description: What benefits do you anticipate from this refactoring? How will it enhance the codebase or overall system?
placeholder: Explain the expected results of this refactoring.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Share any further details or information, like code snippets, that could aid in comprehending or executing the refactoring task.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,64 +0,0 @@
name: Security Issue
about: Identify a possible security risk.
title: "[SECURITY]: "
labels:
- security
body:
- type: markdown
attributes:
value: |
**⚠️ CRITICAL: Avoid sharing any sensitive or confidential details in this message.** Should you suspect a security flaw, please contact us directly at [joomla@vdm.io].
- type: textarea
id: security-general-description
attributes:
label: General Description
description: Offer a broad overview of the security concern, ensuring not to disclose any sensitive information.
placeholder: Provide a general description of the security problem.
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Systems
- type: dropdown
id: joomla_version
attributes:
label: Which Joomla version could potentially be affected?
multiple: true
options:
- Latest
- Joomla 5
- Joomla 4
- Joomla 3
- All
- Other
validations:
required: true
- type: dropdown
id: sermon_distributor_version
attributes:
label: Which Joomla Sermon Distributor version could potentially be affected?
multiple: true
options:
- Latest
- v5.0
- v3.0
- v2.1
- v2.0
- All
- Other
validations:
required: true
- type: textarea
id: non-sensitive-details
attributes:
label: Non-Sensitive Details
description: If applicable, please offer further non-sensitive information or general observations regarding the security concern.
placeholder: Provide any relevant non-sensitive details or observations.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -1,127 +0,0 @@
name: Test Issue
about: Recommend additional assessments or identify any problems with current tests.
title: "[TEST]: "
labels:
- test
body:
- type: markdown
attributes:
value: |
Thank you for your involvement in the testing phase of our initiative! Thorough testing is essential to uphold the integrity and dependability of our systems. Please provide detailed information to aid us in comprehending the testing activity or problem you're proposing or highlighting.
- type: textarea
id: testing-details
attributes:
label: Testing Details
description: Could you specify the testing task or concern? Are you proposing a new test, pointing out a defect in current tests, or identifying untested areas?
placeholder: Please offer an detailed description of the testing task or issue.
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Components and Context
- type: dropdown
id: joomla_version
attributes:
label: Which Joomla version is this testing issue related to?
multiple: true
options:
- Latest
- Joomla 5
- Joomla 4
- Joomla 3
- Other
validations:
required: true
- type: dropdown
id: sermon_distributor_version
attributes:
label: Which Joomla Sermon Distributor version is this testing issue related to?
multiple: true
options:
- Latest
- v5.0
- v3.0
- v2.1
- v2.0
- Other
validations:
required: true
- type: dropdown
id: php_version
attributes:
label: Which PHP version is this testing issue related to?
multiple: true
options:
- Latest
- PHP 8.3
- PHP 8.2
- PHP 8.1
- PHP 8.0
- PHP 7.4
- Other
validations:
required: true
- type: dropdown
id: apache_version
attributes:
label: Which Apache version is this testing issue related to?
multiple: true
options:
- Latest
- Apache 2.4
- Apache 2.2
- Apache 2.0
- Other
validations:
required: true
- type: dropdown
id: area
attributes:
label: Which area of the extension does this testing task impact?
multiple: true
options:
- Dashboard(admin_view)
- Preachers(admin_views)
- Preacher(admin_view)
- Sermons(admin_views)
- Sermon(admin_view)
- Sermons Categories(admin_views)
- Series List(admin_view)
- Series(admin_views)
- Statistics(admin_views)
- External Sources(admin_views)
- External Source(admin_view)
- Manual Updater(admin_view)
- Local Listings(admin_views)
- Help Documents(admin_views)
- Categories(site_views)
- Category(site_view)
- Preacher(site_view)
- Preachers(site_views)
- Series(site_view)
- Series List(site_views)
- Other
validations:
required: true
- type: textarea
id: expected-outcome
attributes:
label: Expected Outcome
description: What do you expect to achieve with this testing task? How will it improve the system or its reliability?
placeholder: Describe the expected outcome of this testing task.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Provide any additional context, testing scenarios, or information that might help in understanding or implementing the testing task.
validations:
required: false
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -9,8 +9,8 @@
"name": "PKG_SERMONDISTRIBUTOR",
"code_name": "sermondistributor",
"package_name": "pkg_sermondistributor",
"min_joomla_version": "5.0",
"max_joomla_version": "5.1",
"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",
@ -20,12 +20,11 @@
"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/5.x/sermondistributor_update_server.xml"
"update_servers": "https://git.vdm.dev/christian/Joomla-Sermon-Distributor/raw/branch/master/sermondistributor_update_server.xml"
},
"repository": {
"owner": "christian",
"repo": "pkg-sermondistributor",
"branch": "5.x"
"repo": "pkg-sermondistributor"
},
"files": [
{
@ -33,19 +32,19 @@
"repo": "Joomla-Sermon-Distributor",
"id": "com_sermondistributor",
"type": "component",
"mode": "5.x"
"mode": "master"
},
{
"owner": "getBible",
"repo": "daily-light-module",
"owner": "christian",
"repo": "mod_dailylight",
"id": "mod_dailylight",
"type": "module",
"client": "site",
"mode": "master"
},
{
"owner": "getBible",
"repo": "daily-scripture-module",
"owner": "christian",
"repo": "mod_dailyscripture",
"id": "mod_dailyscripture",
"type": "module",
"client": "site",
@ -67,3 +66,4 @@
}
]
}

View File

@ -1,16 +1,20 @@
# v5.0.0-beta2
# v3.0.3
- First release of Sermon Distributor towards Joomla 5
- Add PHP check to install/update class
- Add Database check and fix to install/update class
- Removed the not_required field from the sermon model. #36
# v4.0.0-beta2
# v3.0.2
- First release of Sermon Distributor towards Joomla 4
- Add PHP check to install/update class
- Add Database check and fix to install/update class
- Add the HTML class to the site default layout.
# v3.0.5
# v3.0.1
- Add PHP check to install/update class
- Add Database check and fix to install/update class
- 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,8 +1,8 @@
# Sermon Distributor (5.0.x)
# Sermon Distributor (3.0.x)
![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 4.x & 5.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://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 3rd May, 2024
+ *Version*: 5.0.x
+ *Last Build*: 11th February, 2024
+ *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**263 Hours** or **33 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.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **94142**
+ *File count*: **602**
+ *Folder count*: **124**
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
**173 Hours** or **22 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:
> **debugging @66hours** = codingtime / 4;
> **planning @38hours** = codingtime / 7;
> **mapping @26hours** = codingtime / 10;
> **office @44hours** = codingtime / 6;)
> **debugging @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
**436 Hours** or **55 Eight Hour Days**
**403 Hours** or **50 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **11 weeks** or **2.3 months**
Project duration: **10 weeks** or **2.1 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
# Sermon Distributor (5.0.x)
# Sermon Distributor (3.0.x)
![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 4.x & 5.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://git.vdm.dev/christian/Joomla-Sermon-Distributor/archive/master.zip)
@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 3rd May, 2024
+ *Version*: 5.0.x
+ *Last Build*: 11th February, 2024
+ *Version*: 3.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time :hourglass:
**263 Hours** or **33 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.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **94142**
+ *File count*: **602**
+ *Folder count*: **124**
+ *Line count*: **87039**
+ *File count*: **595**
+ *Folder count*: **113**
**173 Hours** or **22 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:
> **debugging @66hours** = codingtime / 4;
> **planning @38hours** = codingtime / 7;
> **mapping @26hours** = codingtime / 10;
> **office @44hours** = codingtime / 6;)
> **debugging @61hours** = codingtime / 4;
> **planning @35hours** = codingtime / 7;
> **mapping @24hours** = codingtime / 10;
> **office @40hours** = codingtime / 6;)
**436 Hours** or **55 Eight Hour Days**
**403 Hours** or **50 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **11 weeks** or **2.3 months**
Project duration: **10 weeks** or **2.1 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

View File

@ -9,7 +9,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.js

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset
addruleprefix="TrueChristianChurch\Component\Sermondistributor\Administrator\Rule"
addfieldprefix="TrueChristianChurch\Component\Sermondistributor\Administrator\Field"
addrulepath="/administrator/components/com_sermondistributor/models/rules"
addfieldpath="/administrator/components/com_sermondistributor/models/fields"
name="global_config"
label="COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_DESC">
@ -313,6 +313,18 @@
<option value="1">
COM_SERMONDISTRIBUTOR_CONFIG_JQUERY_LOAD</option>"
</field>
<field name="uikit_version"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_DESC"
class="btn-group btn-group-yesno"
default="2">
<!-- Option Set. -->
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_V2</option>"
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_V3</option>"
</field>
<field name="uikit_load"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LOAD_LABEL"
@ -324,6 +336,8 @@
COM_SERMONDISTRIBUTOR_CONFIG_AUTO_LOAD</option>"
<option value="1">
COM_SERMONDISTRIBUTOR_CONFIG_FORCE_LOAD</option>"
<option value="3">
COM_SERMONDISTRIBUTOR_CONFIG_ONLY_EXTRA</option>"
<option value="2">
COM_SERMONDISTRIBUTOR_CONFIG_DONT_LOAD</option>"
</field>
@ -339,6 +353,21 @@
<option value=".min">
COM_SERMONDISTRIBUTOR_CONFIG_YES</option>"
</field>
<field name="uikit_style"
type="radio"
label="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_LABEL"
description="COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC"
class="btn-group btn-group-yesno"
showon="uikit_version:2"
default="">
<!-- Option Set. -->
<option value="">
COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD</option>"
<option value=".almost-flat">
COM_SERMONDISTRIBUTOR_CONFIG_ALMOST_FLAT_LOAD</option>"
<option value=".gradient">
COM_SERMONDISTRIBUTOR_CONFIG_GRADIANT_LOAD</option>"
</field>
</fieldset>
<fieldset
name="encryption_config"

136
admin/controller.php Normal file
View File

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

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage AjaxController.php
@subpackage ajax.json.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,47 +21,30 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Session\Session;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
* Sermondistributor Ajax Base Controller
*
* @since 1.6
*/
class AjaxController extends BaseController
class SermondistributorControllerAjax extends BaseController
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'default_task', 'model_path', and
* 'view_path' (this list is not meant to be comprehensive).
* @param ?MVCFactoryInterface $factory The factory.
* @param ?CMSApplication $app The Application for the dispatcher
* @param ?Input $input Input
*
* @since 3.0
*/
public function __construct($config = [], ?MVCFactoryInterface $factory = null, ?CMSApplication $app = null, ?Input $input = null)
public function __construct($config)
{
parent::__construct($config, $factory, $app, $input);
parent::__construct($config);
// make sure all json stuff are set
$this->app->getDocument()->setMimeEncoding( 'application/json' );
$this->app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$this->app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks
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
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
$this->registerTask('getBuildTable', 'ajax');
@ -70,19 +53,14 @@ class AjaxController extends BaseController
$this->registerTask('updateLocalListingExternal', 'ajax');
}
/**
* The ajax function
*
* @since 3.10
*/
public function ajax()
{
// get the user for later use
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get the input values
$jinput = $this->input ?? $this->app->input;
// check if we should return raw (DEFAULT TRUE SINCE J4)
$returnRaw = $jinput->get('raw', true, 'BOOLEAN');
$jinput = Factory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
@ -100,19 +78,19 @@ class AjaxController extends BaseController
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isNew($noticeValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -149,19 +127,19 @@ class AjaxController extends BaseController
$noticeValue = $jinput->get('notice', NULL, 'STRING');
if($noticeValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->isRead($noticeValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -199,19 +177,19 @@ class AjaxController extends BaseController
$ojectValue = $jinput->get('oject', NULL, 'STRING');
if($idNameValue && $user->id != 0 && $ojectValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getBuildTable($idNameValue, $ojectValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -248,19 +226,19 @@ class AjaxController extends BaseController
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getSourceStatus($idValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -297,19 +275,19 @@ class AjaxController extends BaseController
$getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getCronPath($getTypeValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -349,19 +327,19 @@ class AjaxController extends BaseController
$sleutelValue = $jinput->get('sleutel', NULL, 'CMD');
if($idValue && $user->id != 0 && $targetValue && $typeValue && $sleutelValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->updateLocalListingExternal($idValue, $targetValue, $typeValue, $sleutelValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -399,15 +377,15 @@ class AjaxController extends BaseController
// return to a callback function
if($callback)
{
echo $callback."(".json_encode(['error' => 'There was an error! [129]']).");";
echo $callback."(".json_encode(false).");";
}
elseif($returnRaw)
{
echo json_encode(['error' => 'There was an error! [129]']);
echo json_encode(false);
}
else
{
echo "(".json_encode(['error' => 'There was an error! [129]']).");";
echo "(".json_encode(false).");";
}
}
}

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage External_sourceController.php
@subpackage external_source.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* External_source Form Controller
*
* @since 1.6
*/
class External_sourceController extends FormController
class SermondistributorControllerExternal_source extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class External_sourceController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'external_sources';
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()
{
@ -229,7 +215,7 @@ class External_sourceController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('external_source.access', 'com_sermondistributor');
if (!$access)
@ -254,7 +240,7 @@ class External_sourceController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage External_sourcesController.php
@subpackage external_sources.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* External_sources Admin Controller
*
* @since 1.6
*/
class External_sourcesController extends AdminController
class SermondistributorControllerExternal_sources extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class External_sourcesController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'External_source', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'External_source', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class External_sourcesController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('external_source.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class External_sourcesController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('external_source.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage HelpController.php
@subpackage help.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,24 +21,20 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Database\DatabaseInterface;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Sermondistributor Help Base Controller
*
* @since 1.6
*/
class HelpController extends BaseController
class SermondistributorControllerHelp extends BaseController
{
public function __construct($config)
{
@ -49,7 +45,7 @@ class HelpController extends BaseController
public function help()
{
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
// Check Token!
$token = Session::getFormToken();
@ -91,7 +87,7 @@ class HelpController extends BaseController
protected function getHelpDocumentText($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__sermondistributor_help_document AS a');

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Help_documentController.php
@subpackage help_document.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Help_document Form Controller
*
* @since 1.6
*/
class Help_documentController extends FormController
class SermondistributorControllerHelp_document extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class Help_documentController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'help_documents';
public function __construct($config = [])
{
$this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class Help_documentController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('help_document.access', 'com_sermondistributor');
if (!$access)
@ -112,7 +98,7 @@ class Help_documentController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Help_documentsController.php
@subpackage help_documents.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Help_documents Admin Controller
*
* @since 1.6
*/
class Help_documentsController extends AdminController
class SermondistributorControllerHelp_documents extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class Help_documentsController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Help_document', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Help_document', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class Help_documentsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('help_document.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class Help_documentsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('help_document.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ImportController.php
@subpackage import.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,17 +31,11 @@ use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Sermondistributor Import Base Controller
*
* @since 1.6
*/
class ImportController extends BaseController
class SermondistributorControllerImport extends BaseController
{
/**
* Import an spreadsheet.

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Local_listingController.php
@subpackage local_listing.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Local_listing Form Controller
*
* @since 1.6
*/
class Local_listingController extends FormController
class SermondistributorControllerLocal_listing extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class Local_listingController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'local_listings';
public function __construct($config = [])
{
$this->view_list = 'Local_listings'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class Local_listingController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('local_listing.access', 'com_sermondistributor');
if (!$access)
@ -112,7 +98,7 @@ class Local_listingController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Local_listingsController.php
@subpackage local_listings.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Local_listings Admin Controller
*
* @since 1.6
*/
class Local_listingsController extends AdminController
class SermondistributorControllerLocal_listings extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class Local_listingsController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Local_listing', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Local_listing', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class Local_listingsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('local_listing.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class Local_listingsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('local_listing.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Manual_updaterController.php
@subpackage manual_updater.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,17 +31,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Manual_updater Admin Controller
*
* @since 1.6
*/
class Manual_updaterController extends AdminController
class SermondistributorControllerManual_updater extends AdminController
{
/**
* The prefix to use with controller messages.
@ -51,30 +47,19 @@ class Manual_updaterController extends AdminController
/**
* Proxy for getModel.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
*
* @since 1.6
* @since 2.5
*/
public function getModel($name = '###View###', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Manual_updater', $prefix = 'SermondistributorModel', $config = [])
{
return parent::getModel($name, $prefix, $config);
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
/**
* Adds option to redirect back to the dashboard.
*
* @return void
*
* @since 3.0
*/
public function dashboard(): void
public function dashboard()
{
$this->setRedirect(Route::_('index.php?option=com_sermondistributor', false));
return;
}
public function gotoExternalSources()

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage PreacherController.php
@subpackage preacher.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Preacher Form Controller
*
* @since 1.6
*/
class PreacherController extends FormController
class SermondistributorControllerPreacher extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_PREACHER';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class PreacherController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'preachers';
public function __construct($config = [])
{
$this->view_list = 'Preachers'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class PreacherController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('preacher.access', 'com_sermondistributor');
if (!$access)
@ -112,7 +98,7 @@ class PreacherController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage PreachersController.php
@subpackage preachers.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Preachers Admin Controller
*
* @since 1.6
*/
class PreachersController extends AdminController
class SermondistributorControllerPreachers extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class PreachersController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_PREACHERS';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Preacher', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Preacher', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class PreachersController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('preacher.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class PreachersController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('preacher.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage SeriesController.php
@subpackage series.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Series Form Controller
*
* @since 1.6
*/
class SeriesController extends FormController
class SermondistributorControllerSeries extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERIES';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class SeriesController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'series_list';
public function __construct($config = [])
{
$this->view_list = 'Series_list'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class SeriesController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('series.access', 'com_sermondistributor');
if (!$access)
@ -112,7 +98,7 @@ class SeriesController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage Series_listController.php
@subpackage series_list.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Series_list Admin Controller
*
* @since 1.6
*/
class Series_listController extends AdminController
class SermondistributorControllerSeries_list extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class Series_listController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERIES_LIST';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Series', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Series', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class Series_listController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('series.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class Series_listController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('series.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage SermonController.php
@subpackage sermon.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Sermon Form Controller
*
* @since 1.6
*/
class SermonController extends FormController
class SermondistributorControllerSermon extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERMON';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class SermonController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'sermons';
public function __construct($config = [])
{
$this->view_list = 'Sermons'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class SermonController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('sermon.access', 'com_sermondistributor');
if (!$access)
@ -111,7 +97,7 @@ class SermonController extends FormController
*/
protected function allowEdit($data = [], $key = 'id')
{ // get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage SermondistributorController.php
@subpackage sermondistributor.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,17 +31,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Sermondistributor Admin Controller
*
* @since 1.6
*/
class SermondistributorController extends AdminController
class SermondistributorControllerSermondistributor extends AdminController
{
}

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage SermonsController.php
@subpackage sermons.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Sermons Admin Controller
*
* @since 1.6
*/
class SermonsController extends AdminController
class SermondistributorControllerSermons extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class SermonsController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_SERMONS';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Sermon', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Sermon', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class SermonsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('sermon.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class SermonsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('sermon.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage StatisticController.php
@subpackage statistic.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,43 +21,24 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Statistic Form Controller
*
* @since 1.6
*/
class StatisticController extends FormController
class SermondistributorControllerStatistic extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_STATISTIC';
/**
* Current or most recently performed task.
*
@ -68,12 +49,17 @@ class StatisticController extends FormController
protected $task;
/**
* The URL view list variable.
* Class constructor.
*
* @var string
* @since 1.6
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
protected $view_list = 'statistics';
public function __construct($config = [])
{
$this->view_list = 'Statistics'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
@ -87,7 +73,7 @@ class StatisticController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('statistic.access', 'com_sermondistributor');
if (!$access)
@ -112,7 +98,7 @@ class StatisticController extends FormController
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage StatisticsController.php
@subpackage statistics.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,7 +21,9 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -29,19 +31,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
* Statistics Admin Controller
*
* @since 1.6
*/
class StatisticsController extends AdminController
class SermondistributorControllerStatistics extends AdminController
{
/**
* The prefix to use with controller messages.
@ -52,17 +48,17 @@ class StatisticsController extends AdminController
protected $text_prefix = 'COM_SERMONDISTRIBUTOR_STATISTICS';
/**
* Proxy for getModel.
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Statistic', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Statistic', $prefix = 'SermondistributorModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
@ -72,7 +68,7 @@ class StatisticsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('statistic.export', 'com_sermondistributor') && $user->authorise('core.export', 'com_sermondistributor'))
{
// Get the input
@ -103,7 +99,7 @@ class StatisticsController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
if ($user->authorise('statistic.import', 'com_sermondistributor') && $user->authorise('core.import', 'com_sermondistributor'))
{
// Get the import model

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ExternalsourcefilesField.php
@subpackage headercheck.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,51 +21,82 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
// No direct access to this file
\defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
/**
* Externalsourcefiles Form Field class for the Sermondistributor component
*
* @since 1.6
*/
class ExternalsourcefilesField extends ListField
use Joomla\CMS\Factory;
class sermondistributorHeaderCheck
{
/**
* The externalsourcefiles field type.
*
* @var string
*/
public $type = 'Externalsourcefiles';
protected $document = null;
protected $app = null;
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
* @since 1.6
*/
protected function getOptions()
function js_loaded($script_name)
{
// set the default
$options[] = Html::_('select.option', '', Text::_('COM_SERMONDISTRIBUTOR_THE_LOCAL_LISTING_OF_THE_MANUAL_EXTERNAL_SOURCE_FOLDERS_IS_EMPTY'));
$selection = SermondistributorHelper::getExternalSourceLink('manual', 2, false, 'select');
if (SermondistributorHelper::checkArray($selection))
{
$options = array();
foreach ($selection as $key => $name)
{
$options[] = Html::_('select.option', $key, $name);
}
}
return $options;
// UIkit check point
if (strpos($script_name,'uikit') !== false)
{
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== false)
{
return true;
}
}
if (!$this->document)
{
$this->document = Factory::getDocument();
}
$head_data = $this->document->getHeadData();
foreach (array_keys($head_data['scripts']) as $script)
{
if (stristr($script, $script_name))
{
return true;
}
}
return false;
}
function css_loaded($script_name)
{
// UIkit check point
if (strpos($script_name,'uikit') !== false)
{
if (!$this->app)
{
$this->app = Factory::getApplication();
}
$getTemplateName = $this->app->getTemplate('template')->template;
if (strpos($getTemplateName,'yoo') !== 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

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

View File

@ -10,10 +10,10 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage SermondistributorHelper.php
@subpackage sermondistributor.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -21,14 +21,53 @@
A sermon distributor that links to Dropbox.
/----------------------------------------------------------------------------------------------------------------------------------*/
namespace TrueChristianChurch\Component\Sermondistributor\Administrator\Helper;
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_sermondistributor/src/Helper/PowerloaderHelper.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// register additional namespace
\spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = [
'libraries/jcb_powers/VDM.Joomla.FOF' => 'VDM\\Joomla\\FOF',
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla'
];
// Start the search and load if found
$found = false;
$found_base_dir = "";
$found_len = 0;
foreach ($search as $base_dir => $prefix)
{
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) === 0)
{
// we have a match so load the values
$found = true;
$found_base_dir = $base_dir;
$found_len = $len;
// done here
break;
}
}
// check if we found a match
if (!$found)
{
// not found so move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $found_len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file))
{
require $file;
}
});
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -39,11 +78,9 @@ use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Language\Language;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Version;
use Joomla\Database\DatabaseInterface;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
@ -51,23 +88,18 @@ use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use Joomla\CMS\Filesystem\Folder;
use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianChurch\Joomla\Utilities\FileHelper;
use TrueChristianChurch\Joomla\Utilities\JsonHelper;
use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use TrueChristianChurch\Joomla\Utilities\MimeHelper;
use TrueChristianChurch\Joomla\Utilities\GetHelper;
use TrueChristianChurch\Joomla\Utilities\FormHelper;
// No direct access to this file
\defined('_JEXEC') or die;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\MimeHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\FOF\Encrypt\AES;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\FormHelper;
/**
* Sermondistributor component helper.
*
* @since 3.0
*/
abstract class SermondistributorHelper
{
@ -163,7 +195,7 @@ abstract class SermondistributorHelper
// Get local key
$localkey = self::getLocalKey();
// decrypt the urls
$safe = new AES($localkey, 128);
$safe = new FOFEncryptAes($localkey, 128);
// internal download url
$keyCounter = new \stdClass;
$keyCounter->sermon = $sermon->id;
@ -177,7 +209,7 @@ abstract class SermondistributorHelper
}
$keyCounterRAW = $safe->encryptString(json_encode($keyCounter));
$keyCounter = self::base64_urlencode($keyCounterRAW);
$token = Session::getFormToken();
$token = JSession::getFormToken();
$downloadURL = Uri::root().'index.php?option=com_sermondistributor&task=download.file&key='.$keyCounter.'&token='.$token;
// check if local .htaccess should be set
$setHtaccess = false;
@ -187,7 +219,7 @@ abstract class SermondistributorHelper
{
case 1:
// local file get local folder and check if outside root (if not then allow direct)
$localFolder = ComponentHelper::getParams('com_sermondistributor')->get('localfolder', JPATH_ROOT.'/images').'/';
$localFolder = JComponentHelper::getParams('com_sermondistributor')->get('localfolder', JPATH_ROOT.'/images').'/';
// should we allow direct downloads
$allowDirect = false;
if (2 == $sermon->link_type && strpos($localFolder, JPATH_ROOT) !== false)
@ -201,7 +233,7 @@ abstract class SermondistributorHelper
// insure no double // is in the path name
$localFolder = str_replace('//', '/', $localFolder);
$localFolder = str_replace(':/', '://', $localFolder);
if (UtilitiesArrayHelper::check($sermon->local_files))
if (self::checkArray($sermon->local_files))
{
foreach($sermon->local_files as $key)
{
@ -225,10 +257,10 @@ abstract class SermondistributorHelper
break;
case 2:
// Dropbox get global dropbox switch
$addToButton = ComponentHelper::getParams('com_sermondistributor')->get('add_to_button', 0);
$addToButton = JComponentHelper::getParams('com_sermondistributor')->get('add_to_button', 0);
if (1 == $sermon->build)
{
if (UtilitiesArrayHelper::check($sermon->manual_files))
if (self::checkArray($sermon->manual_files))
{
// manual dropbox
foreach($sermon->manual_files as $key)
@ -280,7 +312,7 @@ abstract class SermondistributorHelper
}
elseif (2 == $sermon->build)
{
if (UtilitiesArrayHelper::check($sermon->auto_sermons))
if (self::checkArray($sermon->auto_sermons))
{
// automatic dropbox
foreach($sermon->auto_sermons as $filename => $key)
@ -364,8 +396,8 @@ abstract class SermondistributorHelper
// get actual update values
$updates = self::getExternalListingUpdateKeys();
// get last update
$updatePath = FileHelper::getPath('path', 'updatelast', 'txt', 'vDm', JPATH_COMPONENT_ADMINISTRATOR);
if (($lastUpdate = FileHelper::getContent($updatePath, FALSE)) !== FALSE && UtilitiesArrayHelper::check($updates))
$updatePath = self::getFilePath('path', 'updatelast', 'txt', 'vDm', JPATH_COMPONENT_ADMINISTRATOR);
if (($lastUpdate = @file_get_contents($updatePath)) !== FALSE && self::checkArray($updates))
{
// is it time to watch
if (self::$updateWatch_ > 0)
@ -392,7 +424,7 @@ abstract class SermondistributorHelper
}
}
// rest and start with the first key
if (!$next && UtilitiesArrayHelper::check($updates))
if (!$next && self::checkArray($updates))
{
// save the first set
$start = reset($updates);
@ -401,7 +433,7 @@ abstract class SermondistributorHelper
// save to file if next is found
if ($next)
{
FileHelper::write($updatePath,$next);
self::writeFile($updatePath,$next);
// convert to array of needed
if ($asArray)
{
@ -452,13 +484,13 @@ abstract class SermondistributorHelper
}
protected static function saveFile($data, $path_filename)
{
return FileHelper::write($path_filename, $data);
return self::writeFile($path_filename, $data);
}
public static function getExternalListingUpdateKeys($id = null, $updateMethod = 2, $returnType = 1)
{
// first check if this file already has statistics
$db = Factory::getDbo();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id','sharedurl','folder','permissiontype','dropboxoptions','build')));
$query->from($db->quoteName('#__sermondistributor_external_source'));
@ -470,7 +502,7 @@ abstract class SermondistributorHelper
{
$query->where($db->quoteName('id') . ' = '. (int) $id);
}
elseif ($id && UtilitiesArrayHelper::check($id))
elseif ($id && self::checkArray($id))
{
$ids = implode(',', array_map( 'intval', $id));
$query->where($db->quoteName('id') . ' IN (' . $ids . ')');
@ -490,19 +522,19 @@ abstract class SermondistributorHelper
switch ($result->dropboxoptions)
{
case 1: // sharedurl
if (JsonHelper::check($result->sharedurl))
if (self::checkJson($result->sharedurl))
{
$targets = json_decode($result->sharedurl)->tsharedurl;
}
break;
case 2: // folders
if (JsonHelper::check($result->folder))
if (self::checkJson($result->folder))
{
$targets = json_decode($result->folder)->tfolder;
}
break;
}
if (UtilitiesArrayHelper::check($targets))
if (self::checkArray($targets))
{
foreach ($targets as $key => $value)
{
@ -569,15 +601,15 @@ abstract class SermondistributorHelper
{
// Get local key
$localkey = self::getLocalKey();
$opener = new AES($localkey, 128);
$opener = new FOFEncryptAes($localkey, 128);
$counter = json_decode(rtrim($opener->decryptString($counter), "\0"));
if (ObjectHelper::check($counter))
if (self::checkObject($counter))
{
$counter->filename = $filename;
// set the date object
$date = Factory::getDate();
$date = JFactory::getDate();
// first check if this file already has statistics
$db = Factory::getDbo();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id','counter')));
$query->from($db->quoteName('#__sermondistributor_statistic'));
@ -618,14 +650,14 @@ abstract class SermondistributorHelper
public static function getFileInfo($key)
{
if (UtilitiesStringHelper::check($key) && (base64_encode(base64_decode($key, true)) === $key))
if (self::checkString($key) && (base64_encode(base64_decode($key, true)) === $key))
{
// Get local key
$localkey = self::getLocalKey();
$opener = new AES($localkey, 128);
$opener = new FOFEncryptAes($localkey, 128);
$key = rtrim($opener->decryptString($key), "\0");
// load the links from the database
$db = Factory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select('size');
@ -666,27 +698,27 @@ abstract class SermondistributorHelper
// build the Download File Name - first add the preacher name if set
if ($sermon->preacher)
{
$downloadName[] = UtilitiesStringHelper::safe($sermon->preacher_name,'U');
$downloadName[] = self::safeString($sermon->preacher_name,'U');
}
// add the series name if set
if ($sermon->series)
{
$downloadName[] = UtilitiesStringHelper::safe($sermon->series_name,'F');
$downloadName[] = self::safeString($sermon->series_name,'F');
}
// add the category name if set
if ($sermon->catid && UtilitiesStringHelper::check($sermon->category))
if ($sermon->catid && self::checkString($sermon->category))
{
$downloadName[] = UtilitiesStringHelper::safe($sermon->category, 'F');
$downloadName[] = self::safeString($sermon->category, 'F');
}
if ('dropbox_manual' == $type || 'local' == $type)
{
// add the main file name
$downloadName[] = UtilitiesStringHelper::safe($sermon->name,'F');
$downloadName[] = UtilitiesStringHelper::safe($file,'F');
$downloadName[] = self::safeString($sermon->name,'F');
$downloadName[] = self::safeString($file,'F');
}
else
{
$downloadName[] = UtilitiesStringHelper::safe($sermon->name,'F');
$downloadName[] = self::safeString($sermon->name,'F');
if ('error' == $fileType || strpos('?', $fileType) !== false || strpos('&', $fileType) !== false )
{
$fileType = 'mp3'; // TODO we don't know the url filetype (setting to mp3 but this could be wrong)
@ -702,7 +734,7 @@ abstract class SermondistributorHelper
public static function checkExternalSourceLocalListing($type, $get = 'links')
{
// get the local links
if (isset(self::${$get.'_externalsource_'.$type}) && UtilitiesArrayHelper::check(self::${$get.'_externalsource_'.$type}))
if (isset(self::${$get.'_externalsource_'.$type}) && self::checkArray(self::${$get.'_externalsource_'.$type}))
{
// return true we have links loaded
return true;
@ -714,7 +746,7 @@ abstract class SermondistributorHelper
if (isset($build[$type]))
{
// load the links from the database
$db = Factory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('key', $target[$get])));
@ -745,7 +777,7 @@ abstract class SermondistributorHelper
if (!isset(self::$localkey[$type]))
{
// get the main key
self::$localkey[$type] = ComponentHelper::getParams('com_sermondistributor')->get($type, 'localKey34fdWEkl');
self::$localkey[$type] = JComponentHelper::getParams('com_sermondistributor')->get($type, 'localKey34fdWEkl');
}
return self::$localkey[$type];
}
@ -760,7 +792,7 @@ abstract class SermondistributorHelper
// update types
$types = array('manual','auto');
// okay now update this type
if (UtilitiesStringHelper::check($type) && in_array($type,$types))
if (self::checkString($type) && in_array($type,$types))
{
$dropbox = new Dropboxupdater();
if ($dropbox->update($id, $target, $type, $force, $sleutel))
@ -771,7 +803,7 @@ abstract class SermondistributorHelper
return false;
}
}
self::setUpdateError($id, array(Text::_('COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND')));
self::setUpdateError($id, array(JText::_('COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND')));
return false;
}
@ -794,28 +826,28 @@ abstract class SermondistributorHelper
$updateInfo = self::updateInfo($id);
if (!$updateInfo)
{
$errors[] = Text::_('COM_SERMONDISTRIBUTOR_THIS_SOURCE_HAS_NO_LOCAL_LISTING_SET');
$errors[] = JText::_('COM_SERMONDISTRIBUTOR_THIS_SOURCE_HAS_NO_LOCAL_LISTING_SET');
}
// build the return string
if (isset($updateInfo['last']) || UtilitiesArrayHelper::check($errors))
if (isset($updateInfo['last']) || self::checkArray($errors))
{
$body = array();
// great we have source status
if (isset($updateInfo['last']))
{
$body[] = '<h3>'. Text::_('COM_SERMONDISTRIBUTOR_LISTING_INFO') . '</h3>';
$body[] = '<p><b>'. Text::_('COM_SERMONDISTRIBUTOR_LAST_UPDATE') . ':</b> <em>'.$updateInfo['last'];
$body[] = '</em><br /><b>'. Text::_('COM_SERMONDISTRIBUTOR_NUMBER_OF_FILES_LISTED') . ':</b> <em>'.$updateInfo['qty'];
$body[] = '<h3>'. JText::_('COM_SERMONDISTRIBUTOR_LISTING_INFO') . '</h3>';
$body[] = '<p><b>'. JText::_('COM_SERMONDISTRIBUTOR_LAST_UPDATE') . ':</b> <em>'.$updateInfo['last'];
$body[] = '</em><br /><b>'. JText::_('COM_SERMONDISTRIBUTOR_NUMBER_OF_FILES_LISTED') . ':</b> <em>'.$updateInfo['qty'];
$body[] = '</em></p>';
}
// now set any errors found
if (UtilitiesArrayHelper::check($errors))
if (self::checkArray($errors))
{
$body[] = '<h3>'. Text::_('COM_SERMONDISTRIBUTOR_NOTICE') . '</h3>';
$body[] = '<h3>'. JText::_('COM_SERMONDISTRIBUTOR_NOTICE') . '</h3>';
$body[] = implode('', $errors);
}
return '<a class="btn btn-small btn-success" href="#source-status'.$id.'" data-toggle="modal">'.Text::_('COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS').'</a>'
. Html::_('bootstrap.renderModal', 'source-status'.$id, array('title' => Text::_('COM_SERMONDISTRIBUTOR_SOURCE_STATUS_REPORT')), implode('', $body));
return '<a class="btn btn-small btn-success" href="#source-status'.$id.'" data-toggle="modal">'.JText::_('COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS').'</a>'
. JHtml::_('bootstrap.renderModal', 'source-status'.$id, array('title' => JText::_('COM_SERMONDISTRIBUTOR_SOURCE_STATUS_REPORT')), implode('', $body));
}
// no status found
return false;
@ -823,7 +855,7 @@ abstract class SermondistributorHelper
public static function updateInfo($id)
{
$db = Factory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.created','a.modified')));
@ -859,9 +891,9 @@ abstract class SermondistributorHelper
// get update error from file
if ($fileKey)
{
$file_path = FileHelper::getPath('path', 'updateerror', 'txt', $fileKey, JPATH_COMPONENT_ADMINISTRATOR);
$file_path = self::getFilePath('path', 'updateerror', 'txt', $fileKey, JPATH_COMPONENT_ADMINISTRATOR);
// check if it is set
if (($text = FileHelper::getContent($file_path, FALSE)) !== FALSE)
if (($text = @file_get_contents($file_path)) !== FALSE)
{
// no error on success
if ('success' != $text)
@ -871,16 +903,16 @@ abstract class SermondistributorHelper
}
return false;
}
elseif (isset(self::$updateErrors[$id]) && UtilitiesArrayHelper::check(self::$updateErrors[$id]))
elseif (isset(self::$updateErrors[$id]) && self::checkArray(self::$updateErrors[$id]))
{
return '<ul><li>'.implode('</li><li>', self::$updateErrors[$id]).'</li></ul>';
}
return Text::_('COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED');
return JText::_('COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED');
}
protected static function setUpdateError($id, $errorArray)
{
if (UtilitiesArrayHelper::check($errorArray) && $id > 0)
if (self::checkArray($errorArray) && $id > 0)
{
foreach ($errorArray as $error)
{
@ -1821,9 +1853,9 @@ abstract class SermondistributorHelper
**/
public static function getHelpUrl($view)
{
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$groups = $user->get('groups');
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.id','a.groups','a.target','a.type','a.article','a.url'));
$query->from('#__sermondistributor_help_document AS a');
@ -1894,51 +1926,154 @@ abstract class SermondistributorHelper
public static function addSubmenu($submenu)
{
// load user for access menus
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
// load the submenus to sidebar
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_DASHBOARD'), 'index.php?option=com_sermondistributor&view=sermondistributor', $submenu === 'sermondistributor');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_DASHBOARD'), 'index.php?option=com_sermondistributor&view=sermondistributor', $submenu === 'sermondistributor');
if ($user->authorise('preacher.access', 'com_sermondistributor') && $user->authorise('preacher.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_PREACHERS'), 'index.php?option=com_sermondistributor&view=preachers', $submenu === 'preachers');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_PREACHERS'), 'index.php?option=com_sermondistributor&view=preachers', $submenu === 'preachers');
}
if ($user->authorise('sermon.access', 'com_sermondistributor') && $user->authorise('sermon.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_SERMONS'), 'index.php?option=com_sermondistributor&view=sermons', $submenu === 'sermons');
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_sermondistributor.sermon', $submenu === 'categories.sermon');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_SERMONS'), 'index.php?option=com_sermondistributor&view=sermons', $submenu === 'sermons');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_sermondistributor.sermon', $submenu === 'categories.sermon');
}
if ($user->authorise('series.access', 'com_sermondistributor') && $user->authorise('series.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_SERIES_LIST'), 'index.php?option=com_sermondistributor&view=series_list', $submenu === 'series_list');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_SERIES_LIST'), 'index.php?option=com_sermondistributor&view=series_list', $submenu === 'series_list');
}
if ($user->authorise('statistic.access', 'com_sermondistributor') && $user->authorise('statistic.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_STATISTICS'), 'index.php?option=com_sermondistributor&view=statistics', $submenu === 'statistics');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_STATISTICS'), 'index.php?option=com_sermondistributor&view=statistics', $submenu === 'statistics');
}
if ($user->authorise('external_source.access', 'com_sermondistributor') && $user->authorise('external_source.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_EXTERNAL_SOURCES'), 'index.php?option=com_sermondistributor&view=external_sources', $submenu === 'external_sources');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_EXTERNAL_SOURCES'), 'index.php?option=com_sermondistributor&view=external_sources', $submenu === 'external_sources');
}
// Access control (manual_updater.access && manual_updater.submenu).
if ($user->authorise('manual_updater.access', 'com_sermondistributor') && $user->authorise('manual_updater.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_MANUAL_UPDATER'), 'index.php?option=com_sermondistributor&view=manual_updater', $submenu === 'manual_updater');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_MANUAL_UPDATER'), 'index.php?option=com_sermondistributor&view=manual_updater', $submenu === 'manual_updater');
}
if ($user->authorise('local_listing.access', 'com_sermondistributor') && $user->authorise('local_listing.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_LOCAL_LISTINGS'), 'index.php?option=com_sermondistributor&view=local_listings', $submenu === 'local_listings');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_LOCAL_LISTINGS'), 'index.php?option=com_sermondistributor&view=local_listings', $submenu === 'local_listings');
}
if ($user->authorise('help_document.access', 'com_sermondistributor') && $user->authorise('help_document.submenu', 'com_sermondistributor'))
{
\JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_sermondistributor&view=help_documents', $submenu === 'help_documents');
JHtmlSidebar::addEntry(Text::_('COM_SERMONDISTRIBUTOR_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_sermondistributor&view=help_documents', $submenu === 'help_documents');
}
}
/**
* UIKIT Component Classes
**/
public static $uk_components = array(
'data-uk-grid' => array(
'grid' ),
'uk-accordion' => array(
'accordion' ),
'uk-autocomplete' => array(
'autocomplete' ),
'data-uk-datepicker' => array(
'datepicker' ),
'uk-form-password' => array(
'form-password' ),
'uk-form-select' => array(
'form-select' ),
'data-uk-htmleditor' => array(
'htmleditor' ),
'data-uk-lightbox' => array(
'lightbox' ),
'uk-nestable' => array(
'nestable' ),
'UIkit.notify' => array(
'notify' ),
'data-uk-parallax' => array(
'parallax' ),
'uk-search' => array(
'search' ),
'uk-slider' => array(
'slider' ),
'uk-slideset' => array(
'slideset' ),
'uk-slideshow' => array(
'slideshow',
'slideshow-fx' ),
'uk-sortable' => array(
'sortable' ),
'data-uk-sticky' => array(
'sticky' ),
'data-uk-timepicker' => array(
'timepicker' ),
'data-uk-tooltip' => array(
'tooltip' ),
'uk-placeholder' => array(
'placeholder' ),
'uk-dotnav' => array(
'dotnav' ),
'uk-slidenav' => array(
'slidenav' ),
'uk-form' => array(
'form-advanced' ),
'uk-progress' => array(
'progress' ),
'upload-drop' => array(
'upload', 'form-file' )
);
/**
* Add UIKIT Components
**/
public static $uikit = false;
/**
* Get UIKIT Components
**/
public static function getUikitComp($content,$classes = array())
{
if (strpos($content,'class="uk-') !== false)
{
// reset
$temp = [];
foreach (self::$uk_components as $looking => $add)
{
if (strpos($content,$looking) !== false)
{
$temp[] = $looking;
}
}
// make sure uikit is loaded to config
if (strpos($content,'class="uk-') !== false)
{
self::$uikit = true;
}
// sorter
if (UtilitiesArrayHelper::check($temp))
{
// merger
if (UtilitiesArrayHelper::check($classes))
{
$newTemp = array_merge($temp,$classes);
$temp = array_unique($newTemp);
}
return $temp;
}
}
if (UtilitiesArrayHelper::check($classes))
{
return $classes;
}
return false;
}
/**
* Prepares the xml document
*/
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Vast Development Method', $description = null, $category = null,$keywords = null, $modified = null)
{
// set the user
$user = Factory::getUser();
// set fileName if not set
if (!$fileName)
{
@ -2228,7 +2363,7 @@ abstract class SermondistributorHelper
{
$type = 'item';
}
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__sermondistributor_'.$type.' AS a');
@ -2246,7 +2381,7 @@ abstract class SermondistributorHelper
public static function getGroupName($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
@ -2280,7 +2415,7 @@ abstract class SermondistributorHelper
if (!ObjectHelper::check($user))
{
// get the user object
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
}
// load the CMSObject
$result = new CMSObject;
@ -2460,55 +2595,51 @@ abstract class SermondistributorHelper
}
/**
* Returns any Model object.
*
* @param string $type The model type to instantiate
* @param string $prefix Prefix for the model class name. Optional.
* @param string $component Component name the model belongs to. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
* @throws \Exception
* @since 4.4
* Get any component's model
*/
public static function getModel(string $type, string $prefix = 'Administrator',
string $component = 'sermondistributor', array $config = [])
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Sermondistributor', $config = [])
{
// make sure the name is correct
$type = UtilitiesStringHelper::safe($type, 'F');
$component = strtolower($component);
if ($prefix !== 'Site' && $prefix !== 'Administrator')
// fix the name
$name = UtilitiesStringHelper::safe($name);
// full path to models
$fullPathModels = $path . '/models';
// load the model file
BaseDatabaseModel::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !UtilitiesStringHelper::check($config['table_path']))
{
$prefix = self::getPrefixFromModelPath($prefix);
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// Get the model through the MVCFactory
return Factory::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config);
}
/**
* Get the prefix from the model path
*
* @param string $path The model path
*
* @return string The prefix value
* @since 4.4
*/
protected static function getPrefixFromModelPath(string $path): string
{
// Check if $path starts with JPATH_ADMINISTRATOR path
if (str_starts_with($path, JPATH_ADMINISTRATOR . '/components/'))
// get instance
$model = BaseDatabaseModel::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
return 'Administrator';
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;
}
// build class names
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model
return new $modelClass($config);
}
}
// Check if $path starts with JPATH_SITE path
elseif (str_starts_with($path, JPATH_SITE . '/components/'))
{
return 'Site';
}
return 'Administrator';
return $model;
}
/**
@ -2560,7 +2691,7 @@ abstract class SermondistributorHelper
else
{
// Create an asset_id or heal one that is corrupted.
$object = new \StdClass();
$object = new stdClass();
// Must be a valid primary key value.
$object->id = $id;
@ -2584,7 +2715,7 @@ abstract class SermondistributorHelper
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))

View File

@ -6,8 +6,11 @@ COM_SERMONDISTRIBUTOR_ALWAYS_BETTER_TO_ADD_THE_FILES_TO_EXTERNAL_SOURCE_AND_LET_
COM_SERMONDISTRIBUTOR_ARCHIVED="Archived"
COM_SERMONDISTRIBUTOR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
COM_SERMONDISTRIBUTOR_AUTHOR="Author"
COM_SERMONDISTRIBUTOR_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading"
COM_SERMONDISTRIBUTOR_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading"
COM_SERMONDISTRIBUTOR_BACK="Back"
COM_SERMONDISTRIBUTOR_BCOULD_NOT_USE_THE_GIVEN_TOKEN_OR_THE_GIVEN_BUILD_OPTION_DOES_NOT_EXISTB="<b>Could not use the given token, or the given build option does not exist.</b>"
COM_SERMONDISTRIBUTOR_BETA_RELEASE="Beta Release"
COM_SERMONDISTRIBUTOR_BY_USING_AN_ACCESS_TOKEN_YOU_WILL_BE_ABLE_TO_MAKE_API_CALLS_FOR_YOUR_OWN_ACCOUNT_WITHOUT_GOING_THROUGH_THE_AUTHORIZATION_FLOW_DURING_THIS_MANUAL_UPDATE_OF_THE_LOCAL_LISTINGBR_THE_TOKEN_WILL_NOT_BE_STORED_AND_FOR_SAFETY_THE_TOKEN_WILL_BE_REVOKED_ONCE_THE_UPDATE_IS_COMPLETED_SUCCESSFULLYBR_BTHIS_WILL_MEAN_IT_CAN_ONLY_BE_USED_THIS_ONCEB_YOU_WOULD_NEED_A_NEW_TOKEN_EACH_TIME_YOU_RUN_THIS_UPDATE_MANUALLY_BR_SMALLMAKE_SURE_TO_HAVE_SSL_INPLACE_ON_THIS_PAGE_WHEN_DOING_THIS_UPDATE_AS_AN_EXTRA_SECURITY_MEASURESMALL="By using an access token, you will be able to make API calls for your own account without going through the authorization flow during this manual update of the local listing.<br />The token will not be stored and for safety the token will be revoked once the update is completed successfully.<br /><b>This will mean it can only be used this once</b>, you would need a new token each time you run this update manually. <br /><small>Make sure to have SSL in-place on this page when doing this update, as an extra security measure.</small>"
COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE="Categories (Site) Access"
COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC="Allows the users in this group to access site categories."
@ -18,6 +21,7 @@ COM_SERMONDISTRIBUTOR_CLEAR_LOCAL_LISTING="Clear Local Listing"
COM_SERMONDISTRIBUTOR_CLOSE_NEW="Close & New"
COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_DESCRIPTION="Allow add to external source button to show, this will expose the external source links."
COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_LABEL="External Source Button"
COM_SERMONDISTRIBUTOR_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR="Author Info"
COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component."
COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR_EMAIL_LABEL="Author Email"
@ -125,9 +129,11 @@ COM_SERMONDISTRIBUTOR_CONFIG_DARK_BLUE="Dark Blue"
COM_SERMONDISTRIBUTOR_CONFIG_DONT_LOAD="Not"
COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTION_DESC="The encryption key for the field encryption is set here."
COM_SERMONDISTRIBUTOR_CONFIG_ENCRYPTION_LABEL="Encryption Settings"
COM_SERMONDISTRIBUTOR_CONFIG_FLAT_LOAD="Flat"
COM_SERMONDISTRIBUTOR_CONFIG_FORCE_LOAD="Force"
COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_SERMONDISTRIBUTOR_CONFIG_GLOBAL_LABEL="Global"
COM_SERMONDISTRIBUTOR_CONFIG_GRADIANT_LOAD="Gradient"
COM_SERMONDISTRIBUTOR_CONFIG_GREEN="Green"
COM_SERMONDISTRIBUTOR_CONFIG_GRID="Grid"
COM_SERMONDISTRIBUTOR_CONFIG_HTML_5_BASIC="HTML 5 (basic)"
@ -313,12 +319,18 @@ COM_SERMONDISTRIBUTOR_CONFIG_SPACED="Spaced"
COM_SERMONDISTRIBUTOR_CONFIG_STRIPED="Striped"
COM_SERMONDISTRIBUTOR_CONFIG_TABLE="Table"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT="Uikit"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC="<b>The Parameters for the uikit are set here.</b><br />Uikit is a lightweight and modular front-end frameworkfor developing fast and powerful web interfaces. For more info visit <a href='https://getuikit.com/' target='_blank'>https://getuikit.com/</a>"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LABEL="Uikit3 Settings"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_DESC="<b>The Parameters for the uikit are set here.</b><br />Uikit is a lightweight and modular front-end frameworkfor developing fast and powerful web interfaces. For more info visit <a href='https://getuikit.com/v2/' target='_blank'>version 2</a> or <a href='https://getuikit.com/' target='_blank'>version 3</a>"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LABEL="Uikit2 and Uikit3 Settings"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LOAD_DESC="Set the uikit loading option."
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_LOAD_LABEL="Loading Options"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_DESC="Should the minified version of uikit files be loaded?"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_MIN_LABEL="Load Minified"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_DESC="Set the css style that should be used."
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_STYLE_LABEL="css Style"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_V2="Version 2"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_V3="Version 3"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_DESC="Select what version you would like to use"
COM_SERMONDISTRIBUTOR_CONFIG_UIKIT_VERSION_LABEL="Uikit Versions"
COM_SERMONDISTRIBUTOR_CONFIG_YES="Yes"
COM_SERMONDISTRIBUTOR_CONTRIBUTOR="Contributor"
COM_SERMONDISTRIBUTOR_CONTRIBUTORS="Contributors"
@ -339,6 +351,7 @@ COM_SERMONDISTRIBUTOR_DASHBOARD_SERMONS_CATID="Categories&nbsp;For<br />Sermons"
COM_SERMONDISTRIBUTOR_DASHBOARD_SERMON_ADD="Add&nbsp;Sermon<br /><br />"
COM_SERMONDISTRIBUTOR_DASHBOARD_STATISTICS="Statistics<br /><br />"
COM_SERMONDISTRIBUTOR_DATE="Date"
COM_SERMONDISTRIBUTOR_DOWNLOAD="download"
COM_SERMONDISTRIBUTOR_DOWNLOAD_NAME="Download Name"
COM_SERMONDISTRIBUTOR_EDIT_CREATED_BY="Edit Created By"
COM_SERMONDISTRIBUTOR_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by."
@ -380,9 +393,6 @@ 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_VERSION="External Sources Edit Version"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EMPTYSTATE_BUTTON_ADD="Add your first external source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EMPTYSTATE_CONTENT="External sources of files"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EMPTYSTATE_TITLE="No external sources have been created yet."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT="External Sources Export"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EXPORT_DESC="Allows the users in this group to export export external sources"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_IMPORT="External Sources Import"
@ -563,6 +573,7 @@ COM_SERMONDISTRIBUTOR_FILTER_SEARCH_PREACHERS="Search the preacher items. Prefix
COM_SERMONDISTRIBUTOR_FILTER_SEARCH_SERIES_LIST="Search the series items. Prefix with ID: to search for an item by ID."
COM_SERMONDISTRIBUTOR_FILTER_SEARCH_SERMONS="Search the sermon items. Prefix with ID: to search for an item by ID."
COM_SERMONDISTRIBUTOR_FILTER_SEARCH_STATISTICS="Search the statistic items. Prefix with ID: to search for an item by ID."
COM_SERMONDISTRIBUTOR_FILTER_SELECT_ACCESS="Select Access"
COM_SERMONDISTRIBUTOR_FILTER_SELECT_ADMIN_VIEWS="Select Admin Views"
COM_SERMONDISTRIBUTOR_FILTER_SELECT_BUILD_OPTION="Select Build Option"
COM_SERMONDISTRIBUTOR_FILTER_SELECT_DOWNLOAD_LINK_OPTION="Select Download Link Option"
@ -615,9 +626,6 @@ 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_VERSION="Help Documents Edit Version"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version help documents"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EMPTYSTATE_BUTTON_ADD="Add your first help document"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EMPTYSTATE_CONTENT="The help documentation of this component"
COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS_EMPTYSTATE_TITLE="No help documents have been created yet."
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_IMPORT="Help Documents Import"
@ -741,10 +749,13 @@ COM_SERMONDISTRIBUTOR_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import no
COM_SERMONDISTRIBUTOR_IMPORT_UPDATE_DATA="Import Data"
COM_SERMONDISTRIBUTOR_IMPORT_UPLOAD_BOTTON="Upload File"
COM_SERMONDISTRIBUTOR_INACTIVE="Inactive"
COM_SERMONDISTRIBUTOR_ISSUE="issue"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS="- Keep Original Access -"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE="- Keep Original State -"
COM_SERMONDISTRIBUTOR_LAST_FEW_RELEASES_FROM_GITHUB_IS_LOADING="Last few releases from Github is loading"
COM_SERMONDISTRIBUTOR_LAST_UPDATE="Last Update"
COM_SERMONDISTRIBUTOR_LATEST_RELEASE="Latest Release"
COM_SERMONDISTRIBUTOR_LICENSE="License"
COM_SERMONDISTRIBUTOR_LISTING_INFO="Listing Info"
COM_SERMONDISTRIBUTOR_LOCAL_LISTING="Local Listing"
@ -785,9 +796,6 @@ 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_VERSION="Local Listings Edit Version"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EMPTYSTATE_BUTTON_ADD="Add your first local listing"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EMPTYSTATE_CONTENT="Local Listing of files"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EMPTYSTATE_TITLE="No local listings have been created yet."
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT="Local Listings Export"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_EXPORT_DESC="Allows the users in this group to export export local listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_IMPORT="Local Listings Import"
@ -870,6 +878,7 @@ COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS_DESC="Allows
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to submenu of Manual Updater"
COM_SERMONDISTRIBUTOR_NEW="New"
COM_SERMONDISTRIBUTOR_NEW_ISSUE="New Issue"
COM_SERMONDISTRIBUTOR_NOTICE="Notice!"
COM_SERMONDISTRIBUTOR_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
COM_SERMONDISTRIBUTOR_NO_ACCESS_GRANTED="No Access Granted!"
@ -879,6 +888,12 @@ COM_SERMONDISTRIBUTOR_NO_FILES_LINKED_YET="No Files Linked Yet"
COM_SERMONDISTRIBUTOR_NO_ID_FOUND_CAN_NOT_RESET_THE_UPDATE_STATUS="No id found, can not reset the update status!"
COM_SERMONDISTRIBUTOR_NO_MANUAL_UPDATES_AVAILABLE="No Manual Updates Available"
COM_SERMONDISTRIBUTOR_NUMBER_OF_FILES_LISTED="Number of Files Listed"
COM_SERMONDISTRIBUTOR_ON_GITHUB="on Github"
COM_SERMONDISTRIBUTOR_OPEN="Open"
COM_SERMONDISTRIBUTOR_OPENED="opened"
COM_SERMONDISTRIBUTOR_OPENED_THIS="opened this"
COM_SERMONDISTRIBUTOR_OPEN_ON_GITHUB="Open on Github"
COM_SERMONDISTRIBUTOR_OUT_OF_DATE="Out of date"
COM_SERMONDISTRIBUTOR_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATER="Please check again later"
COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
@ -912,9 +927,6 @@ 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_VERSION="Preachers Edit Version"
COM_SERMONDISTRIBUTOR_PREACHERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_EMPTYSTATE_BUTTON_ADD="Add your first preacher"
COM_SERMONDISTRIBUTOR_PREACHERS_EMPTYSTATE_CONTENT="The Speakers/Preachers of the audio or video recordings."
COM_SERMONDISTRIBUTOR_PREACHERS_EMPTYSTATE_TITLE="No preachers have been created yet."
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT="Preachers Export"
COM_SERMONDISTRIBUTOR_PREACHERS_EXPORT_DESC="Allows the users in this group to export export preachers"
COM_SERMONDISTRIBUTOR_PREACHERS_IMPORT="Preachers Import"
@ -983,9 +995,12 @@ COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT="http://www.example.com"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_LABEL="Website"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_MESSAGE="Error! Please add website here."
COM_SERMONDISTRIBUTOR_PUBLISHED="Published"
COM_SERMONDISTRIBUTOR_RELEASED_THIS="released this"
COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL="Resetting the update status was successful!"
COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS="Reset Update Status"
COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE="Reset update status can not be done."
COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
COM_SERMONDISTRIBUTOR_SAVE_SUCCESS="Great! Item successfully saved."
COM_SERMONDISTRIBUTOR_SAVE_WARNING="The value already existed so please select another."
COM_SERMONDISTRIBUTOR_SELECT_AN_ADMIN_VIEW="Select an admin view"
@ -1038,9 +1053,6 @@ 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_VERSION="Series List Edit Version"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version series list"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EMPTYSTATE_BUTTON_ADD="Add your first series"
COM_SERMONDISTRIBUTOR_SERIES_LIST_EMPTYSTATE_CONTENT="Bundle a number of things of a similar kind or related nature coming one after another."
COM_SERMONDISTRIBUTOR_SERIES_LIST_EMPTYSTATE_TITLE="No series list have been created yet."
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_IMPORT="Series List Import"
@ -1115,9 +1127,6 @@ 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_VERSION="Sermons Edit Version"
COM_SERMONDISTRIBUTOR_SERMONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version sermons"
COM_SERMONDISTRIBUTOR_SERMONS_EMPTYSTATE_BUTTON_ADD="Add your first sermon"
COM_SERMONDISTRIBUTOR_SERMONS_EMPTYSTATE_CONTENT="The Sermon details of the audio or video recordings."
COM_SERMONDISTRIBUTOR_SERMONS_EMPTYSTATE_TITLE="No sermons have been created yet."
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT="Sermons Export"
COM_SERMONDISTRIBUTOR_SERMONS_EXPORT_DESC="Allows the users in this group to export export sermons"
COM_SERMONDISTRIBUTOR_SERMONS_IMPORT="Sermons Import"
@ -1255,9 +1264,6 @@ 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_VERSION="Statistics Edit Version"
COM_SERMONDISTRIBUTOR_STATISTICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EMPTYSTATE_BUTTON_ADD="Add your first statistic"
COM_SERMONDISTRIBUTOR_STATISTICS_EMPTYSTATE_CONTENT="The data on each file's statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_EMPTYSTATE_TITLE="No statistics have been created yet."
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT="Statistics Export"
COM_SERMONDISTRIBUTOR_STATISTICS_EXPORT_DESC="Allows the users in this group to export export statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_IMPORT="Statistics Import"
@ -1340,6 +1346,7 @@ COM_SERMONDISTRIBUTOR_THE_README_IS_LOADING="The readme is loading"
COM_SERMONDISTRIBUTOR_THE_UPDATE_IS_RUNNING="The update is running."
COM_SERMONDISTRIBUTOR_THE_WIKI_IS_LOADING="The wiki is loading"
COM_SERMONDISTRIBUTOR_THIS_SOURCE_HAS_NO_LOCAL_LISTING_SET="This source has no local listing set."
COM_SERMONDISTRIBUTOR_TOTAL_DOWNLOADS="total downloads"
COM_SERMONDISTRIBUTOR_TRASHED="Trashed"
COM_SERMONDISTRIBUTOR_TRASHED_ITEMS="Trashed items"
COM_SERMONDISTRIBUTOR_TRASH_AREA="Trash Area"
@ -1352,10 +1359,13 @@ COM_SERMONDISTRIBUTOR_TYPE_SERMON="Sermon"
COM_SERMONDISTRIBUTOR_TYPE_STATISTIC="Statistic"
COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED="Unknown error has occurred."
COM_SERMONDISTRIBUTOR_UPDATE_LOCAL_LINKS_OF_TARGET_S_EXTERNAL_SOURCE="Update Local Links of (target %s) External Source"
COM_SERMONDISTRIBUTOR_UP_TO_DATE="Up to date"
COM_SERMONDISTRIBUTOR_USE_BATCH="Use Batch"
COM_SERMONDISTRIBUTOR_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_SERMONDISTRIBUTOR_VERSION="Version"
COM_SERMONDISTRIBUTOR_VIEW_ERROR="View Error!"
COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github"
COM_SERMONDISTRIBUTOR_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github"
COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS="View Update Status"
COM_SERMONDISTRIBUTOR_WEBSITE="Website"
COM_SERMONDISTRIBUTOR_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."

View File

@ -120,15 +120,13 @@ COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS="Manual Upda
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_EXTERNAL_SOURCES_BUTTON_ACCESS_DESC="Allows the users in this group to access the external sources button."
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to submenu of Manual Updater"
COM_SERMONDISTRIBUTOR_MENU="Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU="&#187; Sermon Distributor"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_DESC="All categories that are published"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_OPTION="Categories"
COM_SERMONDISTRIBUTOR_MENU_CATEGORIES_TITLE="Categories"
COM_SERMONDISTRIBUTOR_MENU_CATEGORY_DESC="A category that is published"
COM_SERMONDISTRIBUTOR_MENU_CATEGORY_OPTION="Category"
COM_SERMONDISTRIBUTOR_MENU_CATEGORY_TITLE="Category"
COM_SERMONDISTRIBUTOR_MENU_DASHBOARD="Dashboard"
COM_SERMONDISTRIBUTOR_MENU_MANUAL_UPDATER="Manual Updater"
COM_SERMONDISTRIBUTOR_MENU_PREACHERS="Preachers"
COM_SERMONDISTRIBUTOR_MENU_PREACHERS_DESC="All preachers that are published"
COM_SERMONDISTRIBUTOR_MENU_PREACHERS_OPTION="Preachers"

View File

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

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage build_option_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,29 +38,21 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'externalsources'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,28 +38,20 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'not_required'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,29 +38,21 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'alias'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,28 +38,20 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'not_required'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -22,10 +22,10 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
use Joomla\CMS\Language\Text;
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,29 +38,21 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'name',
'size'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,29 +38,21 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'name',
'alias'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -22,10 +22,10 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
use Joomla\CMS\Language\Text;
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -22,19 +22,18 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\StringHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vvvsermons;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
@ -72,34 +71,34 @@ $can = SermondistributorHelper::getActions('sermon');
</div><br /><br />
<?php endif; ?>
<?php if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<th data-toggle="true">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-breakpoints="all" data-type="html" data-sort-use="text">
<th data-hide="all">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<th width="10" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
@ -108,9 +107,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = Factory::getContainer()->
get(\Joomla\CMS\User\UserFactoryInterface::class)->
loadUserById($item->checked_out);
$userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -151,25 +148,25 @@ $can = SermondistributorHelper::getActions('sermon');
<?php echo Text::_($item->source); ?>
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
@ -181,6 +178,13 @@ $can = SermondistributorHelper::getActions('sermon');
</tr>
<?php endforeach; ?>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="9">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
<?php else: ?>
<div class="alert alert-no-items">

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,29 +38,21 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'name',
'alias'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php
@ -22,10 +22,10 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
use Joomla\CMS\Language\Text;
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php
@ -22,19 +22,18 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use TrueChristianChurch\Joomla\Utilities\StringHelper;
use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults
$items = $displayData->vwcsermons;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_sermondistributor&view=sermons&task=sermon.edit";
@ -67,34 +66,34 @@ $can = SermondistributorHelper::getActions('sermon');
<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 if (ArrayHelper::check($items)): ?>
<table class="footable table data sermons" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<table class="footable table data sermons metro-blue" data-page-size="20" data-filter="#filter_sermons">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<th data-toggle="true">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_PREACHER_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<th data-hide="phone">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERIES_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SERMONS_CATEGORIES'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<th data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_LINK_TYPE_LABEL'); ?>
</th>
<th data-breakpoints="all" data-type="html" data-sort-use="text">
<th data-hide="all">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_SOURCE_LABEL'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<th width="10" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<th width="5" data-type="numeric" data-hide="phone,tablet">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_SERMON_ID'); ?>
</th>
</tr>
@ -103,9 +102,7 @@ $can = SermondistributorHelper::getActions('sermon');
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = Factory::getContainer()->
get(\Joomla\CMS\User\UserFactoryInterface::class)->
loadUserById($item->checked_out);
$userChkOut = Factory::getUser($item->checked_out);
$canDo = SermondistributorHelper::getActions('sermon',$item,'sermons');
?>
<tr>
@ -146,25 +143,25 @@ $can = SermondistributorHelper::getActions('sermon');
<?php echo Text::_($item->source); ?>
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<td class="center" data-value="1">
<span class="status-metro status-published" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<td class="center" data-value="2">
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<td class="center" data-value="3">
<span class="status-metro status-archived" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<td class="center" data-value="4">
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>">
<?php echo Text::_('COM_SERMONDISTRIBUTOR_TRASHED'); ?>
</span>
@ -176,6 +173,13 @@ $can = SermondistributorHelper::getActions('sermon');
</tr>
<?php endforeach; ?>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="9">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
<?php else: ?>
<div class="alert alert-no-items">

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -38,30 +38,22 @@ $layout_path_array = explode('.', $this->getLayoutId());
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
$fields = $displayData->get($fields_tab_layout) ?: array(
'name',
'alias',
'preacher'
];
// Ensure $fields is treated as an array and count its size.
$size = count((array) $fields);
// Use a ternary operator to determine the class.
// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="row title-alias form-vertical mb-3">
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

View File

@ -10,7 +10,7 @@
/------------------------------------------------------------------------------------------------------------------------------------/
@version 5.0.x
@version 3.0.x
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php
@ -23,7 +23,7 @@
/----------------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();

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