Compare commits

..

21 Commits
5.x ... 3.x

Author SHA1 Message Date
4f7059010d
Release of v3.1.3-alpha2
Improve the PHP environment setup validation. Add option to pass shared session via tag share.
2024-07-29 18:16:32 +02:00
615a7e0cef
Release of v3.1.3-alpha1
Improve the removeFolder method in the install script.
2024-07-15 17:17:39 +02:00
a5d86a255b
Release of v3.1.2
Refactored the API classes. Add table schema checker.
2024-07-15 09:56:23 +02:00
157a45a946
Release of v3.1.1
Add back to Bible button to Open AI page.
2024-04-29 19:05:14 +02:00
d9ba1b687b
Release of v3.1.0
Fix missing Joomla__aeb8e463_291f_4445_9ac4_34b637c12dbd__Power.
2024-04-29 10:44:12 +02:00
d9a6c983bc
Release of v3.0.9
Add PHP check on installation. Add Database check on installation.
2024-04-27 23:04:23 +02:00
20bd3dfb8b
Release of v3.0.8
Moved all library classes away from default Namespace and Folder path to avoid collusion on outdated classes.
2024-04-06 15:28:34 +02:00
325ed17c92
Release of v3.0.7
Update getBible loader to version 3.1.0.
2024-03-20 10:44:44 +02:00
06439867b2
Stable release of v3.0.6
Correct the url encoding to json_encode for none Latin languages. Fix type cast validation on search page.
2024-03-08 10:07:03 +02:00
59e7b843a5
Update on v3.0.5 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-07 18:21:19 +02:00
22c228239b
Stable release of v3.0.5
Fix missing token variable in ajax call.
2024-03-04 09:55:05 +02:00
044ab27cb5
Update on v3.0.4 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-01 22:26:30 +02:00
976f3ffc97
Update on v3.0.4 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-02-28 13:46:19 +02:00
04cc3bfaa9
Stable release of v3.0.4
Fix an Ajax input typo.
2024-02-19 00:22:23 +02:00
057c38f16f
Stable release of v3.0.3
Add option to target mysql 8+ with the search regex.
2024-02-18 23:54:30 +02:00
b26ab90cf1
Update on v3.0.2 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-02-10 11:06:01 +02:00
2fa7b8860e
Stable release of v3.0.2
More namespace updates.
2024-01-29 09:25:45 +02:00
5751ca60f5
Update on v3.0.1 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-01-26 17:18:26 +02:00
92add9d75d
Update the octojpack config. 2024-01-23 19:24:38 +02:00
bcffb565b8
Stable release of v3.0.1
Fix missing use statement in app model.
2024-01-22 11:15:49 +02:00
88104fd483
Stable release of v3.0.0
Move all JText to use the namespaced class Text directly. Move all JHtml to use the namespaced class Html directly. Move all JFactory to use the namespaced class Factory directly. Move all JRoute to use the namespaced class Route directly. Move all JFormHelper to use the namespaced class FormHelper directly. Move all JLayout to use the namespaced class FileLayout directly. Move all JLanguageMultilang to use the namespaced class Multilanguage directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JCategoryNode to use the namespaced class CategoryNode directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JToolbar to use the namespaced class Toolbar directly. Move all JToolbarHelper to use the namespaced class ToolbarHelper directly. Convert all addStyleSheet to make use of Html class instead. Convert all addScript to make use of Html class instead.
2024-01-22 10:48:28 +02:00
630 changed files with 14196 additions and 17625 deletions

View File

@ -9,8 +9,8 @@
"name": "PKG_GETBIBLE",
"code_name": "getbible",
"package_name": "pkg_getbible",
"min_joomla_version": "4.3",
"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",
@ -18,14 +18,14 @@
"author": "Llewellyn van der Merwe",
"author_email": "joomla@vdm.io",
"author_url": "https://io.vdm.dev/",
"description": "The Get Bible for Joomla 4 and 5.",
"description": "The Get Bible for Joomla 3.",
"version_id": "com_getbible",
"update_servers": "https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/update_server.xml"
"update_servers": "https://git.vdm.dev/getBible/joomla-component/raw/branch/3.10/update_server.xml"
},
"repository": {
"owner": "getBible",
"repo": "joomla-pkg",
"branch": "5.0"
"branch": "3.10"
},
"files": [
{
@ -33,7 +33,7 @@
"repo": "joomla-component",
"id": "com_getbible",
"type": "component",
"mode": "5.0"
"mode": "3.10"
},
{
"owner": "getBible",

View File

@ -1,80 +1,229 @@
# v5.0.15-alpha4
# v3.1.3-alpha2
- Improve the PHP environment setup validation
- Add option to pass shared session via tag share
# v5.0.15-alpha
# v3.1.3-alpha
- Refactored the API classes
- Add table schema checker
- Fix install issue with missing method removeFolder
- Fix display error with correct component namespace update form JCB
- Fix update error of undefined folder method (exists)
- Improve the removeFolder method in the install script
# v5.0.13
# v3.1.1
- Add back to Bible button to Open AI page.
# v5.0.12
# v3.1.0
- Fix missing Joomla__aeb8e463_291f_4445_9ac4_34b637c12dbd__Power.
# v3.0.9
- Add PHP check on installation.
- Add Database check on installation.
# v5.0.11
# v3.0.8
- Moved all library classes away from default Namespace and Folder path to avoid collusion on outdated classes.
# v5.0.10
# v3.0.7
- Update getBible loader to version 3.1.0
# v5.0.9
# v3.0.6
- Correct the url encoding to json_encode for none Latin languages.
- Fix type cast validation on search page.
# v5.0.8
- Fix wrong class naming.
# v5.0.7
# v3.0.5
- Fix missing token variable in ajax call
# v5.0.6
# v3.0.4
- Fix an Ajax input typo.
- Fix an Ajax input typo.
# v5.0.5
# v3.0.3
- Add option to target MySQL 8+ with the search regex.
- Add option to target mysql 8+ with the search regex.
# v5.0.4
# v3.0.2
- Fix the spl_autoload_register function to load all the needed namespace. That was remove in the last update (sorry).
- More namespace updates.
# v5.0.3
# v3.0.1
- Fix canDelete to correctly use published.
- Add default 1 to version field to make sure the versioning feature works as expected.
- Fix missing use statement in app model.
# v5.0.2
# v3.0.0
- Fix Daily Light Deprecated code.
- Fix Daily Scripture Deprecated code.
- Move all JText to use the namespaced class Text directly.
- Move all JHtml to use the namespaced class Html directly.
- Move all JFactory to use the namespaced class Factory directly.
- Move all JRoute to use the namespaced class Route directly.
- Move all JFormHelper to use the namespaced class FormHelper directly.
- Move all JLayout to use the namespaced class FileLayout directly.
- Move all JLanguageMultilang to use the namespaced class Multilanguage directly.
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
- Move all JCategoryNode to use the namespaced class CategoryNode directly.
- Move all JComponentHelper to use the namespaced class ComponentHelper directly.
- Move all JToolbar to use the namespaced class Toolbar directly.
- Move all JToolbarHelper to use the namespaced class ToolbarHelper directly.
- Convert all addStyleSheet to make use of Html class instead.
- Convert all addScript to make use of Html class instead.
# v5.0.1
# v2.0.32
- First stable back-end and front-end release towards Joomla 4 and 5
- Fixed other search related issues.
# v5.0.0
# v2.0.31
- Moved to Joomla 4 and 5
- Fixed #10 so that exact search results now work correctly.
- Update scripture loader to version 3.0.3
# v4.0.13
# v2.0.30
- Add back to Bible button to Open AI page.
- Update scripture loader to version 3.0.2
# v3.1.1
# v2.0.29
- Add back to Bible button to Open AI page.
- Update scripture loader to version 3.0.1
# v2.0.28
- Small xml fix
# v2.0.27
- Improved the load scripture plugin.
# v2.0.26
- Adds few try catch blocks in the API.
- Adds local link to daily scripture module.
# v2.0.25
- Adds getBible Loader Plugin
# v2.0.23
- Refactored all core helper functions to make use of New classes
- Adds open ai meta data to page
- Other JCB fixes
# v2.0.22
- Fixed search redirect bug
# v2.0.21
- Adds Tags meta data to tag pages
- Adds option to share a tag
- Improve the URL creation, and return URL feature for search and tag pages
# v2.0.20
- First step to resolve getBible/support#8 so that the selection works on mobile browsers.
- Fixed the scrolling for mobiles.
# v2.0.19
- Adds metadata to each Bible page to resolve getBible/support#6
- Adds option to force chapter hash checking.
# v2.0.18
- Adds bottom module position on tag, search, ai and app pages.
- Fixed JavaScript Database Manager some more.
# v2.0.17
- Adds brut-force protection
# v2.0.16
- Fixed JavaScript Database Manager
# v2.0.15
- Adds new session option
- Adds make public switches to back-end
# v2.0.14
- Adds install mysql commands for faster queries on large systems.
- Fixes mobile layout on settings active session tab.
- Making correction to tag descriptions.
# v2.0.13
- Fix tag issues
- Adds Footable to back-end
- Fix chapter issue of app page
- Moves translations tab
# v2.0.12
- Fixes Links to Translations (to use their own book names)
# v2.0.11
- Adds better translation selection by Language
# v2.0.9
- Adds create tags on front-end.
- Adds update tags on front-end.
- Adds delete of tags on front-end.
- Improves verse view in note, and tag modal.
- Other bug fixes.
# v2.0.8
- Adds easy option to update book names in the back-end.
- Adds easy option to sync translations details in the back-end.
# v2.0.7
- Adds force update option
- Improves the book name display on Bible page
# v2.0.6
- Adds updating watchers for book names, and translation details.
- Adds edit option to owned tags
- Better session management that allows sharing sessions.
- Few bug fixes
# v2.0.5
- Adds list of default system tags
- Adds linker session manager
- Adds option to share sessions
# v2.0.4
- Added the option to set the default Translation.
- Fixed sharing of a verse, so its auto selected when verse number is clicked.
# v2.0.3
- Fixed getBible/support#2 so that the view value does not result into Undefined.
- Fixed getBible/support#3 so that empty translations and translations without the selected books better manage the mismatching query.
# v2.0.2
- Adds missing Marked JS file
# v2.0.1
- New System Architecture as to how Scripture is added
- New Application Page (Bible Page)
- New Linker (anonymous users) system
- SEO for each chapter of the Bible
- New Easy Sharing System
- New Tagging system
- New Notes system
- New Search system
- Integration with OpenAI

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# Get Bible (5.0.15-alpha4)
# Get Bible (3.1.3-alpha2)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide.
@ -19,37 +19,37 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 29th July, 2024
+ *Version*: 5.0.15-alpha4
+ *Version*: 3.1.3-alpha2
+ *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
**670 Hours** or **84 Eight Hour Days** (actual time the author saved -
**648 Hours** or **81 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*: **240201**
+ *File count*: **1953**
+ *Folder count*: **195**
+ *Line count*: **232257**
+ *File count*: **1944**
+ *Folder count*: **156**
**442 Hours** or **55 Eight Hour Days** (the actual time the author spent)
**427 Hours** or **53 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @168hours** = codingtime / 4;
> **planning @96hours** = codingtime / 7;
> **mapping @67hours** = codingtime / 10;
> **office @112hours** = codingtime / 6;)
> **debugging @162hours** = codingtime / 4;
> **planning @93hours** = codingtime / 7;
> **mapping @65hours** = codingtime / 10;
> **office @108hours** = codingtime / 6;)
**1112 Hours** or **139 Eight Hour Days**
**1075 Hours** or **134 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: **27.8 weeks** or **5.8 months**
Project duration: **26.8 weeks** or **5.6 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)

View File

@ -1,6 +1,6 @@
# Get Bible (5.0.15-alpha4)
# Get Bible (3.1.3-alpha2)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide.
@ -19,37 +19,37 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 29th July, 2024
+ *Version*: 5.0.15-alpha4
+ *Version*: 3.1.3-alpha2
+ *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
**670 Hours** or **84 Eight Hour Days** (actual time the author saved -
**648 Hours** or **81 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*: **240201**
+ *File count*: **1953**
+ *Folder count*: **195**
+ *Line count*: **232257**
+ *File count*: **1944**
+ *Folder count*: **156**
**442 Hours** or **55 Eight Hour Days** (the actual time the author spent)
**427 Hours** or **53 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @168hours** = codingtime / 4;
> **planning @96hours** = codingtime / 7;
> **mapping @67hours** = codingtime / 10;
> **office @112hours** = codingtime / 6;)
> **debugging @162hours** = codingtime / 4;
> **planning @93hours** = codingtime / 7;
> **mapping @65hours** = codingtime / 10;
> **office @108hours** = codingtime / 6;)
**1112 Hours** or **139 Eight Hour Days**
**1075 Hours** or **134 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: **27.8 weeks** or **5.8 months**
Project duration: **26.8 weeks** or **5.6 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)

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset
addruleprefix="TrueChristianBible\Component\Getbible\Administrator\Rule"
addfieldprefix="TrueChristianBible\Component\Getbible\Administrator\Field"
addrulepath="/administrator/components/com_getbible/models/rules"
addfieldpath="/administrator/components/com_getbible/models/fields"
name="global_config"
label="COM_GETBIBLE_CONFIG_GLOBAL_LABEL"
description="COM_GETBIBLE_CONFIG_GLOBAL_DESC">

134
admin/controller.php Normal file
View File

@ -0,0 +1,134 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// 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 TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
/**
* General Controller of Getbible component
*/
class GetbibleController 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'] = 'getbible';
parent::__construct($config);
}
/**
* display task
*
* @return void
*/
function display($cachable = false, $urlparams = false)
{
// set default view if not set
$view = $this->input->getCmd('view', 'getbible');
$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_getbible.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_getbible&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
}
elseif (StringHelper::check($ref))
{
// redirect to ref
$this->setRedirect(Route::_('index.php?option=com_getbible&view='.(string)$ref, false));
}
else
{
// normal redirect back to the list view
$this->setRedirect(Route::_('index.php?option=com_getbible&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(
'linker' => 'linkers',
'note' => 'notes',
'tagged_verse' => 'tagged_verses',
'prompt' => 'prompts',
'open_ai_response' => 'open_ai_responses',
'open_ai_message' => 'open_ai_messages',
'password' => 'passwords',
'tag' => 'tags',
'translation' => 'translations',
'book' => 'books',
'chapter' => 'chapters',
'verse' => 'verses'
);
// 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

@ -14,66 +14,44 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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;
/**
* Getbible Ajax Base Controller
*
* @since 1.6
*/
class AjaxController extends BaseController
class GetbibleControllerAjax 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('getWiki', 'ajax');
$this->registerTask('getVersion', '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!
@ -91,19 +69,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)
{
@ -140,19 +118,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)
{
@ -189,19 +167,19 @@ class AjaxController extends BaseController
$nameValue = $jinput->get('name', NULL, 'WORD');
if($nameValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getWiki($nameValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -238,19 +216,19 @@ class AjaxController extends BaseController
$versionValue = $jinput->get('version', NULL, 'INT');
if($versionValue && $user->id != 0)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
$ajaxModule = $this->getModel('ajax');
if ($ajaxModule)
{
$result = $ajaxModule->getVersion($versionValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
$result = false;
}
if($callback)
{
@ -288,15 +266,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

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Book Form Controller
*
* @since 1.6
*/
class BookController extends FormController
class GetbibleControllerBook extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_BOOK';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class BookController 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 = 'books';
public function __construct($config = [])
{
$this->view_list = 'Books'; // 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.
@ -80,7 +66,7 @@ class BookController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('book.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class BookController 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;
@ -335,7 +321,7 @@ class BookController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,19 +24,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Books Admin Controller
*
* @since 1.6
*/
class BooksController extends AdminController
class GetbibleControllerBooks extends AdminController
{
/**
* The prefix to use with controller messages.
@ -45,17 +41,17 @@ class BooksController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_BOOKS';
/**
* 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 = 'Book', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Book', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Chapter Form Controller
*
* @since 1.6
*/
class ChapterController extends FormController
class GetbibleControllerChapter extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_CHAPTER';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class ChapterController 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 = 'chapters';
public function __construct($config = [])
{
$this->view_list = 'Chapters'; // 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.
@ -80,7 +66,7 @@ class ChapterController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('chapter.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class ChapterController 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;
@ -335,7 +321,7 @@ class ChapterController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Chapters Admin Controller
*
* @since 1.6
*/
class ChaptersController extends AdminController
class GetbibleControllerChapters extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class ChaptersController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_CHAPTERS';
/**
* 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 = 'Chapter', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Chapter', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Getbible Admin Controller
*
* @since 1.6
*/
class GetbibleController extends AdminController
class GetbibleControllerGetbible extends AdminController
{
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Linker Form Controller
*
* @since 1.6
*/
class LinkerController extends FormController
class GetbibleControllerLinker extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_LINKER';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class LinkerController 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 = 'linkers';
public function __construct($config = [])
{
$this->view_list = 'Linkers'; // 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.
@ -80,7 +66,7 @@ class LinkerController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('linker.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class LinkerController 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;
@ -335,7 +321,7 @@ class LinkerController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Linkers Admin Controller
*
* @since 1.6
*/
class LinkersController extends AdminController
class GetbibleControllerLinkers extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class LinkersController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_LINKERS';
/**
* 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 = 'Linker', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Linker', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Note Form Controller
*
* @since 1.6
*/
class NoteController extends FormController
class GetbibleControllerNote extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_NOTE';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class NoteController 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 = 'notes';
public function __construct($config = [])
{
$this->view_list = 'Notes'; // 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.
@ -80,7 +66,7 @@ class NoteController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('note.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class NoteController 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;
@ -335,7 +321,7 @@ class NoteController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Notes Admin Controller
*
* @since 1.6
*/
class NotesController extends AdminController
class GetbibleControllerNotes extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class NotesController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_NOTES';
/**
* 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 = 'Note', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Note', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Open_ai_message Form Controller
*
* @since 1.6
*/
class Open_ai_messageController extends FormController
class GetbibleControllerOpen_ai_message extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_OPEN_AI_MESSAGE';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class Open_ai_messageController 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 = 'open_ai_messages';
public function __construct($config = [])
{
$this->view_list = 'Open_ai_messages'; // 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.
@ -80,7 +66,7 @@ class Open_ai_messageController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('open_ai_message.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class Open_ai_messageController 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;
@ -335,7 +321,7 @@ class Open_ai_messageController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Open_ai_messages Admin Controller
*
* @since 1.6
*/
class Open_ai_messagesController extends AdminController
class GetbibleControllerOpen_ai_messages extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class Open_ai_messagesController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_OPEN_AI_MESSAGES';
/**
* 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 = 'Open_ai_message', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Open_ai_message', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Open_ai_response Form Controller
*
* @since 1.6
*/
class Open_ai_responseController extends FormController
class GetbibleControllerOpen_ai_response extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_OPEN_AI_RESPONSE';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class Open_ai_responseController 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 = 'open_ai_responses';
public function __construct($config = [])
{
$this->view_list = 'Open_ai_responses'; // 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.
@ -80,7 +66,7 @@ class Open_ai_responseController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('open_ai_response.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class Open_ai_responseController 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;
@ -335,7 +321,7 @@ class Open_ai_responseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Open_ai_responses Admin Controller
*
* @since 1.6
*/
class Open_ai_responsesController extends AdminController
class GetbibleControllerOpen_ai_responses extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class Open_ai_responsesController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_OPEN_AI_RESPONSES';
/**
* 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 = 'Open_ai_response', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Open_ai_response', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Password Form Controller
*
* @since 1.6
*/
class PasswordController extends FormController
class GetbibleControllerPassword extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_PASSWORD';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class PasswordController 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 = 'passwords';
public function __construct($config = [])
{
$this->view_list = 'Passwords'; // 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.
@ -80,7 +66,7 @@ class PasswordController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('password.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class PasswordController 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;
@ -335,7 +321,7 @@ class PasswordController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Passwords Admin Controller
*
* @since 1.6
*/
class PasswordsController extends AdminController
class GetbibleControllerPasswords extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class PasswordsController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_PASSWORDS';
/**
* 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 = 'Password', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Password', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Prompt Form Controller
*
* @since 1.6
*/
class PromptController extends FormController
class GetbibleControllerPrompt extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_PROMPT';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class PromptController 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 = 'prompts';
public function __construct($config = [])
{
$this->view_list = 'Prompts'; // 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.
@ -80,7 +66,7 @@ class PromptController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('prompt.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class PromptController 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;
@ -335,7 +321,7 @@ class PromptController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Prompts Admin Controller
*
* @since 1.6
*/
class PromptsController extends AdminController
class GetbibleControllerPrompts extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class PromptsController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_PROMPTS';
/**
* 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 = 'Prompt', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Prompt', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Tag Form Controller
*
* @since 1.6
*/
class TagController extends FormController
class GetbibleControllerTag extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_TAG';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class TagController 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 = 'tags';
public function __construct($config = [])
{
$this->view_list = 'Tags'; // 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.
@ -80,7 +66,7 @@ class TagController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('tag.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class TagController 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;
@ -335,7 +321,7 @@ class TagController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Tagged_verse Form Controller
*
* @since 1.6
*/
class Tagged_verseController extends FormController
class GetbibleControllerTagged_verse extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_TAGGED_VERSE';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class Tagged_verseController 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 = 'tagged_verses';
public function __construct($config = [])
{
$this->view_list = 'Tagged_verses'; // 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.
@ -80,7 +66,7 @@ class Tagged_verseController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('tagged_verse.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class Tagged_verseController 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;
@ -335,7 +321,7 @@ class Tagged_verseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Tagged_verses Admin Controller
*
* @since 1.6
*/
class Tagged_versesController extends AdminController
class GetbibleControllerTagged_verses extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class Tagged_versesController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_TAGGED_VERSES';
/**
* 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 = 'Tagged_verse', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Tagged_verse', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Tags Admin Controller
*
* @since 1.6
*/
class TagsController extends AdminController
class GetbibleControllerTags extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class TagsController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_TAGS';
/**
* 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 = 'Tag', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Tag', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Translation Form Controller
*
* @since 1.6
*/
class TranslationController extends FormController
class GetbibleControllerTranslation extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_TRANSLATION';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class TranslationController 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 = 'translations';
public function __construct($config = [])
{
$this->view_list = 'Translations'; // 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.
@ -80,7 +66,7 @@ class TranslationController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('translation.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class TranslationController 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;
@ -335,7 +321,7 @@ class TranslationController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,19 +24,13 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Translations Admin Controller
*
* @since 1.6
*/
class TranslationsController extends AdminController
class GetbibleControllerTranslations extends AdminController
{
/**
* The prefix to use with controller messages.
@ -45,17 +41,17 @@ class TranslationsController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_TRANSLATIONS';
/**
* 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 = 'Translation', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Translation', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

View File

@ -14,43 +14,24 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Verse Form Controller
*
* @since 1.6
*/
class VerseController extends FormController
class GetbibleControllerVerse extends FormController
{
use VersionableControllerTrait;
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_GETBIBLE_VERSE';
/**
* Current or most recently performed task.
*
@ -61,12 +42,17 @@ class VerseController 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 = 'verses';
public function __construct($config = [])
{
$this->view_list = 'Verses'; // 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.
@ -80,7 +66,7 @@ class VerseController extends FormController
protected function allowAdd($data = [])
{
// Get user object.
$user = $this->app->getIdentity();
$user = Factory::getUser();
// Access check.
$access = $user->authorise('verse.access', 'com_getbible');
if (!$access)
@ -105,7 +91,7 @@ class VerseController 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;
@ -335,7 +321,7 @@ class VerseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel $model The data model object.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -14,7 +14,9 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Controller;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@ -22,17 +24,11 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Verses Admin Controller
*
* @since 1.6
*/
class VersesController extends AdminController
class GetbibleControllerVerses extends AdminController
{
/**
* The prefix to use with controller messages.
@ -43,17 +39,17 @@ class VersesController extends AdminController
protected $text_prefix = 'COM_GETBIBLE_VERSES';
/**
* 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 = 'Verse', $prefix = 'Administrator', $config = ['ignore_request' => true])
public function getModel($name = 'Verse', $prefix = 'GetbibleModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}

55
admin/getbible.php Normal file
View File

@ -0,0 +1,55 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/helpers/powerloader.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\MVC\Controller\BaseController;
// Access check.
if (!Factory::getUser()->authorise('core.manage', 'com_getbible'))
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
// Add CSS file for all pages
Html::_('stylesheet', 'components/com_getbible/assets/css/admin.css', ['version' => 'auto']);
Html::_('script', 'components/com_getbible/assets/js/admin.js', ['version' => 'auto']);
// require helper files
JLoader::register('GetbibleHelper', __DIR__ . '/helpers/getbible.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
// Get an instance of the controller prefixed by Getbible
$controller = BaseController::getInstance('Getbible');
// Perform the Request task
$controller->execute(Factory::getApplication()->input->get('task'));
// Redirect if set by the controller
$controller->redirect();

View File

@ -14,10 +14,12 @@
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Administrator\Helper;
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/src/Helper/PowerloaderHelper.php';
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/helpers/powerloader.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
@ -32,11 +34,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;
@ -49,13 +49,8 @@ use TrueChristianBible\Joomla\Utilities\JsonHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianBible\Joomla\Utilities\FormHelper;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Getbible component helper.
*
* @since 3.0
*/
abstract class GetbibleHelper
{
@ -195,7 +190,7 @@ abstract class GetbibleHelper
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_GETBIBLE_SUBMENU_DASHBOARD'), 'index.php?option=com_getbible&view=getbible', $submenu === 'getbible');
if ($user->authorise('linker.access', 'com_getbible') && $user->authorise('linker.submenu', 'com_getbible'))
@ -317,7 +312,7 @@ abstract class GetbibleHelper
{
$type = 'item';
}
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__getbible_'.$type.' AS a');
@ -335,7 +330,7 @@ abstract class GetbibleHelper
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');
@ -369,7 +364,7 @@ abstract class GetbibleHelper
if (!ObjectHelper::check($user))
{
// get the user object
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
}
// load the CMSObject
$result = new CMSObject;
@ -549,55 +544,51 @@ abstract class GetbibleHelper
}
/**
* 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 = 'getbible', array $config = [])
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Getbible', $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;
}
/**
@ -649,7 +640,7 @@ abstract class GetbibleHelper
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;
@ -673,7 +664,7 @@ abstract class GetbibleHelper
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

@ -0,0 +1,95 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
class getbibleHeaderCheck
{
protected $document = null;
protected $app = null;
function js_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['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,84 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// 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

@ -40,9 +40,6 @@ COM_GETBIBLE_BOOKS_EDIT_SHA="Books Edit Sha"
COM_GETBIBLE_BOOKS_EDIT_SHA_DESC="Allows the users in this group to edit sha of book"
COM_GETBIBLE_BOOKS_EDIT_STATE="Books Edit State"
COM_GETBIBLE_BOOKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the book"
COM_GETBIBLE_BOOKS_EMPTYSTATE_BUTTON_ADD="Add your first book"
COM_GETBIBLE_BOOKS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_BOOKS_EMPTYSTATE_TITLE="No books have been created yet."
COM_GETBIBLE_BOOKS_N_ITEMS_ARCHIVED="%s Books archived."
COM_GETBIBLE_BOOKS_N_ITEMS_ARCHIVED_1="%s Book archived."
COM_GETBIBLE_BOOKS_N_ITEMS_CHECKED_IN_0="No Book successfully checked in."
@ -133,9 +130,6 @@ COM_GETBIBLE_CHAPTERS_EDIT_SHA="Chapters Edit Sha"
COM_GETBIBLE_CHAPTERS_EDIT_SHA_DESC="Allows the users in this group to edit sha of chapter"
COM_GETBIBLE_CHAPTERS_EDIT_STATE="Chapters Edit State"
COM_GETBIBLE_CHAPTERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the chapter"
COM_GETBIBLE_CHAPTERS_EMPTYSTATE_BUTTON_ADD="Add your first chapter"
COM_GETBIBLE_CHAPTERS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_CHAPTERS_EMPTYSTATE_TITLE="No chapters have been created yet."
COM_GETBIBLE_CHAPTERS_N_ITEMS_ARCHIVED="%s Chapters archived."
COM_GETBIBLE_CHAPTERS_N_ITEMS_ARCHIVED_1="%s Chapter archived."
COM_GETBIBLE_CHAPTERS_N_ITEMS_CHECKED_IN_0="No Chapter successfully checked in."
@ -663,9 +657,6 @@ COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES="Linkers Edit Public Tagged Verse
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES_DESC="Allows the users in this group to edit public tagged verses of linker"
COM_GETBIBLE_LINKERS_EDIT_STATE="Linkers Edit State"
COM_GETBIBLE_LINKERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the linker"
COM_GETBIBLE_LINKERS_EMPTYSTATE_BUTTON_ADD="Add your first linker"
COM_GETBIBLE_LINKERS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_LINKERS_EMPTYSTATE_TITLE="No linkers have been created yet."
COM_GETBIBLE_LINKERS_N_ITEMS_ARCHIVED="%s Linkers archived."
COM_GETBIBLE_LINKERS_N_ITEMS_ARCHIVED_1="%s Linker archived."
COM_GETBIBLE_LINKERS_N_ITEMS_CHECKED_IN_0="No Linker successfully checked in."
@ -764,9 +755,6 @@ COM_GETBIBLE_NOTES_EDIT_VERSE="Notes Edit Verse"
COM_GETBIBLE_NOTES_EDIT_VERSE_DESC="Allows the users in this group to edit verse of note"
COM_GETBIBLE_NOTES_EDIT_VERSION="Notes Edit Version"
COM_GETBIBLE_NOTES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version notes"
COM_GETBIBLE_NOTES_EMPTYSTATE_BUTTON_ADD="Add your first note"
COM_GETBIBLE_NOTES_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_NOTES_EMPTYSTATE_TITLE="No notes have been created yet."
COM_GETBIBLE_NOTES_N_ITEMS_ARCHIVED="%s Notes archived."
COM_GETBIBLE_NOTES_N_ITEMS_ARCHIVED_1="%s Note archived."
COM_GETBIBLE_NOTES_N_ITEMS_CHECKED_IN_0="No Note successfully checked in."
@ -871,9 +859,6 @@ COM_GETBIBLE_OPEN_AI_MESSAGES_EDIT_STATE="Open Ai Messages Edit State"
COM_GETBIBLE_OPEN_AI_MESSAGES_EDIT_STATE_DESC="Allows the users in this group to update the state of the open ai message"
COM_GETBIBLE_OPEN_AI_MESSAGES_EDIT_VERSION="Open Ai Messages Edit Version"
COM_GETBIBLE_OPEN_AI_MESSAGES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version open ai messages"
COM_GETBIBLE_OPEN_AI_MESSAGES_EMPTYSTATE_BUTTON_ADD="Add your first open ai message"
COM_GETBIBLE_OPEN_AI_MESSAGES_EMPTYSTATE_CONTENT="Open AI Messages Received"
COM_GETBIBLE_OPEN_AI_MESSAGES_EMPTYSTATE_TITLE="No open ai messages have been created yet."
COM_GETBIBLE_OPEN_AI_MESSAGES_N_ITEMS_ARCHIVED="%s Open AI Messages archived."
COM_GETBIBLE_OPEN_AI_MESSAGES_N_ITEMS_ARCHIVED_1="%s Open AI Message archived."
COM_GETBIBLE_OPEN_AI_MESSAGES_N_ITEMS_CHECKED_IN_0="No Open AI Message successfully checked in."
@ -1005,9 +990,6 @@ COM_GETBIBLE_OPEN_AI_RESPONSES_EDIT_VERSION="Open Ai Responses Edit Version"
COM_GETBIBLE_OPEN_AI_RESPONSES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version open ai responses"
COM_GETBIBLE_OPEN_AI_RESPONSES_EDIT_WORD="Open Ai Responses Edit Word"
COM_GETBIBLE_OPEN_AI_RESPONSES_EDIT_WORD_DESC="Allows the users in this group to edit word of open ai response"
COM_GETBIBLE_OPEN_AI_RESPONSES_EMPTYSTATE_BUTTON_ADD="Add your first open ai response"
COM_GETBIBLE_OPEN_AI_RESPONSES_EMPTYSTATE_CONTENT="Open AI Response Received"
COM_GETBIBLE_OPEN_AI_RESPONSES_EMPTYSTATE_TITLE="No open ai responses have been created yet."
COM_GETBIBLE_OPEN_AI_RESPONSES_N_ITEMS_ARCHIVED="%s Open AI Responses archived."
COM_GETBIBLE_OPEN_AI_RESPONSES_N_ITEMS_ARCHIVED_1="%s Open AI Response archived."
COM_GETBIBLE_OPEN_AI_RESPONSES_N_ITEMS_CHECKED_IN_0="No Open AI Response successfully checked in."
@ -1152,9 +1134,6 @@ COM_GETBIBLE_PASSWORDS_EDIT_PASSWORD="Passwords Edit Password"
COM_GETBIBLE_PASSWORDS_EDIT_PASSWORD_DESC="Allows the users in this group to edit password of password"
COM_GETBIBLE_PASSWORDS_EDIT_STATE="Passwords Edit State"
COM_GETBIBLE_PASSWORDS_EDIT_STATE_DESC="Allows the users in this group to update the state of the password"
COM_GETBIBLE_PASSWORDS_EMPTYSTATE_BUTTON_ADD="Add your first password"
COM_GETBIBLE_PASSWORDS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_PASSWORDS_EMPTYSTATE_TITLE="No passwords have been created yet."
COM_GETBIBLE_PASSWORDS_N_ITEMS_ARCHIVED="%s Passwords archived."
COM_GETBIBLE_PASSWORDS_N_ITEMS_ARCHIVED_1="%s Password archived."
COM_GETBIBLE_PASSWORDS_N_ITEMS_CHECKED_IN_0="No Password successfully checked in."
@ -1285,9 +1264,6 @@ COM_GETBIBLE_PROMPTS_EDIT_TOP_P_OVERRIDE="Prompts Edit Top P Override"
COM_GETBIBLE_PROMPTS_EDIT_TOP_P_OVERRIDE_DESC="Allows the users in this group to edit top p override of prompt"
COM_GETBIBLE_PROMPTS_EDIT_VERSION="Prompts Edit Version"
COM_GETBIBLE_PROMPTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version prompts"
COM_GETBIBLE_PROMPTS_EMPTYSTATE_BUTTON_ADD="Add your first prompt"
COM_GETBIBLE_PROMPTS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_PROMPTS_EMPTYSTATE_TITLE="No prompts have been created yet."
COM_GETBIBLE_PROMPTS_N_ITEMS_ARCHIVED="%s Prompts archived."
COM_GETBIBLE_PROMPTS_N_ITEMS_ARCHIVED_1="%s Prompt archived."
COM_GETBIBLE_PROMPTS_N_ITEMS_CHECKED_IN_0="No Prompt successfully checked in."
@ -1506,9 +1482,6 @@ COM_GETBIBLE_TAGGED_VERSES_EDIT_VERSE="Tagged Verses Edit Verse"
COM_GETBIBLE_TAGGED_VERSES_EDIT_VERSE_DESC="Allows the users in this group to edit verse of tagged verse"
COM_GETBIBLE_TAGGED_VERSES_EDIT_VERSION="Tagged Verses Edit Version"
COM_GETBIBLE_TAGGED_VERSES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tagged verses"
COM_GETBIBLE_TAGGED_VERSES_EMPTYSTATE_BUTTON_ADD="Add your first tagged verse"
COM_GETBIBLE_TAGGED_VERSES_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_TAGGED_VERSES_EMPTYSTATE_TITLE="No tagged verses have been created yet."
COM_GETBIBLE_TAGGED_VERSES_N_ITEMS_ARCHIVED="%s Tagged Verses archived."
COM_GETBIBLE_TAGGED_VERSES_N_ITEMS_ARCHIVED_1="%s Tagged Verse archived."
COM_GETBIBLE_TAGGED_VERSES_N_ITEMS_CHECKED_IN_0="No Tagged Verse successfully checked in."
@ -1605,9 +1578,6 @@ COM_GETBIBLE_TAGS_EDIT_STATE="Tags Edit State"
COM_GETBIBLE_TAGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the tag"
COM_GETBIBLE_TAGS_EDIT_VERSION="Tags Edit Version"
COM_GETBIBLE_TAGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tags"
COM_GETBIBLE_TAGS_EMPTYSTATE_BUTTON_ADD="Add your first tag"
COM_GETBIBLE_TAGS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_TAGS_EMPTYSTATE_TITLE="No tags have been created yet."
COM_GETBIBLE_TAGS_N_ITEMS_ARCHIVED="%s Tags archived."
COM_GETBIBLE_TAGS_N_ITEMS_ARCHIVED_1="%s Tag archived."
COM_GETBIBLE_TAGS_N_ITEMS_CHECKED_IN_0="No Tag successfully checked in."
@ -1749,9 +1719,6 @@ COM_GETBIBLE_TRANSLATIONS_EDIT_STATE="Translations Edit State"
COM_GETBIBLE_TRANSLATIONS_EDIT_STATE_DESC="Allows the users in this group to update the state of the translation"
COM_GETBIBLE_TRANSLATIONS_EDIT_TRANSLATION="Translations Edit Translation"
COM_GETBIBLE_TRANSLATIONS_EDIT_TRANSLATION_DESC="Allows the users in this group to edit translation of translation"
COM_GETBIBLE_TRANSLATIONS_EMPTYSTATE_BUTTON_ADD="Add your first translation"
COM_GETBIBLE_TRANSLATIONS_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_TRANSLATIONS_EMPTYSTATE_TITLE="No translations have been created yet."
COM_GETBIBLE_TRANSLATIONS_N_ITEMS_ARCHIVED="%s Translations archived."
COM_GETBIBLE_TRANSLATIONS_N_ITEMS_ARCHIVED_1="%s Translation archived."
COM_GETBIBLE_TRANSLATIONS_N_ITEMS_CHECKED_IN_0="No Translation successfully checked in."
@ -1920,9 +1887,6 @@ COM_GETBIBLE_VERSES_EDIT_TEXT="Verses Edit Text"
COM_GETBIBLE_VERSES_EDIT_TEXT_DESC="Allows the users in this group to edit text of verse"
COM_GETBIBLE_VERSES_EDIT_VERSE="Verses Edit Verse"
COM_GETBIBLE_VERSES_EDIT_VERSE_DESC="Allows the users in this group to edit verse of verse"
COM_GETBIBLE_VERSES_EMPTYSTATE_BUTTON_ADD="Add your first verse"
COM_GETBIBLE_VERSES_EMPTYSTATE_CONTENT=""
COM_GETBIBLE_VERSES_EMPTYSTATE_TITLE="No verses have been created yet."
COM_GETBIBLE_VERSES_N_ITEMS_ARCHIVED="%s Verses archived."
COM_GETBIBLE_VERSES_N_ITEMS_ARCHIVED_1="%s Verse archived."
COM_GETBIBLE_VERSES_N_ITEMS_CHECKED_IN_0="No Verse successfully checked in."

View File

@ -108,7 +108,6 @@ COM_GETBIBLE_MENU_APP_OPTION="App"
COM_GETBIBLE_MENU_APP_TITLE="App"
COM_GETBIBLE_MENU_BOOKS="Books"
COM_GETBIBLE_MENU_CHAPTERS="Chapters"
COM_GETBIBLE_MENU_DASHBOARD="Dashboard"
COM_GETBIBLE_MENU_LINKERS="Linkers"
COM_GETBIBLE_MENU_NOTES="Notes"
COM_GETBIBLE_MENU_OPEN_AI_RESPONSES="Open AI Responses"

View File

@ -0,0 +1,55 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// 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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,29 +31,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',
'nr'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,30 +31,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',
'chapter',
'book_nr'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,28 +31,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(
'name'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -15,19 +15,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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vvwnotes;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=notes&task=note.edit";
@ -89,9 +88,7 @@ $can = GetbibleHelper::getActions('note');
<?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 = GetbibleHelper::getActions('note',$item,'notes');
?>
<tr>

View File

@ -15,19 +15,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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vvxpasswords;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=passwords&task=password.edit";
@ -89,9 +88,7 @@ $can = GetbibleHelper::getActions('password');
<?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 = GetbibleHelper::getActions('password',$item,'passwords');
?>
<tr>

View File

@ -16,7 +16,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

@ -16,7 +16,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

@ -15,19 +15,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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vvvtags;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=tagged_verses&task=tagged_verse.edit";
@ -95,9 +94,7 @@ $can = GetbibleHelper::getActions('tagged_verse');
<?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 = GetbibleHelper::getActions('tagged_verse',$item,'tagged_verses');
?>
<tr>

View File

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,29 +31,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(
'access',
'linker'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,30 +31,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(
'role',
'open_ai_response',
'prompt'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,29 +31,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(
'response_id',
'prompt'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -15,19 +15,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 TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
// No direct access to this file
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vvymessage;
$user = Factory::getApplication()->getIdentity();
$user = Factory::getUser();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_getbible&view=open_ai_messages&task=open_ai_message.edit";
@ -80,9 +79,7 @@ else
<?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 = GetbibleHelper::getActions('open_ai_message',$item,'open_ai_messages');
?>
<tr>

View File

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,28 +31,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(
'linker'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -15,18 +15,15 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\Component\Helper;
// No direct access to this file
defined('JPATH_BASE') or die;
// get the form
$form = $displayData->getForm();

View File

@ -15,18 +15,15 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use TrueChristianBible\Component\GetBible\Administrator\Helper\GetbibleHelper;
use TrueChristianBible\Joomla\Utilities\Component\Helper;
// No direct access to this file
defined('JPATH_BASE') or die;
// get the form
$form = $displayData->getForm();

View File

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,29 +31,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',
'abbreviation'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,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

@ -16,7 +16,7 @@
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
@ -31,29 +31,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(
'access',
'linker'
];
// 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

@ -16,7 +16,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

@ -16,7 +16,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