Stable release of v2.0.5

Adds list of default system tags. Adds linker session manager. Adds option to share sessions.
This commit is contained in:
Robot 2023-07-28 17:54:37 +02:00
parent 54b0f9aa41
commit 3744d6aed4
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
33 changed files with 1453 additions and 388 deletions

View File

@ -23,3 +23,9 @@
- Added the option to set the default Translation. - Added the option to set the default Translation.
- Fixed sharing of a verse, so its auto selected when verse number is clicked. - Fixed sharing of a verse, so its auto selected when verse number is clicked.
# v2.0.5
- Adds list of default system tags
- Adds linker session manager
- Adds option to share sessions

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.4) # Get Bible (2.0.5)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/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")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 26th July, 2023 + *Last Build*: 28th July, 2023
+ *Version*: 2.0.4 + *Version*: 2.0.5
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**532 Hours** or **67 Eight Hour Days** (actual time the author saved - **536 Hours** or **67 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **190561** + *Line count*: **191915**
+ *File count*: **1664** + *File count*: **1668**
+ *Folder count*: **161** + *Folder count*: **161**
**351 Hours** or **43 Eight Hour Days** (the actual time the author spent) **353 Hours** or **44 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @133hours** = codingtime / 4; > **debugging @134hours** = codingtime / 4;
> **planning @76hours** = codingtime / 7; > **planning @77hours** = codingtime / 7;
> **mapping @53hours** = codingtime / 10; > **mapping @54hours** = codingtime / 10;
> **office @89hours** = codingtime / 6;) > **office @89hours** = codingtime / 6;)
**883 Hours** or **110 Eight Hour Days** **889 Hours** or **111 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **22 weeks** or **4.6 months** Project duration: **22.2 weeks** or **4.6 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.4) # Get Bible (2.0.5)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/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")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net) + *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015 + *First Build*: 3rd December, 2015
+ *Last Build*: 26th July, 2023 + *Last Build*: 28th July, 2023
+ *Version*: 2.0.4 + *Version*: 2.0.5
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**532 Hours** or **67 Eight Hour Days** (actual time the author saved - **536 Hours** or **67 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **190561** + *Line count*: **191915**
+ *File count*: **1664** + *File count*: **1668**
+ *Folder count*: **161** + *Folder count*: **161**
**351 Hours** or **43 Eight Hour Days** (the actual time the author spent) **353 Hours** or **44 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @133hours** = codingtime / 4; > **debugging @134hours** = codingtime / 4;
> **planning @76hours** = codingtime / 7; > **planning @77hours** = codingtime / 7;
> **mapping @53hours** = codingtime / 10; > **mapping @54hours** = codingtime / 10;
> **office @89hours** = codingtime / 6;) > **office @89hours** = codingtime / 6;)
**883 Hours** or **110 Eight Hour Days** **889 Hours** or **111 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **22 weeks** or **4.6 months** Project duration: **22.2 weeks** or **4.6 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,5 +1,6 @@
COM_GETBIBLE="Get Bible" COM_GETBIBLE="Get Bible"
COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated." COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated."
COM_GETBIBLE_ACCESS_REVOKED="Access revoked."
COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." COM_GETBIBLE_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
COM_GETBIBLE_ALL_TRANSLATIONS="All Translations" COM_GETBIBLE_ALL_TRANSLATIONS="All Translations"
COM_GETBIBLE_ARCHIVED="Archived" COM_GETBIBLE_ARCHIVED="Archived"
@ -1566,6 +1567,8 @@ COM_GETBIBLE_TAG_SAVE_WARNING="Alias already existed so a number was added at th
COM_GETBIBLE_TAG_STATUS="Status" COM_GETBIBLE_TAG_STATUS="Status"
COM_GETBIBLE_TAG_VERSION_DESC="A count of the number of times this Tag has been revised." COM_GETBIBLE_TAG_VERSION_DESC="A count of the number of times this Tag has been revised."
COM_GETBIBLE_TAG_VERSION_LABEL="Version" COM_GETBIBLE_TAG_VERSION_LABEL="Version"
COM_GETBIBLE_THE_NAME_COULD_NOT_BE_UPDATED="The name could not be updated."
COM_GETBIBLE_THE_NAME_HAS_BEEN_UPDATED="The name has been updated."
COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_CREATED="The note was successfully created." COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_CREATED="The note was successfully created."
COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_UPDATED="The note was successfully updated." COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_UPDATED="The note was successfully updated."
COM_GETBIBLE_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_GETBIBLE_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
@ -1851,7 +1854,7 @@ COM_GETBIBLE_VERSE_VERSION_DESC="A count of the number of times this Verse has b
COM_GETBIBLE_VERSE_VERSION_LABEL="Version" COM_GETBIBLE_VERSE_VERSION_LABEL="Version"
COM_GETBIBLE_VERSION="Version" COM_GETBIBLE_VERSION="Version"
COM_GETBIBLE_WEBSITE="Website" COM_GETBIBLE_WEBSITE="Website"
COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION="Without selecting the correct favourite verse, you can't perform the initial action." COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION="Without selecting the correct favourite verse,<br />you can't perform the initial action."
COM_GETBIBLE_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items." COM_GETBIBLE_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
COM_GETBIBLE_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!" COM_GETBIBLE_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"
COM_GETBIBLE_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA="You can directly download the latest update, or use the Joomla update area." COM_GETBIBLE_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA="You can directly download the latest update, or use the Joomla update area."

View File

@ -211,7 +211,7 @@ class GetbibleModelAjax extends ListModel
Factory::_('Gitea.Repository.Wiki')->load_('https://git.vdm.dev', $token); Factory::_('Gitea.Repository.Wiki')->load_('https://git.vdm.dev', $token);
// get the gitea wiki page im markdown // get the gitea wiki page im markdown
$wiki = Factory::_('Gitea.Repository.Wiki')->get('getBible', 'joomla-component', $name); $wiki = Factory::_('Gitea.Repository.Wiki')->get('getBible', 'support', $name);
// now render the page in HTML // now render the page in HTML
$page = Factory::_('Gitea.Miscellaneous.Markdown')->render($wiki->content, true); $page = Factory::_('Gitea.Miscellaneous.Markdown')->render($wiki->content, true);

View File

@ -443,4 +443,69 @@ CREATE TABLE IF NOT EXISTS `#__getbible_verse` (
KEY `idx_state` (`published`) KEY `idx_state` (`published`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `#__getbible_tag`
--
INSERT INTO `#__getbible_tag` (`id`, `access`, `description`, `guid`, `name`, `published`, `created`) VALUES
(1, 1, 'Understanding unfaithfulness in marriage.', 'a1d263b6-3848-4ac1-92e8-df7c2b78c649', 'Adultery', 1, '2015-07-16 17:49:49'),
(2, 1, 'Exploring reasons for believing in the Bible.', 'b5fb8c11-c3df-4925-92e8-df7c2b78c649', 'Authority of the Bible', 1, '2015-07-14 15:35:40'),
(3, 1, '', '8f6d2789-7ecf-4769-87b7-af564b59f7d5', 'Baptism', 1, '2015-07-16 17:41:24'),
(4, 1, 'Understanding the biblical definition of love.', '6493a897-755a-4b6c-8b7e-ff8b12d3e9c0', 'Biblical Love', 1, '2015-07-14 06:11:55'),
(5, 1, 'Exploring the concept of blessings and curses.', '17df4ce3-289a-4920-b96e-65f64932b9c1', 'Blessings & Curses', 1, '2015-07-15 17:20:13'),
(6, 1, 'Guidance on modesty and decency in attire.', '04c7f6b3-17df-4f69-9a1a-bec6913a4b0f', 'Christian Clothing', 1, '2015-07-14 12:15:12'),
(7, 1, 'Roles and positions held within the structure of the church.', '54df67b4-fd6c-4bb3-bc8a-81b4a52c1843', 'Christian Offices', 1, '2015-07-15 18:12:40'),
(8, 1, 'The consideration of the table of the Lord.', '5dfb8c11-6493-4bb3-96c1-f3a6b5c5f9f0', 'Communion', 1, '2015-01-24 03:02:47'),
(9, 1, '', '3dfdc8b8-6549-40d8-a8f1-65fa96329ab2', 'Conditional Security', 1, '2015-07-15 17:52:41'),
(10, 1, 'The correct understanding of relationships and courtship.', '755ae009-f9fa-4f69-8b5b-9c2b46a6cb85', 'Dating', 1, '2015-07-14 13:59:28'),
(11, 1, 'Exploring dietary rules and guidance.', '755ae009-8f6d-4fb6-9b5b-c6a6cb85f9f0', 'Dietary Guidance', 1, '2015-07-14 06:50:49'),
(12, 1, 'Understanding chastening or discipline.', 'e84a2c7a-f234-44c2-87b7-ff8b46d2f6e7', 'Discipline', 1, '2015-07-17 13:54:50'),
(13, 1, 'Exploring homeschooling.', 'f2346bc8-04c7-4f69-9a1a-bec6913a4b0f', 'Education', 1, '2015-07-14 11:53:11'),
(14, 1, '', '5dfb8c11-6493-4769-9a1b-bec6a6c5f7d5', 'Effective Prayer', 1, '2015-07-14 06:04:18'),
(15, 1, 'Exploring family size from a Christian perspective.', 'c3dfb8e7-d234-473b-8af1-f67394c5b1d3', 'Family Planning', 1, '2015-02-01 14:08:35'),
(16, 1, 'Exploring the observance of Sabbath or Sunday worship.', 'd2346fd5-e84a-43c6-94de-af432c2f0ab1', 'First Day', 1, '2015-07-17 13:36:30'),
(17, 1, 'Exploring the implications of insincere praise or flattery.', '39bcf6b7-44df-4077-8af1-81b4a5c63f19', 'Flattery', 1, '2015-07-14 06:01:43'),
(18, 1, 'Exploring the doctrine of free will.', '39bcf6b7-44df-473b-973e-af564b2f0ab1', 'Free Will', 1, '2015-07-14 12:59:51'),
(19, 1, 'Understanding God\'s righteous judgment against sin.', '5dfb8c11-6fd6-473b-973e-af564b2f0ab1', 'God\'s Judgement', 1, '2015-07-16 17:10:24'),
(20, 1, 'The unmerited favour and love given by God.', 'e84a2c7a-467b-46a8-973e-ff8b46d2f6e7', 'Grace', 1, '2015-07-14 05:06:40'),
(21, 1, 'Exploring the concept of church gatherings in homes.', 'c3dfb8e7-4ea8-4925-96c1-f3a621a4b9b0', 'Home Church', 1, '2015-07-17 13:18:40'),
(22, 1, 'Reflecting on God\'s immutability, His unchanging nature.', '44df4ce6-5e9f-4077-8af1-81b4a5c63f19', 'Immutability', 1, '2015-07-14 13:05:39'),
(23, 1, 'Exploring the divine nature of Jesus Christ.', '1a0ad6e8-35fa-4f2c-889f-9ca2b057bbf0', 'Jesus Christ\'s Deity', 1, '2015-01-16 14:23:26'),
(24, 1, 'Exploring the incarnation, Jesus being in the flesh.', 'e84a2c7a-f234-43c6-94de-af432c2f0ab1', 'Jesus Christs Humanity', 1, '2015-07-14 16:17:54'),
(25, 1, 'Exploring the biblical view of leadership.', '6493a897-7e2a-4bb3-96c1-f3a6b5c5f9f0', 'Leadership', 1, '2015-07-14 13:51:25'),
(26, 1, 'Hannah says life has no description.', '04c7f6b3-17df-4920-b96e-65f64932b9c1', 'Life', 1, '2015-12-03 23:26:31'),
(27, 1, 'Exploring what gives one a long life.', '17df4ce3-289a-437b-88d1-9c2b057ba1a0', 'Longevity', 1, '2015-07-14 12:32:43'),
(28, 1, 'Exploring the roles and responsibilities of men.', 'c3dfb8e7-d234-46a8-96c5-f3a6a6c5f9f0', 'Man\'s Role', 1, '2015-07-14 10:41:41'),
(29, 1, 'Beliefs and teachings on the sacrament of marriage.', 'b5fb8c11-dfb7-4fb6-aa4b-e982a12d3e9c', 'Marriage', 1, '2015-07-14 10:24:11'),
(30, 1, 'Understanding the destructive and harmful influence of music.', '44df4ce6-5dfb-473b-973e-af564b2f0ab1', 'Musics Influence', 1, '2015-01-18 12:16:37'),
(31, 1, 'The correct motive to avoid company or fellowship.', '755ae009-8f6d-4769-9a1b-bec6a6c5f7d5', 'No Fellowship', 1, '2015-07-14 06:21:42'),
(32, 1, 'Understanding biblical goodness.', '6493a897-755a-4769-9a1b-bec6a6c5f7d5', 'No One is Good', 1, '2015-07-14 13:34:50'),
(33, 1, 'Exploring the concept of loving your enemy', '289ad6e8-39bc-473b-973e-af564b2f0ab1', 'Nonresistance', 1, '2017-10-09 05:27:08'),
(34, 1, '', '17df4ce3-289a-4077-8af1-81b4a5c63f19', 'Not Under the Law', 1, '2015-12-21 14:39:14'),
(35, 1, 'The importance of obeying God\'s laws.', 'd2346fd5-e84a-46a8-96c5-f3a6a6c5f9f0', 'Obey God\'s Commandments', 1, '2015-07-14 11:13:47'),
(36, 1, 'The duty to follow government laws.', '755ae009-8f6d-4b6c-8b7e-ff8b12d3e9c0', 'Obey Government Laws', 1, '2015-01-24 03:11:06'),
(37, 1, 'Grasping the omnipotence, the all-powerful nature of God.', '289ad6e8-2dfb-437b-88d1-9c2b057ba1a0', 'Omnipotence', 1, '2015-07-14 05:57:02'),
(38, 1, 'Acknowledging that God observes all, nothing is hidden from Him and His presence everywhere.', '17df4ce3-5db0-4f69-9b7e-87d2b5c63b19', 'Omnipresence', 1, '2015-07-14 05:49:52'),
(39, 1, 'Understanding God\'s omniscience, His all-knowing nature.', '04c7f6b3-14d8-44c2-89e4-57f6492a2e1c', 'Omniscience', 1, '2015-07-14 05:35:11'),
(40, 1, 'Understanding God\'s intended structure and order for the home.', '289ad6e8-39bc-4920-b96e-65f64932b9c1', 'Orderly Home', 1, '2015-07-14 12:50:03'),
(41, 1, '', 'a1d263b6-b5fb-473b-8af1-f67394c5b1d3', 'Prince of this World', 1, '2015-07-14 14:06:16'),
(42, 1, 'Exploring the doctrine of divine providence.', 'f2346bc8-1de2-43c6-94de-af432c2f0ab1', 'Providence', 1, '2015-07-14 16:40:53'),
(43, 1, 'The process of adopting a new mindset.', 'a1d263b6-b5fb-4fb6-9b5b-c6a6cb85f9f0', 'Renewing of the Mind', 1, '2015-01-25 09:17:28'),
(44, 1, 'The call for repentance as a key message.', '44df4ce6-5dfb-4bb3-96c1-f3a6b5c5f9f0', 'Repentance', 1, '2015-01-23 16:10:21'),
(45, 1, 'Salvation through belief and trust in Jesus Christ.', '41df4ce6-efd0-4077-85ef-78f3b5c62f19', 'Saved by Faith', 1, '2017-10-09 05:27:31'),
(46, 1, 'Exploring the biblical perspective on homosexuality.', 'd2346fd5-3fe2-473b-8bf4-f67394c5b1d3', 'Sodomy', 1, '2015-02-01 14:25:22'),
(47, 1, 'Exploring the prophecies concerning Jesus.', '289ad6e8-39bc-4077-8af1-81b4a5c63f19', 'Spirit of Prophecy', 1, '2015-07-15 17:33:42'),
(48, 1, 'Spiritual gifts as recognized and utilized in the church.', '6493a897-fefb-4d3b-a4b9-96c5ab5932a3', 'Spiritual Gifts', 1, '2015-07-16 17:35:10'),
(49, 1, 'Exploring judgement and discernment.', '8f6d2789-a1d2-4fb6-9b5b-c6a6cb85f9f0', 'Spiritual Judgement', 1, '2015-01-24 03:35:28'),
(50, 1, 'Exploring the concept of spiritual rebirth.', '8f6d2789-a1d2-4925-92e8-df7c2b78c649', 'Spiritual Rebirth', 1, '2015-01-24 03:20:24'),
(51, 1, 'Understanding temptation and strategies for overcoming it.', '04c7f6b3-17df-437b-88d1-9c2b057ba1a0', 'Temptation', 1, '2015-07-15 17:08:23'),
(52, 1, 'Exploring the use of wine.', '9eb76f94-32c7-4b6c-9a1a-bec6913a4b0f', 'Wine ', 1, '2015-07-14 10:03:17'),
(53, 1, 'Exploring what leads to or fosters wisdom.', 'f2346bc8-04c7-437b-88d1-9c2b057ba1a0', 'Wisdom Cause', 1, '2015-07-14 05:18:55'),
(54, 1, 'Understanding the outcomes or fruits of wisdom.', 'd2346fd5-e84a-44c2-87b7-ff8b46d2f6e7', 'Wisdom Fruit', 1, '2015-07-14 15:59:50'),
(55, 1, 'Exploring the origin and source of wisdom.', 'c3dfb8e7-d234-43c6-94de-af432c2f0ab1', 'Wisdom Origin', 1, '2015-07-14 15:39:01'),
(56, 1, 'Understanding the importance and worth of wisdom.', 'e84a2c7a-f234-4f69-9a1a-bec6913a4b0f', 'Wisdom Value', 1, '2015-07-14 11:45:23'),
(57, 1, 'Exploring the roles and responsibilities of women.', 'b5fb8c11-c3df-473b-8af1-f67394c5b1d3', 'Woman\'s Role', 1, '2015-07-16 18:01:45'),
(58, 1, 'Exploring God\'s spoken word.', '20bcf6b7-48db-4c20-b6cf-49d032f15c41', 'Word of God', 1, '2015-01-16 13:39:05'),
(59, 1, 'Exploring the concept of worldly wisdom.', 'b5fb8c11-c3df-46a8-96c5-f3a6a6c5f9f0', 'Worldly Wisdom', 1, '2015-01-25 10:15:36');

View File

@ -0,0 +1 @@

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4" method="upgrade"> <extension type="component" version="4" method="upgrade">
<name>COM_GETBIBLE</name> <name>COM_GETBIBLE</name>
<creationDate>26th July, 2023</creationDate> <creationDate>28th July, 2023</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://getbible.net</authorUrl> <authorUrl>https://getbible.net</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright> <copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.0.4</version> <version>2.0.5</version>
<description><![CDATA[ <description><![CDATA[
<h1>Get Bible (v.2.0.4)</h1> <h1>Get Bible (v.2.0.5)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>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. <p>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.

View File

@ -149,6 +149,33 @@ final class Linker
return null; return null;
} }
/**
* Get active Linker details
*
* @param bool $setup The setup switch
*
* @return array|null Linker details
* @since 2.0.1
**/
public function activeDetails(bool $setup = true): ?array
{
if (($linker = $this->active($setup)) !== null)
{
// check if this is a valid linker (already set)
if (($name = $this->load->value(
['guid' => $linker, 'published' => 1],
'name', 'linker'
)) !== null)
{
return ['guid' => $linker, 'name' => $name, 'share' => $this->share()];
}
return ['guid' => $linker, 'name' => null, 'share' => null];
}
return null;
}
/** /**
* Check if a Linker is valid active linker * Check if a Linker is valid active linker
* *
@ -211,6 +238,75 @@ final class Linker
return true; return true;
} }
/**
* Revoke Linker Session
*
* @param string $linker The linker GUID value
*
* @return array|null The success or error details
* @since 2.0.1
**/
public function revokeSession(string $linker): ?array
{
// linker not valid GUID
if (!GuidHelper::valid($linker))
{
// hmm we can log this
return [
'error' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
if (($access = $this->session->get('getbible_active_linker_guid', null)) === null
|| $access !== $linker)
{
// hmm we can log this
return [
'success' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
$this->session->set('getbible_active_linker_guid', null);
return [
'success' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
/**
* Set a linker name
*
* @param string $name The linker name
*
* @return array|null Array on success
* @since 2.0.1
**/
public function setName(string $name): ?array
{
// make sure the linker has access
if (($linker = $this->get()) === null)
{
return [
'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION"),
'access_required' => true
];
}
// set the name of this linker
if (!$this->update->value($name, 'name', $linker, 'guid', 'linker'))
{
return [
'error' => Text::_('COM_GETBIBLE_THE_NAME_COULD_NOT_BE_UPDATED')
];
}
return [
'guid' => $linker,
'name' => $name,
'success' => Text::_('COM_GETBIBLE_THE_NAME_HAS_BEEN_UPDATED')
];
}
/** /**
* Set Access * Set Access
* *
@ -308,6 +404,41 @@ final class Linker
return (array) $_linker; return (array) $_linker;
} }
/**
* Revoke Access
*
* @param string $linker The linker GUID value
*
* @return array|null The success or error details
* @since 2.0.1
**/
public function revoke(string $linker): ?array
{
// linker not valid GUID
if (!GuidHelper::valid($linker))
{
// hmm we can log this
return [
'success' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
if (($access = $this->session->get("getbible_active_{$linker}", null)) === null
|| $access !== 'valid_access')
{
// hmm we can log this
return [
'success' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
$this->session->set("getbible_active_{$linker}", null);
return [
'success' => Text::_('COM_GETBIBLE_ACCESS_REVOKED')
];
}
/** /**
* Has Access * Has Access
* *

View File

@ -103,7 +103,7 @@ final class Note
if (($linker = $this->linker->get()) === null) if (($linker = $this->linker->get()) === null)
{ {
return [ return [
'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION"), 'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION"),
'access_required' => true 'access_required' => true
]; ];
} }

View File

@ -95,7 +95,7 @@ final class Tag
if (($linker = $this->linker->get()) === null) if (($linker = $this->linker->get()) === null)
{ {
return [ return [
'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION"), 'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION"),
'access_required' => true 'access_required' => true
]; ];
} }

View File

@ -131,7 +131,7 @@ final class Tagged
if (($linker = $this->linker->get()) === null) if (($linker = $this->linker->get()) === null)
{ {
return [ return [
'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION"), 'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION"),
'access_required' => true 'access_required' => true
]; ];
} }
@ -187,7 +187,7 @@ final class Tagged
if (($linker = $this->linker->get()) === null) if (($linker = $this->linker->get()) === null)
{ {
return [ return [
'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION"), 'error' => Text::_("COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION"),
'access_required' => true 'access_required' => true
]; ];
} }

View File

@ -1539,7 +1539,7 @@ class com_getbibleInstallerScript
echo '<a target="_blank" href="https://getbible.net" title="Get Bible"> echo '<a target="_blank" href="https://getbible.net" title="Get Bible">
<img src="components/com_getbible/assets/images/vdm-component.jpg"/> <img src="components/com_getbible/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.0.4 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.0.5 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already. // Set db if not set already.
if (!isset($db)) if (!isset($db))

View File

@ -116,31 +116,285 @@ class ScrollMemory {
this.div.addEventListener('scroll', () => this.saveScrollPosition()); this.div.addEventListener('scroll', () => this.saveScrollPosition());
} }
} }
class DatabaseManager {
#dbName;
#storeName;
#fields;
#db;
#uniqueFields;
#isReady = false;
#readyPromise = null;
#data = JSON.parse(localStorage.getItem(this.#storeName)) || [];
constructor(dbName, storeName, fields) {
this.#dbName = dbName;
this.#storeName = storeName;
this.#fields = fields;
this.#uniqueFields = fields.filter((field) => field[1]).map((field) => field[0]);
if (window.indexedDB) {
this.#readyPromise = this.#openDB().then(() => {
this.#isReady = true;
});
} else {
this.#isReady = true;
}
}
#openDB = () => {
return new Promise((resolve, reject) => {
const request = window.indexedDB.open(this.#dbName);
request.onerror = (e) => {
console.log('Error opening db', e);
reject('Error');
};
request.onsuccess = (e) => {
this.#db = e.target.result;
resolve();
};
request.onupgradeneeded = (e) => {
let db = e.target.result;
let store = db.createObjectStore(this.#storeName, { autoIncrement: true, keyPath: 'id' });
this.#uniqueFields.forEach((field) => {
store.createIndex(field, field, { unique: true });
});
};
});
}
#waitUntilReady = () => {
return this.#isReady ? Promise.resolve() : this.#readyPromise;
}
#saveToLocalStorage = () => {
localStorage.setItem(this.#storeName, JSON.stringify(this.#data));
}
async set(data) {
return this.#waitUntilReady().then(() => {
if (!this.#db) {
let existingItem = this.#data.find((item) => this.#uniqueFields.some((field) => item[field] === data[field]));
if (existingItem) {
Object.assign(existingItem, data);
} else {
this.#data.push(data);
}
this.#saveToLocalStorage();
} else {
const transaction = this.#db.transaction([this.#storeName], 'readwrite');
const store = transaction.objectStore(this.#storeName);
this.#uniqueFields.forEach((field) => {
const index = store.index(field);
const getRequest = index.get(data[field]);
getRequest.onsuccess = () => {
const existingItem = getRequest.result;
if (existingItem) {
Object.assign(existingItem, data);
store.put(existingItem);
} else {
store.add(data);
}
};
getRequest.onerror = (error) => {
console.log('Error getting data', error);
};
});
}
});
}
async get(value, key, field = 'guid') {
return this.#waitUntilReady().then(() => {
if (!this.db) {
// If IndexedDB is not available, get value from local storage
const item = this.data.find(item => item[field] === value);
return item ? item[key] : undefined;
} else {
// If IndexedDB is available, get value from the database
return new Promise((resolve, reject) => {
let transaction = this.db.transaction([this.storeName], "readonly");
let store = transaction.objectStore(this.storeName);
let request = store.index(field).get(value);
request.onsuccess = e => {
const item = e.target.result;
resolve(item ? item[key] : undefined);
};
request.onerror = e => {
reject("Error", e.target.error);
};
});
}
});
}
async item(value, field = 'guid') {
return this.#waitUntilReady().then(() => {
if (!this.#db) {
return this.#data.find((item) => item[field] === value);
} else {
return new Promise((resolve, reject) => {
const transaction = this.#db.transaction([this.#storeName], 'readonly');
const store = transaction.objectStore(this.#storeName);
const index = store.index(field);
const getRequest = index.get(value);
getRequest.onsuccess = () => {
resolve(getRequest.result);
};
getRequest.onerror = (error) => {
reject('Error', error.target.error);
};
});
}
});
}
async all() {
return this.#waitUntilReady().then(() => {
if (!this.#db) {
return this.#data;
} else {
return new Promise((resolve, reject) => {
const transaction = this.#db.transaction([this.#storeName], 'readonly');
const store = transaction.objectStore(this.#storeName);
const getAllRequest = store.getAll();
getAllRequest.onsuccess = () => {
resolve(getAllRequest.result);
};
getAllRequest.onerror = (error) => {
reject('Error', error.target.error);
};
});
}
});
}
async remove(value, field = 'guid') {
return this.#waitUntilReady().then(() => {
if (!this.#db) {
// Handle removal from localStorage
this.#data = this.#data.filter(item => item[field] !== value);
this.#saveToLocalStorage();
return Promise.resolve();
} else {
// Handle removal from IndexedDB
return new Promise((resolve, reject) => {
const transaction = this.#db.transaction([this.#storeName], 'readwrite');
const store = transaction.objectStore(this.#storeName);
let index = store.index(field);
let request = index.openCursor(IDBKeyRange.only(value));
request.onsuccess = e => {
let cursor = e.target.result;
if (cursor) {
cursor.delete(); // delete the record
resolve();
} else {
reject("Error: No record found for the provided field and value");
}
};
request.onerror = e => {
reject("Error", e.target.error);
};
});
}
});
}
}
/**
* JS to setup the Linker DB
*/
const linkerManager = new DatabaseManager(
'getBible',
'linkers',
[['name', false], ['guid', true], ['password', false], ['share', false]]
);
/**
* JS to setup the Settings DB
*/
const settingsManager = new DatabaseManager(
'getBible',
'settings',
[['feature', true], ['value', false], ['default', false]]
);
/** /**
* JS Function to set Share His Word url * JS Function to set Share His Word url
*/ */
const setShareHisWordUrl = async (linker, translation, book, chapter) => { const setShareHisWordUrl = async (linker, translation, book, chapter) => {
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getShareHisWordUrl(linker, translation, book, chapter)); const response = await fetch(getShareHisWordUrl(linker, translation, book, chapter));
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
if (data.url || data.error) { if (data.url || data.error) {
return data; // return the data object on success return data; // return the data object on success
} else { } else {
throw new Error(data); // throw an error if the request was not successful throw new Error(data); // throw an error if the request was not successful
} }
}; };
/**
* JS Function get the linker ul list display
*/
const getLinkersDisplay = async (linkers) => {
try {
// Convert linkers data to a JSON string
let linkersJson = JSON.stringify(linkers);
// build form
const formData = new FormData();
// add the form data
formData.set('linkers', linkersJson);
let options = {
method: 'POST',
body: formData
}
// Make a request to your endpoint
const response = await fetch(getLinkersDisplayURL(), options);
// Wait for the server to return the response, then parse it as JSON.
const data = await response.json();
// Call another function after the response has been received
if (data.display) {
// Show success message
document.getElementById('getbible-sessions-linker-details').innerHTML = data.display;
} else {
// Handle any errors
console.error("Error occurred: ", data);
}
} catch (error) {
// Handle any errors
console.error("Error occurred: ", error);
}
};
/** /**
* JS Function to check if we have a valid linker key * JS Function to check if we have a valid linker key
*/ */
const checkValidLinker = async (linker, oldLinker) => { const checkValidLinker = async (linker, oldLinker) => {
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getCheckValidLinkerUrl(linker, oldLinker)); const response = await fetch(getCheckValidLinkerUrl(linker, oldLinker));
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
if (data.success || data.error) {
return data; // return the data object on success
} else {
throw new Error(data); // throw an error if the request was not successful
}
};
/**
* JS Function to set the linker session value
*/
const setLinker = async (linker) => {
// Make a request to your endpoint
const response = await fetch(getSetLinkerURL(linker));
// Wait for the server to return the response, then parse it as JSON.
const data = await response.json();
if (data.success || data.error) {
return data; // return the data object on success
} else {
throw new Error(data); // throw an error if the request was not successful
}
};
/**
* JS Function to revoke linker session
*/
const revokeLinkerSession = async (linker) => {
// build form
const formData = new FormData();
// add the form data
formData.set('linker', linker);
let options = {
method: 'POST',
body: formData
}
const response = await fetch(revokeLinkerSessionURL(), options);
const data = await response.json();
if (data.success || data.error) { if (data.success || data.error) {
return data; // return the data object on success return data; // return the data object on success
@ -148,6 +402,114 @@ const checkValidLinker = async (linker, oldLinker) => {
throw new Error(data); // throw an error if the request was not successful throw new Error(data); // throw an error if the request was not successful
} }
}; };
/**
* JS Function to set the linker pass value
*/
const setLinkerAccess = async (linker, pass, oldPass = '') => {
// build form
const formData = new FormData();
// add the form data
formData.set('linker', linker);
formData.set('pass', pass);
formData.set('old', oldPass);
let options = {
method: 'POST',
body: formData
}
const response = await fetch(getSetLinkerAccessURL(), options);
const data = await response.json();
if (data.success || data.error) {
return data; // return the data object on success
} else {
throw new Error(data); // throw an error if the request was not successful
}
};
/**
* JS Function to revoke linker access
*/
const revokeLinkerAccess = async (linker) => {
// build form
const formData = new FormData();
// add the form data
formData.set('linker', linker);
let options = {
method: 'POST',
body: formData
}
const response = await fetch(revokeLinkerAccessURL(), options);
const data = await response.json();
if (data.success || data.error) {
return data; // return the data object on success
} else {
throw new Error(data); // throw an error if the request was not successful
}
};
/**
* JS Function to set the linker pass value
*/
const setLinkerName = async (name) => {
try {
// build form
const formData = new FormData();
// add the form data
formData.set('name', name);
let options = {
method: 'POST',
body: formData
}
const response = await fetch(setLinkerNameURL(), options);
// Wait for the server to return the response, then parse it as JSON.
const data = await response.json();
// Call another function after the response has been received
if (data.success) {
// Show success message
UIkit.notification({
message: data.success,
status: 'success',
timeout: 5000
});
let linker = getLocalMemory('getbible_active_linker_guid', null);
if (linker) {
let fieldName = document.getElementById('get-session-name-' + linker);
if (fieldName) {
fieldName.value = name;
}
}
} else if (data.access_required && data.error) {
setupGetBibleAccess(
null,
data.error,
setLinkerName,
[name]
);
} else {
// Handle any errors
console.error("Error occurred: ", data);
}
} catch (error) {
// Handle any errors
console.error("Error occurred: ", error);
}
};
/**
* JS Function to set the active linker on the page
*/
const setActiveLinkerOnPage = async (guid) => {
// Get all elements with the class name 'getbible-linker-guid-value'
let values = document.getElementsByClassName('getbible-linker-guid-value');
let inputs = document.getElementsByClassName('getbible-linker-guid-input');
// Update the 'textContent' of each value display
for (let i = 0; i < values.length; i++) {
values[i].textContent = guid;
}
// Update the 'value' of each input area
for (let i = 0; i < inputs.length; i++) {
inputs[i].value = guid;
}
}
/** /**
* JS Function to set the search url * JS Function to set the search url
*/ */
@ -198,7 +560,6 @@ const setOpenaiUrl = async (ids, guid, words, verse, chapter, book, translation)
console.error("Error occurred: ", error); console.error("Error occurred: ", error);
} }
}; };
/** /**
* JS Function to update the url * JS Function to update the url
*/ */
@ -208,75 +569,6 @@ const updateUrl = (id, url) => {
button.href = url; button.href = url;
} }
} }
/**
* JS Function to set the linker session value
*/
const setLinker = async (linker) => {
try {
// Make a request to your endpoint
const response = await fetch(getSetLinkerURL(linker));
// Wait for the server to return the response, then parse it as JSON.
const data = await response.json();
// Call another function after the response has been received
if (data.success) {
console.log(linker, data.success);
} else {
// Handle any errors
console.error("Error occurred: ", data);
}
} catch (error) {
// Handle any errors
console.error("Error occurred: ", error);
}
};
/**
* JS Function to set the linker pass value
*/
const setLinkerAccess = async (linker, pass, oldPass = '') => {
// build form
const formData = new FormData();
// add the form data
formData.set('linker', linker);
formData.set('pass', pass);
formData.set('old', oldPass);
let options = {
method: 'POST',
body: formData
}
const response = await fetch(getSetLinkerAccessURL(), options);
const data = await response.json();
if (data.success || data.error) {
return data; // return the data object on success
} else {
throw new Error(data); // throw an error if the request was not successful
}
};
/**
* JS Function to set the active linker on the page
*/
const setActiveLinkerOnPage = async (guid) => {
// Get all elements with the class name 'getbible-linker-guid-value'
let values = document.getElementsByClassName('getbible-linker-guid-value');
let inputs = document.getElementsByClassName('getbible-linker-guid-input');
// Update the 'textContent' of each value display
for (let i = 0; i < values.length; i++) {
values[i].textContent = guid;
}
// Update the 'value' of each input area
for (let i = 0; i < inputs.length; i++) {
inputs[i].value = guid;
}
}
/** /**
* JS Function to set a note * JS Function to set a note
*/ */
@ -284,24 +576,19 @@ const setNote = async (book, chapter, verse, note) => {
try { try {
// build form // build form
const formData = new FormData(); const formData = new FormData();
// add the form data // add the form data
formData.set('book', book); formData.set('book', book);
formData.set('chapter', chapter); formData.set('chapter', chapter);
formData.set('verse', verse); formData.set('verse', verse);
formData.set('note', note); formData.set('note', note);
let options = { let options = {
method: 'POST', method: 'POST',
body: formData body: formData
} }
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getSetNoteURL(), options); const response = await fetch(getSetNoteURL(), options);
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
// Call another function after the response has been received // Call another function after the response has been received
if (data.success) { if (data.success) {
// Show success message // Show success message
@ -332,7 +619,6 @@ const setNote = async (book, chapter, verse, note) => {
console.error("Error occurred: ", error); console.error("Error occurred: ", error);
} }
}; };
/** /**
* JS Function to set a tag * JS Function to set a tag
*/ */
@ -340,10 +626,8 @@ const setTag = async (name) => {
try { try {
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getSetTagURL(name)); const response = await fetch(getSetTagURL(name));
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
// Call another function after the response has been received // Call another function after the response has been received
if (data.success) { if (data.success) {
// Show success message // Show success message
@ -375,7 +659,6 @@ const setTag = async (name) => {
console.error("Error occurred: ", error); console.error("Error occurred: ", error);
} }
}; };
/** /**
* JS Function to set a tag to a verse * JS Function to set a tag to a verse
*/ */
@ -383,10 +666,8 @@ const tagVerse = async (translation, book, chapter, verse, tag) => {
try { try {
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getTagVerseURL(translation, book, chapter, verse, tag)); const response = await fetch(getTagVerseURL(translation, book, chapter, verse, tag));
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
// Call another function after the response has been received // Call another function after the response has been received
if (data.success) { if (data.success) {
// So success message // So success message
@ -428,10 +709,8 @@ const removeTagFromVerse = async (tag, verse) => {
try { try {
// Make a request to your endpoint // Make a request to your endpoint
const response = await fetch(getRemoveTagFromVerseURL(tag)); const response = await fetch(getRemoveTagFromVerseURL(tag));
// Wait for the server to return the response, then parse it as JSON. // Wait for the server to return the response, then parse it as JSON.
const data = await response.json(); const data = await response.json();
// Call another function after the response has been received // Call another function after the response has been received
if (data.success) { if (data.success) {
// Show success message // Show success message
@ -476,31 +755,27 @@ const removeTagFromVerse = async (tag, verse) => {
console.error("Error occurred: ", error); console.error("Error occurred: ", error);
} }
}; };
/** /**
* JS Function to set get Bible access * JS Function to set get Bible access
*/ */
const setupGetBibleAccess = async (active_modal, error_message, callback, args) => { const setupGetBibleAccess = async (active_modal, error_message, callback, args) => {
// close the active modal // close the active modal
UIkit.modal('#' + active_modal).hide(); if (active_modal !== null) {
UIkit.modal('#' + active_modal).hide();
}
try { try {
let modal = UIkit.modal('#getbible_favourite_verse_selector'); // get old linker
modal.show();
// get linker
let linker_old = getLocalMemory('getbible_active_linker_guid'); let linker_old = getLocalMemory('getbible_active_linker_guid');
// Wait for the modal to be closed // Wait for the modal to be closed
await new Promise(resolve => { await setGetBibleFavouriteVerse();
// The 'hidden' event is triggered when the modal is closed // get new linker
UIkit.util.on(modal.$el, 'hidden', function() {
resolve();
});
});
// get linker
let linker = getLocalMemory('getbible_active_linker_guid'); let linker = getLocalMemory('getbible_active_linker_guid');
let pass = getLocalMemory(linker); let pass = getLocalMemory(linker + '-validated');
// check if access was set // check if access was set
if (pass) { if (pass) {
UIkit.modal('#' + active_modal).show(); if (active_modal !== null) {
UIkit.modal('#' + active_modal).show();
}
// we should reload the page if a new linker was set // we should reload the page if a new linker was set
if (linker_old !== linker) { if (linker_old !== linker) {
triggerGetBibleReload = true; triggerGetBibleReload = true;
@ -515,11 +790,14 @@ const setupGetBibleAccess = async (active_modal, error_message, callback, args)
}); });
} }
} catch (error) { } catch (error) {
// Handle any errors // Show message
console.error("Error occurred: ", error); UIkit.notification({
message: error_message,
status: 'warning',
timeout: 5000
});
} }
}; };
/** /**
* JS Function to create an tag div item * JS Function to create an tag div item
*/ */
@ -531,19 +809,15 @@ const createGetbileTagDivItem = (id, verse, name, url, tagged = null, ) => {
if (tagged !== null) { if (tagged !== null) {
itemElement.dataset.tagged = tagged; itemElement.dataset.tagged = tagged;
} }
let marginDiv = document.createElement('div'); let marginDiv = document.createElement('div');
marginDiv.className = 'uk-margin'; marginDiv.className = 'uk-margin';
let cardDiv = document.createElement('div'); let cardDiv = document.createElement('div');
cardDiv.className = 'uk-card uk-card-default uk-card-body uk-card-small'; cardDiv.className = 'uk-card uk-card-default uk-card-body uk-card-small';
// Create handle span // Create handle span
let handleSpan = document.createElement('span'); let handleSpan = document.createElement('span');
handleSpan.className = 'uk-sortable-handle uk-margin-small-right uk-text-center'; handleSpan.className = 'uk-sortable-handle uk-margin-small-right uk-text-center';
handleSpan.setAttribute('uk-icon', 'move'); handleSpan.setAttribute('uk-icon', 'move');
handleSpan.insertAdjacentText('beforeend', name + ' '); handleSpan.insertAdjacentText('beforeend', name + ' ');
// Create view icon // Create view icon
let viewIcon = document.createElement('a'); let viewIcon = document.createElement('a');
viewIcon.href = url; viewIcon.href = url;
@ -553,17 +827,13 @@ const createGetbileTagDivItem = (id, verse, name, url, tagged = null, ) => {
viewIcon.onclick = (event) => { viewIcon.onclick = (event) => {
event.stopPropagation(); event.stopPropagation();
}; };
// Append view icon and name to cardDiv // Append view icon and name to cardDiv
cardDiv.appendChild(handleSpan); cardDiv.appendChild(handleSpan);
cardDiv.appendChild(viewIcon); cardDiv.appendChild(viewIcon);
marginDiv.appendChild(cardDiv); marginDiv.appendChild(cardDiv);
itemElement.appendChild(marginDiv); itemElement.appendChild(marginDiv);
return itemElement; return itemElement;
}; };
/** /**
* JS Function to clear content from its parent div * JS Function to clear content from its parent div
*/ */

View File

@ -42,11 +42,15 @@ class GetbibleControllerAjax extends BaseController
$this->registerTask('getAppUrl', 'ajax'); $this->registerTask('getAppUrl', 'ajax');
$this->registerTask('setLinker', 'ajax'); $this->registerTask('setLinker', 'ajax');
$this->registerTask('setLinkerAccess', 'ajax'); $this->registerTask('setLinkerAccess', 'ajax');
$this->registerTask('revokeLinkerSession', 'ajax');
$this->registerTask('revokeLinkerAccess', 'ajax');
$this->registerTask('setLinkerName', 'ajax');
$this->registerTask('setNote', 'ajax'); $this->registerTask('setNote', 'ajax');
$this->registerTask('tagVerse', 'ajax'); $this->registerTask('tagVerse', 'ajax');
$this->registerTask('removeTagFromVerse', 'ajax'); $this->registerTask('removeTagFromVerse', 'ajax');
$this->registerTask('setTag', 'ajax'); $this->registerTask('setTag', 'ajax');
$this->registerTask('removeTag', 'ajax'); $this->registerTask('removeTag', 'ajax');
$this->registerTask('getLinkersDisplay', 'ajax');
$this->registerTask('getSearchUrl', 'ajax'); $this->registerTask('getSearchUrl', 'ajax');
$this->registerTask('getOpenaiURL', 'ajax'); $this->registerTask('getOpenaiURL', 'ajax');
} }
@ -327,6 +331,129 @@ class GetbibleControllerAjax extends BaseController
} }
} }
break; break;
case 'revokeLinkerSession':
try
{
$linkerValue = $jinput->get('linker', NULL, 'STRING');
if($linkerValue)
{
$result = $this->getModel('ajax')->revokeLinkerSession($linkerValue);
}
else
{
$result = false;
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'revokeLinkerAccess':
try
{
$linkerValue = $jinput->get('linker', NULL, 'STRING');
if($linkerValue)
{
$result = $this->getModel('ajax')->revokeLinkerAccess($linkerValue);
}
else
{
$result = false;
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'setLinkerName':
try
{
$nameValue = $jinput->get('name', NULL, 'STRING');
if($nameValue)
{
$result = $this->getModel('ajax')->setLinkerName($nameValue);
}
else
{
$result = false;
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'setNote': case 'setNote':
try try
{ {
@ -539,6 +666,47 @@ class GetbibleControllerAjax extends BaseController
} }
} }
break; break;
case 'getLinkersDisplay':
try
{
$linkersValue = $jinput->get('linkers', NULL, 'STRING');
if($linkersValue)
{
$result = $this->getModel('ajax')->getLinkersDisplay($linkersValue);
}
else
{
$result = false;
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getSearchUrl': case 'getSearchUrl':
try try
{ {

View File

@ -2,7 +2,11 @@ COM_CONTENT_FIELD_MODIFIED_DESC="The last date this item was modified."
COM_GETBIBLE="Get Bible" COM_GETBIBLE="Get Bible"
COM_GETBIBLE_ABBREVIATION="Abbreviation" COM_GETBIBLE_ABBREVIATION="Abbreviation"
COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated." COM_GETBIBLE_ACCESS_ALREADY_EXIST_BUT_COULD_NOT_BE_REACTIVATED="Access already exist, but could not be reactivated."
COM_GETBIBLE_ACCESS_REVOKED="Access revoked."
COM_GETBIBLE_ACTIVE="Active" COM_GETBIBLE_ACTIVE="Active"
COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION="Active Persistent Session:"
COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION_WAS_NOT_REMOVED="Active persistent session was not removed."
COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION_WAS_REMOVED="Active persistent session was removed."
COM_GETBIBLE_ACTIVE_TAG="Active Tag" COM_GETBIBLE_ACTIVE_TAG="Active Tag"
COM_GETBIBLE_ADD="Add" COM_GETBIBLE_ADD="Add"
COM_GETBIBLE_ADD_YOUR_NOTES_HERE="add your notes here..." COM_GETBIBLE_ADD_YOUR_NOTES_HERE="add your notes here..."
@ -33,7 +37,6 @@ COM_GETBIBLE_CHAPTER="Chapter"
COM_GETBIBLE_CHAPTERS="Chapters" COM_GETBIBLE_CHAPTERS="Chapters"
COM_GETBIBLE_COMPLETION_TOKENS="Completion Tokens" COM_GETBIBLE_COMPLETION_TOKENS="Completion Tokens"
COM_GETBIBLE_COPY="Copy" COM_GETBIBLE_COPY="Copy"
COM_GETBIBLE_COPY_SESSION_LINK="Copy Session Link"
COM_GETBIBLE_CREATED="Created" COM_GETBIBLE_CREATED="Created"
COM_GETBIBLE_CREATE_NEW_S="Create New %s" COM_GETBIBLE_CREATE_NEW_S="Create New %s"
COM_GETBIBLE_DAILY_VERSE="Daily Verse" COM_GETBIBLE_DAILY_VERSE="Daily Verse"
@ -46,6 +49,7 @@ COM_GETBIBLE_DRAG_AND_DROP_THE_DESIRED_TAG_FROM_THE_AVAILABLE_ONES_TO_THE_ACTIVE
COM_GETBIBLE_EDIT_NOTE="Edit note" COM_GETBIBLE_EDIT_NOTE="Edit note"
COM_GETBIBLE_EDIT_S="Edit %s" COM_GETBIBLE_EDIT_S="Edit %s"
COM_GETBIBLE_EMPTY="Empty" COM_GETBIBLE_EMPTY="Empty"
COM_GETBIBLE_ENABLE_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_NOTES_AND_TAGS="Enable exclusive access to edit your notes and tags."
COM_GETBIBLE_ENCODING="Encoding" COM_GETBIBLE_ENCODING="Encoding"
COM_GETBIBLE_EXACT="Exact" COM_GETBIBLE_EXACT="Exact"
COM_GETBIBLE_EXACT_MATCH="Exact Match" COM_GETBIBLE_EXACT_MATCH="Exact Match"
@ -63,9 +67,10 @@ COM_GETBIBLE_FREQUENCY_PENALTY="Frequency Penalty"
COM_GETBIBLE_HEADERS="Headers" COM_GETBIBLE_HEADERS="Headers"
COM_GETBIBLE_HELLO_S="Hello %s" COM_GETBIBLE_HELLO_S="Hello %s"
COM_GETBIBLE_HIDE="Hide" COM_GETBIBLE_HIDE="Hide"
COM_GETBIBLE_HOWEVER_TO_MODIFY_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_YOU_NEED_BOTH_THE_SESSION_KEY_AND_YOUR_FAVOURITE_VERSE="However, to modify your <span class="getbible-activity-notes-and-tags">notes and tags</span>, you need both the session key and your favourite verse." COM_GETBIBLE_HOWEVER_TO_MODIFY_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_YOU_NEED_BOTH_THE_PERSISTENT_SESSION_KEY_AND_YOUR_FAVOURITE_VERSE="However, to modify your <span class="getbible-activity-notes-and-tags">notes and tags</span>, you need both the persistent session key and your favourite verse."
COM_GETBIBLE_HOW_THIS_ALL_WORKS="How This All Works" COM_GETBIBLE_HOW_THIS_ALL_WORKS="How This All Works"
COM_GETBIBLE_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BGETBIBLEB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>getbible</b> will not function correctly!</p>" COM_GETBIBLE_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BGETBIBLEB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>getbible</b> will not function correctly!</p>"
COM_GETBIBLE_IF_YOU_SWITCH_FROM_YOUR_ACTIVE_SESSION_TO_A_SHARED_ONE_YOUR_ORIGINAL_SESSION_WILL_BE_PRESERVED_HERE_FOR_EASY_ACCESS="If you switch from your active session to a shared one, your original session will be preserved here for easy access."
COM_GETBIBLE_INCORRECT_FAVOURITE_VERSE_SELECTED="Incorrect favourite verse selected." COM_GETBIBLE_INCORRECT_FAVOURITE_VERSE_SELECTED="Incorrect favourite verse selected."
COM_GETBIBLE_INSENSITIVE="Insensitive" COM_GETBIBLE_INSENSITIVE="Insensitive"
COM_GETBIBLE_INSTALL="Install" COM_GETBIBLE_INSTALL="Install"
@ -76,7 +81,9 @@ COM_GETBIBLE_LABEL="Label"
COM_GETBIBLE_LAYOUT="Layout" COM_GETBIBLE_LAYOUT="Layout"
COM_GETBIBLE_LICENSE="License" COM_GETBIBLE_LICENSE="License"
COM_GETBIBLE_LINK="Link" COM_GETBIBLE_LINK="Link"
COM_GETBIBLE_LOAD_PREVIOUS_SESSION="Load Previous Session" COM_GETBIBLE_LOAD="Load"
COM_GETBIBLE_LOADING="Loading"
COM_GETBIBLE_LOAD_PREVIOUS_PERSISTENT_SESSION="Load Previous Persistent Session"
COM_GETBIBLE_MARKDOWN="Markdown" COM_GETBIBLE_MARKDOWN="Markdown"
COM_GETBIBLE_MATCH="Match" COM_GETBIBLE_MATCH="Match"
COM_GETBIBLE_MAX_TOKENS="Max Tokens" COM_GETBIBLE_MAX_TOKENS="Max Tokens"
@ -111,6 +118,7 @@ COM_GETBIBLE_PARTIAL="Partial"
COM_GETBIBLE_PARTIAL_MATCH="Partial Match" COM_GETBIBLE_PARTIAL_MATCH="Partial Match"
COM_GETBIBLE_PASSWORD_TO_SHORT_USE_A_LONGER_PASSWORD="Password to short, use a longer password." COM_GETBIBLE_PASSWORD_TO_SHORT_USE_A_LONGER_PASSWORD="Password to short, use a longer password."
COM_GETBIBLE_PERFORMING_MULTIPLE_INSTALLATIONS_WILL_NOT_CAUSE_ANY_DUPLICATES_OR_DATA_CLUTTER_THE_SYSTEM_INTELLIGENTLY_RECOGNIZES_ALREADY_INSTALLED_PARTS_AND_MERELY_REFRESHES_THEM_TO_VERIFY_THAT_THEY_ARE_IN_SYNC_WITH_THE_ORIGINAL_SOURCE="Performing multiple installations will not cause any duplicates or data clutter. The system intelligently recognizes already installed parts and merely refreshes them to verify that they are in sync with the original source." COM_GETBIBLE_PERFORMING_MULTIPLE_INSTALLATIONS_WILL_NOT_CAUSE_ANY_DUPLICATES_OR_DATA_CLUTTER_THE_SYSTEM_INTELLIGENTLY_RECOGNIZES_ALREADY_INSTALLED_PARTS_AND_MERELY_REFRESHES_THEM_TO_VERIFY_THAT_THEY_ARE_IN_SYNC_WITH_THE_ORIGINAL_SOURCE="Performing multiple installations will not cause any duplicates or data clutter. The system intelligently recognizes already installed parts and merely refreshes them to verify that they are in sync with the original source."
COM_GETBIBLE_PERSISTENT_SESSION_KEY="Persistent Session Key"
COM_GETBIBLE_PER_LINE="Per Line" COM_GETBIBLE_PER_LINE="Per Line"
COM_GETBIBLE_PLAIN_TEXT="Plain Text" COM_GETBIBLE_PLAIN_TEXT="Plain Text"
COM_GETBIBLE_PLEASE_KEEP_YOUR_FAVOURITE_VERSE_PRIVATE="Please Keep Your Favourite Verse Private" COM_GETBIBLE_PLEASE_KEEP_YOUR_FAVOURITE_VERSE_PRIVATE="Please Keep Your Favourite Verse Private"
@ -129,6 +137,7 @@ COM_GETBIBLE_REMOVE="Remove"
COM_GETBIBLE_RESEARCH_THIS="Research this" COM_GETBIBLE_RESEARCH_THIS="Research this"
COM_GETBIBLE_RESPONSE="Response" COM_GETBIBLE_RESPONSE="Response"
COM_GETBIBLE_RESPONSE_DETAILS="Response Details" COM_GETBIBLE_RESPONSE_DETAILS="Response Details"
COM_GETBIBLE_REVOKE_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_NOTES_AND_TAGS="Revoke exclusive access to edit your notes and tags."
COM_GETBIBLE_SAVE="Save" COM_GETBIBLE_SAVE="Save"
COM_GETBIBLE_SCRIPTURE="Scripture" COM_GETBIBLE_SCRIPTURE="Scripture"
COM_GETBIBLE_SEARCH="Search" COM_GETBIBLE_SEARCH="Search"
@ -137,16 +146,21 @@ COM_GETBIBLE_SEARCH_OPTIONS="Search Options"
COM_GETBIBLE_SEARCH_RESULTS="Search Results" COM_GETBIBLE_SEARCH_RESULTS="Search Results"
COM_GETBIBLE_SELECT="Select" COM_GETBIBLE_SELECT="Select"
COM_GETBIBLE_SENSITIVE="Sensitive" COM_GETBIBLE_SENSITIVE="Sensitive"
COM_GETBIBLE_SESSIONS="Sessions"
COM_GETBIBLE_SESSION_KEY="Session Key" COM_GETBIBLE_SESSION_KEY="Session Key"
COM_GETBIBLE_SESSION_KEY_COULD_NOT_BE_STORED="Session key could not be stored." COM_GETBIBLE_SESSION_KEY_COULD_NOT_BE_STORED="Session key could not be stored."
COM_GETBIBLE_SESSION_NAME="Session Name"
COM_GETBIBLE_SETTINGS="Settings" COM_GETBIBLE_SETTINGS="Settings"
COM_GETBIBLE_SHARE="Share" COM_GETBIBLE_SHARE="Share"
COM_GETBIBLE_SHARE_LINK="Share Link" COM_GETBIBLE_SHARE_LINK="Share Link"
COM_GETBIBLE_SHARE_TEXT="Share Text" COM_GETBIBLE_SHARE_TEXT="Share Text"
COM_GETBIBLE_SHARE_YOUR_SESSION="Share Your Session"
COM_GETBIBLE_SHARING_THE_WORD_OF_GOD_WITH_THE_WORLD="Sharing the Word of God with the world." COM_GETBIBLE_SHARING_THE_WORD_OF_GOD_WITH_THE_WORLD="Sharing the Word of God with the world."
COM_GETBIBLE_SHOULD_YOU_HAVE_BANOTHER_SESSION_KEYB_FROM_A_PREVIOUS_SESSION="Should you have <b>another session key</b> from a previous session." COM_GETBIBLE_SHOULD_YOU_HAVE_BANOTHER_SESSION_KEYB_FROM_A_PREVIOUS_SESSION="Should you have <b>another session key</b> from a previous session."
COM_GETBIBLE_SHOW="Show" COM_GETBIBLE_SHOW="Show"
COM_GETBIBLE_SOURCE="Source" COM_GETBIBLE_SOURCE="Source"
COM_GETBIBLE_STYLE="Style"
COM_GETBIBLE_STYLE_GO_HERE="Style go here"
COM_GETBIBLE_TAB_NAME_PLACEHOLDERS="Tab Name Placeholders" COM_GETBIBLE_TAB_NAME_PLACEHOLDERS="Tab Name Placeholders"
COM_GETBIBLE_TAG="Tag" COM_GETBIBLE_TAG="Tag"
COM_GETBIBLE_TAGGED_VERSES="Tagged Verses" COM_GETBIBLE_TAGGED_VERSES="Tagged Verses"
@ -164,24 +178,27 @@ COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN="There was
COM_GETBIBLE_THE_ACTIVE_VERSE_SELECTED_TEXT_SHOULD_LOAD_HERE="The active verse selected text should load here." COM_GETBIBLE_THE_ACTIVE_VERSE_SELECTED_TEXT_SHOULD_LOAD_HERE="The active verse selected text should load here."
COM_GETBIBLE_THE_CHAPTERS_OF_BOOKS_WAS_SUCCESSFULLY_INSTALLED_FOR_S_TRANSLATION="The chapter:%s of book:%s was successfully installed for %s translation." COM_GETBIBLE_THE_CHAPTERS_OF_BOOKS_WAS_SUCCESSFULLY_INSTALLED_FOR_S_TRANSLATION="The chapter:%s of book:%s was successfully installed for %s translation."
COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD="The link was copied to your clipboard!" COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD="The link was copied to your clipboard!"
COM_GETBIBLE_THE_NAME_COULD_NOT_BE_UPDATED="The name could not be updated."
COM_GETBIBLE_THE_NAME_HAS_BEEN_UPDATED="The name has been updated."
COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_CREATED="The note was successfully created." COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_CREATED="The note was successfully created."
COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_UPDATED="The note was successfully updated." COM_GETBIBLE_THE_NOTE_WAS_SUCCESSFULLY_UPDATED="The note was successfully updated."
COM_GETBIBLE_THE_PERSISTENT_SESSION_KEY_ALLOWS_VIEWING_WHILE_EDITING_IS_ONLY_POSSIBLE_WHEN_THE_CORRECT_FAVOURITE_VERSE_IS_PROVIDED="The persistent session key allows viewing, while editing is only possible when the correct favourite verse is provided."
COM_GETBIBLE_THE_SCRIPTURE_WAS_COPIED_TO_YOUR_CLIPBOARD="The scripture was copied to your clipboard!" COM_GETBIBLE_THE_SCRIPTURE_WAS_COPIED_TO_YOUR_CLIPBOARD="The scripture was copied to your clipboard!"
COM_GETBIBLE_THE_SEARCH_FEATURE_HAS_NOT_BEEN_ACTIVATED_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR_OF_THIS_WEBSITE_TO_RESOLVE_THIS="The search feature has not been activated. Please contact the system administrator of this website to resolve this." COM_GETBIBLE_THE_SEARCH_FEATURE_HAS_NOT_BEEN_ACTIVATED_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR_OF_THIS_WEBSITE_TO_RESOLVE_THIS="The search feature has not been activated. Please contact the system administrator of this website to resolve this."
COM_GETBIBLE_THE_SESSION_IS_SET="The session is set." COM_GETBIBLE_THE_SESSION_IS_SET="The session is set."
COM_GETBIBLE_THE_SESSION_KEY_ALLOWS_VIEWING_WHILE_EDITING_IS_ONLY_POSSIBLE_WHEN_THE_CORRECT_FAVOURITE_VERSE_IS_PROVIDED="The session key allows viewing, while editing is only possible when the correct favourite verse is provided."
COM_GETBIBLE_THE_TAG_SELECTED_IS_NOT_ACTIVE_PLEASE_SELECT_AN_ACTIVE_TAG="The tag selected is not active, please select an active tag." COM_GETBIBLE_THE_TAG_SELECTED_IS_NOT_ACTIVE_PLEASE_SELECT_AN_ACTIVE_TAG="The tag selected is not active, please select an active tag."
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED="The tag was successfully removed." COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED="The tag was successfully removed."
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE="The tag was successfully removed from the verse." COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE="The tag was successfully removed from the verse."
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_SET="The tag was successfully set." COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_SET="The tag was successfully set."
COM_GETBIBLE_THE_VERSE_WAS_SUCCESSFULLY_TAGGED="The verse was successfully tagged." COM_GETBIBLE_THE_VERSE_WAS_SUCCESSFULLY_TAGGED="The verse was successfully tagged."
COM_GETBIBLE_THE_WORDS_OF_ETERNAL_LIFE="The words of eternal life!" COM_GETBIBLE_THE_WORDS_OF_ETERNAL_LIFE="The words of eternal life!"
COM_GETBIBLE_THIS_AREA_DISPLAYS_YOUR_RECENTLY_ACCESSED_SESSIONS="This area displays your recently accessed sessions."
COM_GETBIBLE_THIS_INSTALLATION_PROCESS_IS_A_ONETIME_OPERATION_FOR_EACH_TRANSLATION_HOWEVER_YOU_ARE_WELCOME_TO_RUN_THE_PROCESS_A_SECOND_TIME_OR_AS_OFTEN_AS_YOUD_LIKE_TO_VALIDATE_AND_ENSURE_THAT_ALL_CONTENT_WAS_PROPERLY_LOADED_AND_IS_UPTODATE="This installation process is a one-time operation for each translation. However, you are welcome to run the process a second time or as often as you'd like to validate and ensure that all content was properly loaded and is up-to-date." COM_GETBIBLE_THIS_INSTALLATION_PROCESS_IS_A_ONETIME_OPERATION_FOR_EACH_TRANSLATION_HOWEVER_YOU_ARE_WELCOME_TO_RUN_THE_PROCESS_A_SECOND_TIME_OR_AS_OFTEN_AS_YOUD_LIKE_TO_VALIDATE_AND_ENSURE_THAT_ALL_CONTENT_WAS_PROPERLY_LOADED_AND_IS_UPTODATE="This installation process is a one-time operation for each translation. However, you are welcome to run the process a second time or as often as you'd like to validate and ensure that all content was properly loaded and is up-to-date."
COM_GETBIBLE_THIS_IS_A_GLOBAL_TAG_SET_BY_US_AT_BSB_FOR_YOUR_CONVENIENCE_WE_HOLD_THE_PRIVILEGE_TO_MODIFY_THESE_TAGS_IF_YOU_BELIEVE_ITS_SET_IN_ERROR_KINDLY_INFORM_US="This is a global tag, set by us at <b>%s</b> for your convenience. We hold the privilege to modify these tags. If you believe it's set in error, kindly inform us." COM_GETBIBLE_THIS_IS_A_GLOBAL_TAG_SET_BY_US_AT_BSB_FOR_YOUR_CONVENIENCE_WE_HOLD_THE_PRIVILEGE_TO_MODIFY_THESE_TAGS_IF_YOU_BELIEVE_ITS_SET_IN_ERROR_KINDLY_INFORM_US="This is a global tag, set by us at <b>%s</b> for your convenience. We hold the privilege to modify these tags. If you believe it's set in error, kindly inform us."
COM_GETBIBLE_THIS_IS_CURRENTLY_THE_ACTIVE_SESSION_KEY="This is currently the active session key." COM_GETBIBLE_THIS_IS_CURRENTLY_THE_ACTIVE_SESSION_KEY="This is currently the active session key."
COM_GETBIBLE_THIS_IS_NOT_A_VALID_SESSION_KEY="This is not a valid session key." COM_GETBIBLE_THIS_IS_NOT_A_VALID_SESSION_KEY="This is not a valid session key."
COM_GETBIBLE_THIS_SESSION_IS_ALREADY_ACTIVE="This session is already active." COM_GETBIBLE_THIS_PERSISTENT_SESSION_IS_ALREADY_ACTIVE="This persistent session is already active."
COM_GETBIBLE_THIS_SESSION_KEY_DOES_NOT_QUALIFY_FOR_SHARING="This session key does not qualify for sharing." COM_GETBIBLE_THIS_SESSION_KEY_IS_NOT_YET_ELIGIBLE_FOR_SHARING_AS_NO_ACTIONS_HAVE_BEEN_PERFORMED_WITHIN_IT="This session key is not yet eligible for sharing, as no actions have been performed within it."
COM_GETBIBLE_THIS_TAG_COULD_NOT_BE_REMOVED="This tag could not be removed." COM_GETBIBLE_THIS_TAG_COULD_NOT_BE_REMOVED="This tag could not be removed."
COM_GETBIBLE_THIS_TAG_CURRENTLY_DOESNT_HAVE_ANY_VERSES_LINKED_TO_IT_PLEASE_SELECT_ANOTHER_TAG_OR_ATTACH_SOME_VERSES_TO_THIS_ONE="This tag currently doesn't have any verses linked to it. Please select another tag, or attach some verses to this one." COM_GETBIBLE_THIS_TAG_CURRENTLY_DOESNT_HAVE_ANY_VERSES_LINKED_TO_IT_PLEASE_SELECT_ANOTHER_TAG_OR_ATTACH_SOME_VERSES_TO_THIS_ONE="This tag currently doesn't have any verses linked to it. Please select another tag, or attach some verses to this one."
COM_GETBIBLE_THIS_VERSE_IN_COMBINATION_WITH_YOUR_ISESSION_KEYI_WILL_BE_USED_TO_AUTHENTICATE_YOU_IN_THE_FUTURE="This verse in combination with your <i>session key</i> will be used to authenticate you in the future." COM_GETBIBLE_THIS_VERSE_IN_COMBINATION_WITH_YOUR_ISESSION_KEYI_WILL_BE_USED_TO_AUTHENTICATE_YOU_IN_THE_FUTURE="This verse in combination with your <i>session key</i> will be used to authenticate you in the future."
@ -190,10 +207,11 @@ COM_GETBIBLE_TOP_P="Top P"
COM_GETBIBLE_TOTALTOKENS="TotalTokens" COM_GETBIBLE_TOTALTOKENS="TotalTokens"
COM_GETBIBLE_TO_PERFORM_THIS_OPEN_THE_GLOBAL_OPTIONS_SECTION_OF_THE_GETBIBLE_BACKEND_LOCATE_THE_GLOBAL_TAB_AND_SWITCH_SHOW_INSTALL_BUTTON_TO_NO_THIS_STEP_ENSURES_THAT_YOUR_SYSTEM_RESOURCES_ARE_NOT_UTILIZED_UNNECESSARILY_ONCE_YOU_HAVE_SUCCESSFULLY_INSTALLED_ALL_YOUR_DESIRED_BIBLE_TRANSLATIONS="To perform this, open the 'Global Options' section of the getBible backend, locate the 'Global' Tab, and switch 'Show Install Button' to [No]. This step ensures that your system resources are not utilized unnecessarily once you have successfully installed all your desired Bible translations." COM_GETBIBLE_TO_PERFORM_THIS_OPEN_THE_GLOBAL_OPTIONS_SECTION_OF_THE_GETBIBLE_BACKEND_LOCATE_THE_GLOBAL_TAB_AND_SWITCH_SHOW_INSTALL_BUTTON_TO_NO_THIS_STEP_ENSURES_THAT_YOUR_SYSTEM_RESOURCES_ARE_NOT_UTILIZED_UNNECESSARILY_ONCE_YOU_HAVE_SUCCESSFULLY_INSTALLED_ALL_YOUR_DESIRED_BIBLE_TRANSLATIONS="To perform this, open the 'Global Options' section of the getBible backend, locate the 'Global' Tab, and switch 'Show Install Button' to [No]. This step ensures that your system resources are not utilized unnecessarily once you have successfully installed all your desired Bible translations."
COM_GETBIBLE_TO_UNTAG_A_VERSE_DRAG_AND_DROP_THE_DESIRED_TAG_FROM_ACTIVE_TO_THE_AVAILABLE_TAGS_AREA="To un-tag a verse, drag and drop the desired tag from active to the available tags area." COM_GETBIBLE_TO_UNTAG_A_VERSE_DRAG_AND_DROP_THE_DESIRED_TAG_FROM_ACTIVE_TO_THE_AVAILABLE_TAGS_AREA="To un-tag a verse, drag and drop the desired tag from active to the available tags area."
COM_GETBIBLE_TO_USE_A_DIFFERENT_SESSION_KEY_SIMPLY_ADD_IT_HERE="To use a different session key, simply add it here." COM_GETBIBLE_TO_USE_A_DIFFERENT_PERSISTENT_SESSION_KEY_SIMPLY_ADD_IT_ABOVE_AND_CLICK_LOAD="To use a different persistent session key, simply add it above, and click load."
COM_GETBIBLE_TRANSLATION="Translation" COM_GETBIBLE_TRANSLATION="Translation"
COM_GETBIBLE_TRANSLATIONS="Translations" COM_GETBIBLE_TRANSLATIONS="Translations"
COM_GETBIBLE_TYPE_YOUR_SEARCH_PHRASE_INTO_THE_SEARCH_BOX_AND_PRESS_ENTER_TO_SEARCH_THE_BSCRIPTURESB_DAILY="Type your search phrase into the search box and press [ENTER] to search the <b>Scriptures</b> daily!" COM_GETBIBLE_TYPE_YOUR_SEARCH_PHRASE_INTO_THE_SEARCH_BOX_AND_PRESS_ENTER_TO_SEARCH_THE_BSCRIPTURESB_DAILY="Type your search phrase into the search box and press [ENTER] to search the <b>Scriptures</b> daily!"
COM_GETBIBLE_UPDATE_PERSISTENT_SESSION_NAME="Update Persistent Session Name"
COM_GETBIBLE_VALIDATION_HASH_OF_THIS_CHAPTER="Validation Hash of this Chapter" COM_GETBIBLE_VALIDATION_HASH_OF_THIS_CHAPTER="Validation Hash of this Chapter"
COM_GETBIBLE_VERSE="Verse" COM_GETBIBLE_VERSE="Verse"
COM_GETBIBLE_VERSES="Verses" COM_GETBIBLE_VERSES="Verses"
@ -202,15 +220,18 @@ COM_GETBIBLE_VIEW_ALL_VERSES_TAGGED="View all verses tagged."
COM_GETBIBLE_WERE_SORRY_THE_TRANSLATION_YOU_SELECTED_DOES_NOT_INCLUDE_THE_BOOK_YOU_WERE_IN_PREVIOUSLY_HOWEVER_WE_HAVE_LOCATED_BSB_WHICH_MIGHT_BE_OF_INTEREST_TO_YOU="We're sorry, the translation you selected does not include the book you were in previously. However, we have located <b>%s</b> which might be of interest to you." COM_GETBIBLE_WERE_SORRY_THE_TRANSLATION_YOU_SELECTED_DOES_NOT_INCLUDE_THE_BOOK_YOU_WERE_IN_PREVIOUSLY_HOWEVER_WE_HAVE_LOCATED_BSB_WHICH_MIGHT_BE_OF_INTEREST_TO_YOU="We're sorry, the translation you selected does not include the book you were in previously. However, we have located <b>%s</b> which might be of interest to you."
COM_GETBIBLE_WE_CURRENTLY_HAVE_BSB_VERSES_STORED_IN_THE_DATABASE_FOR_THIS_PARTICULAR_TRANSLATION="We currently have <b>%s</b> verses stored in the database for this particular translation." COM_GETBIBLE_WE_CURRENTLY_HAVE_BSB_VERSES_STORED_IN_THE_DATABASE_FOR_THIS_PARTICULAR_TRANSLATION="We currently have <b>%s</b> verses stored in the database for this particular translation."
COM_GETBIBLE_WHAT_IS_THIS_HASH_ALL_ABOUT_CLICK_HERE_TO_READ_MORE="What is this Hash all about? Click here to read more..." COM_GETBIBLE_WHAT_IS_THIS_HASH_ALL_ABOUT_CLICK_HERE_TO_READ_MORE="What is this Hash all about? Click here to read more..."
COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSE_YOU_CANT_PERFORM_THE_INITIAL_ACTION="Without selecting the correct favourite verse, you can't perform the initial action." COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION="Without selecting the correct favourite verse,<br />you can't perform the initial action."
COM_GETBIBLE_WORDS="Words" COM_GETBIBLE_WORDS="Words"
COM_GETBIBLE_YOUR_ACTIVE_SESSION_KEY="Your Active Session Key:" COM_GETBIBLE_YOUR_ACTIVE_PERSISTENT_SESSION="Your Active Persistent Session:"
COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_AND_FAVOURITE_VERSE_PROVIDE_YOU_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_THINK_OF_YOUR_PERSISTENT_SESSION_KEY_AS_A_USERNAME_AND_YOUR_FAVOURITE_VERSE_AS_A_PASSWORD_THEREFORE_ENSURE_YOUR_FAVOURITE_VERSE_IS_KEPT_PRIVATE="Your persistent session key and favourite verse provide you exclusive access to edit your <span class="getbible-activity-notes-and-tags">notes and tags</span>. Think of your persistent session key as a username and your favourite verse as a password. Therefore, ensure your favourite verse is kept private."
COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_TOGETHER_WITH_YOUR_FAVOURITE_VERSE_AUTHENTICATES_YOU_IT_LINKS_TO_ALL_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_IN_THE_BIBLE_YOU_CAN_SHARE_IT_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN="Your persistent session key, together with your favourite verse, authenticates you. It links to all your <span class="getbible-activity-notes-and-tags">notes and tags</span> in the Bible. You can share it with loved ones so they can see your <span class="getbible-activity-notes-and-tags">notes and tags</span>."
COM_GETBIBLE_YOUR_SEARCH_DIDNT_YIELD_ANY_RESULTS_PLEASE_TYPE_A_DIFFERENT_KEYWORD_OR_PHRASE_INTO_THE_SEARCH_BOX_AND_PRESS_ENTER_TO_TRY_AGAIN="Your search didn't yield any results. Please type a different keyword or phrase into the search box and press [ENTER] to try again!" COM_GETBIBLE_YOUR_SEARCH_DIDNT_YIELD_ANY_RESULTS_PLEASE_TYPE_A_DIFFERENT_KEYWORD_OR_PHRASE_INTO_THE_SEARCH_BOX_AND_PRESS_ENTER_TO_TRY_AGAIN="Your search didn't yield any results. Please type a different keyword or phrase into the search box and press [ENTER] to try again!"
COM_GETBIBLE_YOUR_SESSION_KEY_AND_FAVOURITE_VERSE_PROVIDE_YOU_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_THINK_OF_YOUR_SESSION_KEY_AS_A_USERNAME_AND_YOUR_FAVOURITE_VERSE_AS_A_PASSWORD_THEREFORE_ENSURE_YOUR_FAVOURITE_VERSE_IS_KEPT_PRIVATE="Your session key and favourite verse provide you exclusive access to edit your <span class="getbible-activity-notes-and-tags">notes and tags</span>. Think of your session key as a username and your favourite verse as a password. Therefore, ensure your favourite verse is kept private."
COM_GETBIBLE_YOUR_SESSION_KEY_TOGETHER_WITH_YOUR_FAVOURITE_VERSE_AUTHENTICATES_YOU_IT_LINKS_TO_ALL_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_IN_THE_BIBLE_YOU_CAN_SHARE_IT_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN="Your session key, together with your favourite verse, authenticates you. It links to all your <span class="getbible-activity-notes-and-tags">notes and tags</span> in the Bible. You can share it with loved ones so they can see your <span class="getbible-activity-notes-and-tags">notes and tags</span>."
COM_GETBIBLE_YOU_ARE_ABOUT_TO_INITIATE_THE_INSTALLATION_PROCESS_FOR_THIS_TRANSLATION_PLEASE_NOTE_THIS_PROCEDURE_IS_QUITE_EXTENSIVE_AND_MAY_TAKE_A_SIGNIFICANT_AMOUNT_OF_TIME_TO_COMPLETE_DEPENDING_ON_YOUR_NETWORK_SPEED_IT_COULD_RANGE_FROM_SEVERAL_MINUTES_TO_A_FEW_HOURS_DURING_THIS_PERIOD_IT_IS_ESSENTIAL_THAT_YOU_DO_NOT_NAVIGATE_AWAY_FROM_THIS_PAGE_CLOSE_THE_BROWSER_OR_SHUT_DOWN_YOUR_COMPUTER_AS_THIS_COULD_INTERRUPT_THE_INSTALLATION_PROCESS_PLEASE_ENSURE_YOU_HAVE_A_STABLE_INTERNET_CONNECTION_AND_SUFFICIENT_TIME_BEFORE_PROCEEDING_WE_RECOMMEND_INITIATING_THIS_WHEN_YOU_DO_NOT_REQUIRE_IMMEDIATE_USE_OF_YOUR_DEVICE_ARE_YOU_SURE_YOU_WANT_TO_START_THE_INSTALLATION_NOW="You are about to initiate the installation process for this translation. Please note, this procedure is quite extensive and may take a significant amount of time to complete, depending on your network speed. It could range from several minutes to a few hours. During this period, it is essential that you do not navigate away from this page, close the browser or shut down your computer as this could interrupt the installation process. Please ensure you have a stable internet connection and sufficient time before proceeding. We recommend initiating this when you do not require immediate use of your device. Are you sure you want to start the installation now?" COM_GETBIBLE_YOU_ARE_ABOUT_TO_INITIATE_THE_INSTALLATION_PROCESS_FOR_THIS_TRANSLATION_PLEASE_NOTE_THIS_PROCEDURE_IS_QUITE_EXTENSIVE_AND_MAY_TAKE_A_SIGNIFICANT_AMOUNT_OF_TIME_TO_COMPLETE_DEPENDING_ON_YOUR_NETWORK_SPEED_IT_COULD_RANGE_FROM_SEVERAL_MINUTES_TO_A_FEW_HOURS_DURING_THIS_PERIOD_IT_IS_ESSENTIAL_THAT_YOU_DO_NOT_NAVIGATE_AWAY_FROM_THIS_PAGE_CLOSE_THE_BROWSER_OR_SHUT_DOWN_YOUR_COMPUTER_AS_THIS_COULD_INTERRUPT_THE_INSTALLATION_PROCESS_PLEASE_ENSURE_YOU_HAVE_A_STABLE_INTERNET_CONNECTION_AND_SUFFICIENT_TIME_BEFORE_PROCEEDING_WE_RECOMMEND_INITIATING_THIS_WHEN_YOU_DO_NOT_REQUIRE_IMMEDIATE_USE_OF_YOUR_DEVICE_ARE_YOU_SURE_YOU_WANT_TO_START_THE_INSTALLATION_NOW="You are about to initiate the installation process for this translation. Please note, this procedure is quite extensive and may take a significant amount of time to complete, depending on your network speed. It could range from several minutes to a few hours. During this period, it is essential that you do not navigate away from this page, close the browser or shut down your computer as this could interrupt the installation process. Please ensure you have a stable internet connection and sufficient time before proceeding. We recommend initiating this when you do not require immediate use of your device. Are you sure you want to start the installation now?"
COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_ANOTHER_SESSION_KEY_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="You are about to load another session key, are you sure you would like to continue?" COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_ANOTHER_PERSISTENT_SESSION_KEY_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="You are about to load another persistent session key, are you sure you would like to continue?"
COM_GETBIBLE_YOU_ARE_ABOUT_TO_REMOVE_THE_ACTIVE_PERSISTENT_SESSION="You are about to remove the active persistent session."
COM_GETBIBLE_YOU_CAN_ADD_IT_HERE_TO_LOAD_YOUR_PREVIOUS_SESSION="You can add it here to load your previous session." COM_GETBIBLE_YOU_CAN_ADD_IT_HERE_TO_LOAD_YOUR_PREVIOUS_SESSION="You can add it here to load your previous session."
COM_GETBIBLE_YOU_CAN_CHANGE_YOUR_SESSION_NAME_TO_SOMETHING_MORE_RECOGNIZABLE="You can change your session name to something more recognizable."
COM_GETBIBLE_YOU_CAN_SHARE_YOUR_SESSION_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_NOTES_AND_TAGS="You can share your session with loved ones so they can see your notes and tags."
COM_GETBIBLE_YOU_HAVE_ENTERED_A_VALID_SESSION_KEY="You have entered a valid session key." COM_GETBIBLE_YOU_HAVE_ENTERED_A_VALID_SESSION_KEY="You have entered a valid session key."
COM_GETBIBLE_YOU_SHOULD_SELECT_ONE_OF_BYOUR_FAVOURITEB_VERSES="You should select one of <b>your favourite</b> verses." COM_GETBIBLE_YOU_SHOULD_SELECT_ONE_OF_BYOUR_FAVOURITEB_VERSES="You should select one of <b>your favourite</b> verses."
JGLOBAL_FIELD_ID_DESC="Record number in the database." JGLOBAL_FIELD_ID_DESC="Record number in the database."

View File

@ -0,0 +1,57 @@
<?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('Restricted access');
$load = false;
if (!empty($displayData))
{
foreach ($displayData as $linker)
{
if (!empty($linker->name))
{
$load = true;
break;
}
}
}
?>
<?php if ($load): ?>
<ul class="uk-grid-small uk-child-width-1-1 uk-child-width-1-2@s" uk-grid>
<?php foreach ($displayData as $linker): ?>
<?php if ($linker->name !== null): ?>
<li id="getbible-local-linker-display-<?php echo $linker->guid; ?>">
<?php echo JLayoutHelper::render('inputbox', ['id' => 'get-session-name-' . $linker->guid, 'label' => JText::_('COM_GETBIBLE_SESSION_NAME'), 'value' => $linker->name, 'readonly' => true]); ?>
<?php echo JLayoutHelper::render('inputbox', ['id' => 'get-session-key-' . $linker->guid, 'label' => JText::_('COM_GETBIBLE_SESSION_KEY'), 'value' => $linker->guid, 'readonly' => true]); ?>
<div class="uk-button-group uk-width-1-1">
<button class="uk-button uk-button-default uk-width-1-3" onclick="loadGetBiblePersistentSessionLinker('<?php echo $linker->guid; ?>');"><?php echo JText::_('COM_GETBIBLE_LOAD'); ?></button>
<button class="uk-button uk-button-default uk-width-1-3" onclick="copyGetBiblePersistentSessionUrl('<?php echo $linker->guid; ?>');"><?php echo JText::_('COM_GETBIBLE_COPY'); ?></button>
<button class="uk-button uk-button-default uk-width-1-3" onclick="removeGetBiblePersistentSession('<?php echo $linker->guid; ?>');"><?php echo JText::_('COM_GETBIBLE_REMOVE'); ?></button>
</div>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="uk-alert-success" uk-alert>
<h3><?php echo JText::_('COM_GETBIBLE_THIS_AREA_DISPLAYS_YOUR_RECENTLY_ACCESSED_SESSIONS'); ?></h3>
<p><?php echo JText::_("COM_GETBIBLE_IF_YOU_SWITCH_FROM_YOUR_ACTIVE_SESSION_TO_A_SHARED_ONE_YOUR_ORIGINAL_SESSION_WILL_BE_PRESERVED_HERE_FOR_EASY_ACCESS"); ?></p>
</div>
<?php endif; ?>

View File

@ -41,7 +41,6 @@ if ($full)
$class_close = ' class="uk-modal-close-full uk-close-large"'; $class_close = ' class="uk-modal-close-full uk-close-large"';
} }
?> ?>
<div id="<?php echo $id; ?>"<?php echo $modal_class; ?> uk-modal> <div id="<?php echo $id; ?>"<?php echo $modal_class; ?> uk-modal>
<div class="<?php echo $dialog_class; ?>"> <div class="<?php echo $dialog_class; ?>">
@ -69,12 +68,13 @@ if ($full)
<?php endif; ?> <?php endif; ?>
<?php foreach ($buttons as $button): ?> <?php foreach ($buttons as $button): ?>
<?php <?php
$class = (isset($button['class'])) ? $button['class'] : 'uk-button uk-button-default'; $id_ = $button['id'] ?? StringHelper::random(7);
$class = $button['class'] ?? 'uk-button uk-button-default';
$class .= (isset($button['close']) && $button['close']) ? ' uk-modal-close' : ''; $class .= (isset($button['close']) && $button['close']) ? ' uk-modal-close' : '';
$name = (isset($button['name'])) ? $button['name'] : ((isset($button['close']) && $button['close']) ? JText::_('COM_GETBIBLE_CANCEL') : JText::_('COM_GETBIBLE_SAVE')); $name = (isset($button['name'])) ? $button['name'] : ((isset($button['close']) && $button['close']) ? JText::_('COM_GETBIBLE_CANCEL') : JText::_('COM_GETBIBLE_SAVE'));
$onclick = (isset($button['onclick'])) ? ' onclick="' . $button['onclick'] . '"' : ''; $onclick = (isset($button['onclick'])) ? ' onclick="' . $button['onclick'] . '"' : '';
?> ?>
<button class="<?php echo $class; ?>" type="button"<?php echo $onclick; ?>><?php echo $name; ?></button> <button id="<?php echo $id_; ?>" class="<?php echo $class; ?>" type="button"<?php echo $onclick; ?>><?php echo $name; ?></button>
<?php endforeach; ?> <?php endforeach; ?>
<?php if (!empty($buttons_class) || !empty($buttons_id)): ?> <?php if (!empty($buttons_class) || !empty($buttons_id)): ?>
</div> </div>

View File

@ -21,6 +21,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ListModel; use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use VDM\Joomla\GetBible\Factory; use VDM\Joomla\GetBible\Factory;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\Utilities\GuidHelper;
/** /**
@ -56,13 +57,14 @@ class GetbibleModelAjax extends ListModel
int $book, int $book,
int $chapter): ?array int $chapter): ?array
{ {
$linker = trim($linker);
// we check if this is a valid linker value // we check if this is a valid linker value
if (Factory::_('GetBible.Linker')->valid($linker)) if (Factory::_('GetBible.Linker')->valid($linker))
{ {
return ['url' => trim(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&ref=' . $book . '&c=' . $chapter . '&Share_His_Word=' . $linker))]; return ['url' => trim(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&translation=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter . '&Share_His_Word=' . $linker))];
} }
return ['error' => JText::_('COM_GETBIBLE_THIS_SESSION_KEY_DOES_NOT_QUALIFY_FOR_SHARING')]; return ['error' => JText::_('COM_GETBIBLE_THIS_SESSION_KEY_IS_NOT_YET_ELIGIBLE_FOR_SHARING_AS_NO_ACTIONS_HAVE_BEEN_PERFORMED_WITHIN_IT')];
} }
/** /**
@ -78,6 +80,7 @@ class GetbibleModelAjax extends ListModel
string $linker, string $linker,
string $oldLinker): ?array string $oldLinker): ?array
{ {
$linker = trim($linker);
// we check if this is a valid linker value // we check if this is a valid linker value
if (Factory::_('GetBible.Linker')->valid($linker) if (Factory::_('GetBible.Linker')->valid($linker)
&& Factory::_('GetBible.Linker')->set($linker)) && Factory::_('GetBible.Linker')->set($linker))
@ -148,7 +151,7 @@ class GetbibleModelAjax extends ListModel
**/ **/
public function setLinker(string $linker): array public function setLinker(string $linker): array
{ {
if (Factory::_('GetBible.Linker')->set($linker)) if (Factory::_('GetBible.Linker')->set(trim($linker)))
{ {
return ['success' => JText::_('COM_GETBIBLE_THE_SESSION_IS_SET')]; return ['success' => JText::_('COM_GETBIBLE_THE_SESSION_IS_SET')];
} }
@ -156,6 +159,25 @@ class GetbibleModelAjax extends ListModel
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')]; return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')];
} }
/**
* Set the Linker Name
*
* @param string $name The linker name value
*
* @return array
* @since 3.2.0
**/
public function setLinkerName(string $name): array
{
$name = trim($name);
if (($result = Factory::_('GetBible.Linker')->setName($name)) !== null)
{
return $result;
}
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')];
}
/** /**
* Set the Linker access * Set the Linker access
* *
@ -168,7 +190,7 @@ class GetbibleModelAjax extends ListModel
**/ **/
public function setLinkerAccess(string $linker, string $pass, ?string $oldPass): array public function setLinkerAccess(string $linker, string $pass, ?string $oldPass): array
{ {
if (($access = Factory::_('GetBible.Linker')->access($linker, $pass, $oldPass)) !== null) if (($access = Factory::_('GetBible.Linker')->access(trim($linker), $pass, $oldPass)) !== null)
{ {
return $access; return $access;
} }
@ -176,6 +198,42 @@ class GetbibleModelAjax extends ListModel
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')]; return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')];
} }
/**
* Revoke the Linker access
*
* @param string $linker The linker GUID value
*
* @return array
* @since 3.2.0
**/
public function revokeLinkerAccess(string $linker): array
{
if (($revoked = Factory::_('GetBible.Linker')->revoke(trim($linker))) !== null)
{
return $revoked;
}
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')];
}
/**
* Revoke the Linker session
*
* @param string $linker The linker GUID value
*
* @return array
* @since 3.2.0
**/
public function revokeLinkerSession(string $linker): array
{
if (($revoked = Factory::_('GetBible.Linker')->revokeSession(trim($linker))) !== null)
{
return $revoked;
}
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN')];
}
/** /**
* Set a Note * Set a Note
* *
@ -295,6 +353,24 @@ class GetbibleModelAjax extends ListModel
return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR')]; return ['error' => JText::_('COM_GETBIBLE_THERE_HAS_BEEN_AN_ERROR')];
} }
/**
* Return the build list of linkers
*
* @param string $linkers The json list of linker values
*
* @return array
* @since 3.2.0
**/
public function getLinkersDisplay(string $linkers): array
{
if (JsonHelper::check($linkers))
{
return ['display' => JLayoutHelper::render('getbiblelinkers', json_decode($linkers))];
}
return ['display' => JLayoutHelper::render('getbiblelinkers', null)];
}
// Used in search // Used in search
/** /**
* Get Search URL * Get Search URL

View File

@ -1548,9 +1548,6 @@ class GetbibleModelApp extends ItemModel
$query->order('a.book_nr ASC'); $query->order('a.book_nr ASC');
$query->order('a.chapter ASC'); $query->order('a.chapter ASC');
$query->order('a.verse ASC'); $query->order('a.verse ASC');
$query->group('a.book_nr');
$query->group('a.chapter');
$query->group('a.verse');
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$db->setQuery($query); $db->setQuery($query);

View File

@ -629,9 +629,6 @@ class GetbibleModelTag extends ListModel
$query->order('a.book_nr ASC'); $query->order('a.book_nr ASC');
$query->order('a.chapter ASC'); $query->order('a.chapter ASC');
$query->order('a.verse ASC'); $query->order('a.verse ASC');
$query->group('a.book_nr');
$query->group('a.chapter');
$query->group('a.verse');
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$db->setQuery($query); $db->setQuery($query);

View File

@ -154,8 +154,13 @@ class GetbibleRouter extends JComponentRouterBase
} }
else else
{ {
$segments[0] = $query['t'] ?? $query['version'] ?? $query['translation'] ?? $this->defaultTranslation; $segments[0] = $query['t'] ?? $query['translation'] ?? $this->defaultTranslation;
$segments[1] = $query['ref'] ?? $query['b'] ?? $query['book'] ?? ''; $book = $query['ref'] ?? $query['b'] ?? $query['book'] ?? '';
if (is_numeric($book) && $book > 0)
{
$book = $this->getBookName((int) $book);
}
$segments[1] = $book;
$chapter = $query['chapter'] ?? $query['c'] ?? ''; $chapter = $query['chapter'] ?? $query['c'] ?? '';
if (strlen($chapter) && is_numeric($chapter)) if (strlen($chapter) && is_numeric($chapter))

View File

@ -19,6 +19,15 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
?> ?>
<script type="text/javascript">
// set global values
const getbible_active_translation = '<?php echo $this->chapter->abbreviation; ?>';
const getbible_verses = <?php echo json_encode($this->chapter->verses); ?>;
const getbible_book_nr = <?php echo $this->chapter->book_nr; ?>;
const getbible_chapter_nr = <?php echo $this->chapter->chapter; ?>;
const getbible_page_url = '<?php echo trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $this->chapter->abbreviation . '&ref=' . $this->chapter->book_name . '&c=' . $this->chapter->chapter); ?>/';
var triggerGetBibleReload = false;
</script>
<div class="uk-section-default uk-section"> <div class="uk-section-default uk-section">
<div class="uk-container"> <div class="uk-container">
<div class="tm-grid-expand uk-child-width-1-1 uk-grid-margin uk-grid uk-grid-stack" uk-grid> <div class="tm-grid-expand uk-child-width-1-1 uk-grid-margin uk-grid uk-grid-stack" uk-grid>
@ -43,38 +52,12 @@ defined('_JEXEC') or die('Restricted access');
</div> </div>
<?php echo $this->loadTemplate('getbiblefavouriteverseselector'); ?> <?php echo $this->loadTemplate('getbiblefavouriteverseselector'); ?>
<script type="text/javascript"> <script type="text/javascript">
<?php if ($this->linker['share'] && !empty($this->linker['guid'])): ?> <?php echo $this->loadTemplate('getbiblelinkermanager'); ?>
setLocalMemory('getbible_active_linker_guid', '<?php echo $this->linker['guid']; ?>');
const getbible_linker_guid = '<?php echo $this->linker['guid']; ?>';
let pass = getLocalMemory(getbible_linker_guid);
if (pass) {
setLinkerAccess(getbible_linker_guid, pass);
}
<?php else: ?>
// make sure the linker is set and ready for use
const getbible_linker_guid = getLocalMemory('getbible_active_linker_guid', '<?php echo $this->linker['guid'] ?? 'empty'; ?>', true);
// update server if needed
if (getbible_linker_guid !== '<?php echo $this->linker['guid'] ?? 'empty'; ?>') {
// check if we have pass
let pass = getLocalMemory(getbible_linker_guid);
if (pass) {
setLinkerAccess(getbible_linker_guid, pass);
} else {
setLinker(getbible_linker_guid);
}
}
<?php endif; ?>
// set global values
const getbible_active_translation = '<?php echo $this->chapter->abbreviation; ?>';
const getbible_verses = <?php echo json_encode($this->chapter->verses); ?>;
// function to access verses by number // function to access verses by number
const getActiveVerseText = (verseNumber) => { const getActiveVerseText = (verseNumber) => {
const verseObj = getbible_verses.find(verse => verse.verse === verseNumber.toString()); const verseObj = getbible_verses.find(verse => verse.verse === verseNumber.toString());
return verseObj ? verseObj.text : "oops... there was an error! verse not found"; return verseObj ? verseObj.text : "oops... there was an error! verse not found";
} }
const getbible_book_nr = <?php echo $this->chapter->book_nr; ?>;
const getbible_chapter_nr = <?php echo $this->chapter->chapter; ?>;
var triggerGetBibleReload = false;
<?php if ($this->params->get('activate_sharing') == 1 || $this->params->get('activate_tags') == 1 || $this->params->get('activate_notes') == 1): ?> <?php if ($this->params->get('activate_sharing') == 1 || $this->params->get('activate_tags') == 1 || $this->params->get('activate_notes') == 1): ?>
<?php if ($this->notes): ?> <?php if ($this->notes): ?>
var getbible_notes = <?php echo json_encode($this->notes); ?>; var getbible_notes = <?php echo json_encode($this->notes); ?>;
@ -91,7 +74,6 @@ var getbible_tagged = <?php echo json_encode($this->taggedverses); ?>;
<?php else: ?> <?php else: ?>
var getbible_tagged = []; var getbible_tagged = [];
<?php endif;?> <?php endif;?>
const getbible_page_url = '<?php echo trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $this->chapter->abbreviation . '&ref=' . $this->chapter->book_name . '&c=' . $this->chapter->chapter); ?>/';
const getbibleFormatVerseSlider = { const getbibleFormatVerseSlider = {
from: function (formattedValue) { from: function (formattedValue) {
return Number(formattedValue); return Number(formattedValue);
@ -158,7 +140,6 @@ const setActiveTags = async (verse) => {
updateActiveGetBibleTaggedItems(verse); updateActiveGetBibleTaggedItems(verse);
updateAllGetBibleTaggedItems(verse); updateAllGetBibleTaggedItems(verse);
} }
const updateActiveGetBibleTaggedItems = async (verse) => { const updateActiveGetBibleTaggedItems = async (verse) => {
removeChildrenElements('getbible-active-tags'); removeChildrenElements('getbible-active-tags');
getbible_tagged.forEach((itemData) => { getbible_tagged.forEach((itemData) => {
@ -169,7 +150,6 @@ const updateActiveGetBibleTaggedItems = async (verse) => {
} }
}); });
}; };
const updateAllGetBibleTaggedItems = async (verse) => { const updateAllGetBibleTaggedItems = async (verse) => {
removeChildrenElements('getbible-tags'); removeChildrenElements('getbible-tags');
getbible_tags.forEach((itemData) => { getbible_tags.forEach((itemData) => {
@ -181,7 +161,6 @@ const updateAllGetBibleTaggedItems = async (verse) => {
} }
}); });
}; };
const setActiveTaggedVerse = async (data) => { const setActiveTaggedVerse = async (data) => {
let found = false; let found = false;
getbible_tagged.forEach((itemData) => { getbible_tagged.forEach((itemData) => {
@ -205,7 +184,6 @@ const setActiveTaggedVerse = async (data) => {
}, 2000); }, 2000);
} }
} }
const setInactiveTaggedVerse = async (tag, verse) => { const setInactiveTaggedVerse = async (tag, verse) => {
getbible_tagged = getbible_tagged.filter((itemData) => { getbible_tagged = getbible_tagged.filter((itemData) => {
return !(itemData.guid == tag); return !(itemData.guid == tag);

View File

@ -0,0 +1,222 @@
<?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');
?>
<div class="uk-child-width-1-2 uk-text-center uk-grid-match" uk-grid>
<div>
<div class="uk-card uk-card-default uk-card-body">
<?php if (!empty($this->linker['name'])): ?>
<h4><?php echo JText::_('COM_GETBIBLE_YOUR_ACTIVE_PERSISTENT_SESSION'); ?></h4>
<?php else: ?>
<h4><?php echo JText::_('COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION'); ?></h4>
<?php endif; ?>
<?php echo JLayoutHelper::render('inputbox', ['id' => 'getbible-settings-session-name', 'label' => JText::_('COM_GETBIBLE_NAME'), 'class_other' => 'uk-text-center', 'value' => $this->linker['name'] ?? 'Default Name']); ?>
<?php echo JLayoutHelper::render('inputbox', ['id' => 'getbible-settings-session-linker', 'label' => JText::_('COM_GETBIBLE_PERSISTENT_SESSION_KEY'), 'class_other' => 'getbible-linker-guid-input uk-text-center', 'value' => $this->linker['guid']]); ?>
<button id="getbible-settings-session-copy" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom" uk-tooltip="<?php echo JText::_('COM_GETBIBLE_YOU_CAN_SHARE_YOUR_SESSION_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_NOTES_AND_TAGS'); ?>"><?php echo JText::_('COM_GETBIBLE_SHARE_YOUR_SESSION'); ?></button>
<button id="getbible-settings-session-name-update" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom" uk-tooltip="<?php echo JText::_('COM_GETBIBLE_YOU_CAN_CHANGE_YOUR_SESSION_NAME_TO_SOMETHING_MORE_RECOGNIZABLE'); ?>"><?php echo JText::_('COM_GETBIBLE_UPDATE_PERSISTENT_SESSION_NAME'); ?></button>
<p class="uk-text-muted"><?php echo JText::_('COM_GETBIBLE_TO_USE_A_DIFFERENT_PERSISTENT_SESSION_KEY_SIMPLY_ADD_IT_ABOVE_AND_CLICK_LOAD'); ?></p>
<button id="getbible-settings-session-load" class="uk-button uk-button-default uk-width-1-1 uk-margin-small-bottom"><?php echo JText::_('COM_GETBIBLE_LOAD_PREVIOUS_PERSISTENT_SESSION'); ?></button>
</div>
</div>
<div>
<div class="uk-child-width-1-2 uk-text-center uk-grid-match" uk-grid>
<div>
<div class="uk-card uk-card-default uk-card-body">
<h4><?php echo JText::_('COM_GETBIBLE_HOW_THIS_ALL_WORKS'); ?></h4>
<p><?php echo JText::_('COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_TOGETHER_WITH_YOUR_FAVOURITE_VERSE_AUTHENTICATES_YOU_IT_LINKS_TO_ALL_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_IN_THE_BIBLE_YOU_CAN_SHARE_IT_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN'); ?></p>
<p><?php echo JText::_('COM_GETBIBLE_HOWEVER_TO_MODIFY_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_YOU_NEED_BOTH_THE_PERSISTENT_SESSION_KEY_AND_YOUR_FAVOURITE_VERSE'); ?></p>
<a href="#" id="getbible-session-status-switch" uk-icon="icon: lock; ratio: 5" uk-tooltip="<?php echo JText::_('COM_GETBIBLE_ENABLE_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_NOTES_AND_TAGS'); ?>"></a>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-card-body">
<h4><?php echo JText::_('COM_GETBIBLE_PLEASE_KEEP_YOUR_FAVOURITE_VERSE_PRIVATE'); ?></h4>
<p><?php echo JText::_('COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_AND_FAVOURITE_VERSE_PROVIDE_YOU_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_THINK_OF_YOUR_PERSISTENT_SESSION_KEY_AS_A_USERNAME_AND_YOUR_FAVOURITE_VERSE_AS_A_PASSWORD_THEREFORE_ENSURE_YOUR_FAVOURITE_VERSE_IS_KEPT_PRIVATE'); ?></p>
<p><?php echo JText::_('COM_GETBIBLE_THE_PERSISTENT_SESSION_KEY_ALLOWS_VIEWING_WHILE_EDITING_IS_ONLY_POSSIBLE_WHEN_THE_CORRECT_FAVOURITE_VERSE_IS_PROVIDED'); ?></p>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
document.getElementById('getbible-settings-session-copy').onclick = async function () {
let linkerGuid = getLocalMemory('getbible_active_linker_guid', null);
copyGetBiblePersistentSessionUrl(linkerGuid);
}
document.getElementById('getbible-settings-session-name-update').onclick = async function () {
let linkerName = document.getElementById('getbible-settings-session-name').value;
if (linkerName) {
setLinkerName(linkerName);
}
}
document.getElementById('getbible-settings-session-load').onclick = function() {
let linkerGuid = document.getElementById('getbible-settings-session-linker').value;
loadGetBiblePersistentSessionLinker(linkerGuid);
}
const copyGetBiblePersistentSessionUrl = async (linkerGuid) => {
if (linkerGuid === null) {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>',
status: 'danger',
timeout: 4000
});
} else {
const shareHisWord = await setShareHisWordUrl(
linkerGuid, getbible_active_translation, getbible_book_nr, getbible_chapter_nr);
if (shareHisWord.url) {
try {
await navigator.clipboard.writeText(shareHisWord.url);
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD'); ?>',
status: 'success',
timeout: 5000
});
} catch (err) {
// Fallback for browsers that do not support clipboard API
const textarea = document.createElement("textarea");
textarea.textContent = shareHisWord.url;
document.body.appendChild(textarea);
textarea.select();
try {
document.execCommand("copy");
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD'); ?>',
status: 'success',
timeout: 5000
});
} catch (err) {
console.error('Failed to copy: ', err);
} finally {
document.body.removeChild(textarea);
}
}
} else if (shareHisWord.error) {
// Show message
UIkit.notification({
message: shareHisWord.error,
status: 'danger',
timeout: 5000
});
} else {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>',
status: 'danger',
timeout: 4000
});
}
}
}
const loadGetBiblePersistentSessionLinker = async (linkerGuid) => {
let oldLinkerGuid = getLocalMemory('getbible_active_linker_guid', null);
// make sure there was a change
if (oldLinkerGuid === linkerGuid) {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THIS_PERSISTENT_SESSION_IS_ALREADY_ACTIVE'); ?>',
status: 'success',
timeout: 4000
});
} else {
UIkit.modal.confirm('<?php echo JText::_('COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_ANOTHER_PERSISTENT_SESSION_KEY_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE'); ?>').then( async function() {
const response = await checkValidLinker(linkerGuid, oldLinkerGuid);
if (response.success) {
// Show message
UIkit.notification({
message: response.success,
status: 'success',
timeout: 2000
});
setLinker(linkerGuid).then((data) => {
if (data.success) {
setActiveLinkerOnPage(linkerGuid);
setLocalMemory('getbible_active_linker_guid', null);
setTimeout(function() {
location.assign(getbible_page_url);
}, 4000);
} else if (data.error) {
// Show message
UIkit.notification({
message: data.error,
status: 'danger',
timeout: 4000
});
}
});
} else if (response.error) {
// Show message
UIkit.notification({
message: response.error,
status: 'danger',
timeout: 4000
});
} else {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>',
status: 'danger',
timeout: 4000
});
}
}, function () {
console.log('Change of persistent session key cancelled.')
});
}
}
const removeGetBiblePersistentSession = async (linkerGuid) => {
let LinkerDisplay = document.getElementById('getbible-local-linker-display-' + linkerGuid);
if (LinkerDisplay) {
let activeLinkerGuid = getLocalMemory('getbible_active_linker_guid', null);
if (activeLinkerGuid && activeLinkerGuid === linkerGuid) {
// Show message
UIkit.modal.confirm('<?php echo JText::_('COM_GETBIBLE_YOU_ARE_ABOUT_TO_REMOVE_THE_ACTIVE_PERSISTENT_SESSION'); ?>').then(async function() {
// remove from local list
await revokeLinkerAccess(linkerGuid);
await revokeLinkerSession(linkerGuid);
await linkerManager.remove(linkerGuid);
LinkerDisplay.remove();
setLocalMemory(linkerGuid + '-validated', false);
setLocalMemory('getbible_active_linker_guid', null);
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION_WAS_REMOVED'); ?>',
status: 'success',
timeout: 4000
});
setTimeout(function() {
location.assign(getbible_page_url);
}, 4100);
}, function() {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_ACTIVE_PERSISTENT_SESSION_WAS_NOT_REMOVED'); ?>',
status: 'primary',
timeout: 4000
});
});
} else {
// remove from local list
await linkerManager.remove(linkerGuid);
LinkerDisplay.remove();
}
}
}
</script>

View File

@ -51,7 +51,7 @@ if ($this->params->get('show_details') == 1)
</div> </div>
</li> </li>
<li class="el-item uk-margin-remove-first-child"> <li class="el-item uk-margin-remove-first-child">
<div class="uk-card<?php echo $translations_card; ?>"> <div class="<?php echo $translations_card; ?>">
<?php echo $this->loadTemplate('getbibletranslations'); ?> <?php echo $this->loadTemplate('getbibletranslations'); ?>
</div> </div>
</li> </li>

View File

@ -22,15 +22,15 @@ $type = $this->params->get('bottom_menu_type');
if ($type == 2) if ($type == 2)
{ {
$menu_type = 'class="uk-margin-small uk-flex-center" uk-tab '; $menu_type = 'class="uk-margin-small uk-flex-center" uk-tab';
} }
else else
{ {
$menu_type = 'class="el-nav uk-margin-small uk-subnav uk-subnav-pill uk-flex-center" '; $menu_type = 'class="el-nav uk-margin-small uk-subnav uk-subnav-pill uk-flex-center"';
} }
?> ?>
<ul <?php echo $menu_type; ?>uk-switcher="connect: #get-bible-app-body; animation: uk-animation-scale-up;"> <ul <?php echo $menu_type; ?> uk-switcher="connect: #get-bible-app-body; animation: uk-animation-scale-up;">
<li<?php if ($this->tab_menu['active_tab'] === 'scripture') { echo ' class="uk-active"'; } ?>> <li<?php if ($this->tab_menu['active_tab'] === 'scripture') { echo ' class="uk-active"'; } ?>>
<a href="#"><?php echo $this->tab_menu['scripture_icon']; ?><?php echo $this->tab_menu['scripture']; ?></a> <a href="#"><?php echo $this->tab_menu['scripture_icon']; ?><?php echo $this->tab_menu['scripture']; ?></a>
</li> </li>

View File

@ -19,141 +19,22 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
?> ?>
<div class="uk-child-width-1-2 uk-text-center uk-grid-match" uk-grid> <div class="uk-margin-small-top">
<div> <ul class="el-nav uk-margin-small uk-subnav uk-subnav-pill uk-flex-center" uk-switcher="connect: #get-bible-app-settings">
<div class="uk-card uk-card-default uk-card-body"> <li class="uk-active"><a href="#"><?php echo JText::_('COM_GETBIBLE_ACTIVE'); ?></a></li>
<h4><?php echo JText::_('COM_GETBIBLE_YOUR_ACTIVE_SESSION_KEY'); ?></h4> <li><a href="#"><?php echo JText::_('COM_GETBIBLE_SESSIONS'); ?></a></li>
<?php echo JLayoutHelper::render('inputbox', ['id' => 'getbible-settings-session-linker', 'label' => JText::_('COM_GETBIBLE_SESSION_KEY'), 'class_other' => 'getbible-linker-guid-input uk-text-center', 'value' => $this->linker['guid']]); ?> <!-- <li><a href="#"><?php echo JText::_('COM_GETBIBLE_STYLE'); ?></a></li> -->
<p class="uk-text-muted"><?php echo JText::_('COM_GETBIBLE_TO_USE_A_DIFFERENT_SESSION_KEY_SIMPLY_ADD_IT_HERE'); ?></p> </ul>
<p uk-margin>
<button id="getbible-settings-session-load" class="uk-button uk-button-default"><?php echo JText::_('COM_GETBIBLE_LOAD_PREVIOUS_SESSION'); ?></button>
<button id="getbible-settings-session-copy" class="uk-button uk-button-primary"><?php echo JText::_('COM_GETBIBLE_COPY_SESSION_LINK'); ?></button>
</p>
</div>
</div>
<div>
<div class="uk-child-width-1-2 uk-text-center uk-grid-match" uk-grid>
<div>
<div class="uk-card uk-card-default uk-card-body">
<h4><?php echo JText::_('COM_GETBIBLE_HOW_THIS_ALL_WORKS'); ?></h4>
<p><?php echo JText::_('COM_GETBIBLE_YOUR_SESSION_KEY_TOGETHER_WITH_YOUR_FAVOURITE_VERSE_AUTHENTICATES_YOU_IT_LINKS_TO_ALL_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_IN_THE_BIBLE_YOU_CAN_SHARE_IT_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN'); ?></p>
<p><?php echo JText::_('COM_GETBIBLE_HOWEVER_TO_MODIFY_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_YOU_NEED_BOTH_THE_SESSION_KEY_AND_YOUR_FAVOURITE_VERSE'); ?></p>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-card-body">
<h4><?php echo JText::_('COM_GETBIBLE_PLEASE_KEEP_YOUR_FAVOURITE_VERSE_PRIVATE'); ?></h4>
<p><?php echo JText::_('COM_GETBIBLE_YOUR_SESSION_KEY_AND_FAVOURITE_VERSE_PROVIDE_YOU_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_THINK_OF_YOUR_SESSION_KEY_AS_A_USERNAME_AND_YOUR_FAVOURITE_VERSE_AS_A_PASSWORD_THEREFORE_ENSURE_YOUR_FAVOURITE_VERSE_IS_KEPT_PRIVATE'); ?></p>
<p><?php echo JText::_('COM_GETBIBLE_THE_SESSION_KEY_ALLOWS_VIEWING_WHILE_EDITING_IS_ONLY_POSSIBLE_WHEN_THE_CORRECT_FAVOURITE_VERSE_IS_PROVIDED'); ?></p>
</div>
</div>
</div>
</div>
</div> </div>
<script type="text/javascript">
document.getElementById('getbible-settings-session-copy').onclick = async function () {
let linkerGuid = getLocalMemory('getbible_active_linker_guid', null);
if (linkerGuid === null) { <ul id="get-bible-app-settings" class="uk-switcher" style="touch-action: pan-y pinch-zoom;">
// Show message <li class="uk-margin-remove">
UIkit.notification({ <?php echo $this->loadTemplate('getbibleappactivesession'); ?>
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>', </li>
status: 'danger', <li class="uk-margin-remove">
timeout: 2000 <div id="getbible-sessions-linker-details"><?php echo JText::_('COM_GETBIBLE_LOADING'); ?>...</div>
}); </li>
} <!-- <li class="uk-margin-remove"> -->
<!-- <div><?php echo JText::_('COM_GETBIBLE_STYLE_GO_HERE'); ?></div> -->
const shareHisWord = await setShareHisWordUrl( <!-- </li> -->
linkerGuid, getbible_active_translation, getbible_book_nr, getbible_chapter_nr); </ul>
if (shareHisWord.url) {
try {
await navigator.clipboard.writeText(shareHisWord.url);
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD'); ?>',
status: 'success',
timeout: 5000
});
} catch (err) {
// Fallback for browsers that do not support clipboard API
const textarea = document.createElement("textarea");
textarea.textContent = shareHisWord.url;
document.body.appendChild(textarea);
textarea.select();
try {
document.execCommand("copy");
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THE_LINK_WAS_COPIED_TO_YOUR_CLIPBOARD'); ?>',
status: 'success',
timeout: 5000
});
} catch (err) {
console.error('Failed to copy: ', err);
} finally {
document.body.removeChild(textarea);
}
}
} else if (shareHisWord.error) {
// Show message
UIkit.notification({
message: shareHisWord.error,
status: 'danger',
timeout: 2000
});
} else {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>',
status: 'danger',
timeout: 2000
});
}
}
document.getElementById('getbible-settings-session-load').onclick = async function() {
let oldLinkerGuid = getLocalMemory('getbible_active_linker_guid', null);
let linkerGuid = document.getElementById('getbible-settings-session-linker').value;
// make sure there was a change
if (oldLinkerGuid === linkerGuid) {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THIS_SESSION_IS_ALREADY_ACTIVE'); ?>',
status: 'success',
timeout: 3000
});
} else {
UIkit.modal.confirm('<?php echo JText::_('COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_ANOTHER_SESSION_KEY_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE'); ?>').then( async function() {
const response = await checkValidLinker(linkerGuid, oldLinkerGuid);
if (response.success) {
// Show message
UIkit.notification({
message: response.success,
status: 'success',
timeout: 2000
});
setActiveLinkerOnPage(linkerGuid);
setLocalMemory('getbible_active_linker_guid', linkerGuid);
setTimeout(function() {
location.reload();
}, 2100);
} else if (response.error) {
// Show message
UIkit.notification({
message: response.error,
status: 'danger',
timeout: 2000
});
} else {
// Show message
UIkit.notification({
message: '<?php echo JText::_('COM_GETBIBLE_THERE_WAS_AN_ERROR_PLEASE_RELOAD_YOUR_PAGE_AND_TRY_AGAIN'); ?>',
status: 'danger',
timeout: 2000
});
}
}, function () {
console.log('Change of session key cancelled.')
});
}
}
</script>

View File

@ -91,18 +91,19 @@ getbibleTagVerseSlider.noUiSlider.on('update', function(values, handle) {
setActiveVerse(value, false); setActiveVerse(value, false);
}); });
// to watch the active list // to watch the active list
UIkit.util.on('#getbible-active-tags', 'added', function (event) { UIkit.util.on('#getbible-active-tags', 'added', async function (event) {
// Fires after an element has been added // Fires after an element has been added
let addedElement = event.detail[1]; let addedElement = event.detail[1];
// now add this tag to this verse // now add this tag to this verse
tagVerse(getbible_active_translation, getbible_book_nr, getbible_chapter_nr, addedElement.dataset.verse, addedElement.dataset.tag); await tagVerse(getbible_active_translation, getbible_book_nr, getbible_chapter_nr, addedElement.dataset.verse, addedElement.dataset.tag);
setActiveVerse(addedElement.dataset.verse, false);
}); });
UIkit.util.on('#getbible-active-tags', 'removed', function (event) { UIkit.util.on('#getbible-active-tags', 'removed', async function (event) {
// Fires after an element has been removed // Fires after an element has been removed
let removedElement = event.detail[1]; let removedElement = event.detail[1];
// now remove the tag from this verse // now remove the tag from this verse
if (removedElement.dataset.tagged) { if (removedElement.dataset.tagged) {
removeTagFromVerse(removedElement.dataset.tagged, removedElement.dataset.verse); await removeTagFromVerse(removedElement.dataset.tagged, removedElement.dataset.verse);
} }
}); });
</script> </script>

View File

@ -22,15 +22,15 @@ $type = $this->params->get('top_menu_type');
if ($type == 2) if ($type == 2)
{ {
$menu_type = 'class="uk-margin-small uk-flex-center" uk-tab '; $menu_type = 'class="uk-margin-small uk-flex-center" uk-tab';
} }
else else
{ {
$menu_type = 'class="el-nav uk-margin-small uk-subnav uk-subnav-pill uk-flex-center" '; $menu_type = 'class="el-nav uk-margin-small uk-subnav uk-subnav-pill uk-flex-center"';
} }
?> ?>
<ul <?php echo $menu_type; ?>uk-switcher="connect: #get-bible-app-body; animation: uk-animation-scale-up;"> <ul <?php echo $menu_type; ?> uk-switcher="connect: #get-bible-app-body; animation: uk-animation-scale-up;">
<li<?php if ($this->tab_menu['active_tab'] === 'scripture') { echo ' class="uk-active"'; } ?>> <li<?php if ($this->tab_menu['active_tab'] === 'scripture') { echo ' class="uk-active"'; } ?>>
<a href="#"><?php echo $this->tab_menu['scripture_icon']; ?><?php echo $this->tab_menu['scripture']; ?></a> <a href="#"><?php echo $this->tab_menu['scripture_icon']; ?><?php echo $this->tab_menu['scripture']; ?></a>
</li> </li>

View File

@ -50,8 +50,8 @@ $content .= '<p class="uk-text-muted">' . JText::_('COM_GETBIBLE_SHOULD_YOU_HAVE
// set buttons // set buttons
$buttons = [ $buttons = [
['name' => JText::_('COM_GETBIBLE_SELECT'), 'onclick' => "activeLinkerAccess();", 'class' => 'uk-button uk-button-default uk-width-2-3'], ['id' => 'getbible-select-favourite-verse', 'name' => JText::_('COM_GETBIBLE_SELECT'), 'class' => 'uk-button uk-button-default uk-width-2-3'],
['close' => true, 'name' => JText::_('COM_GETBIBLE_CANCEL'), 'class' => 'uk-button uk-button-danger uk-width-1-3'] ['id' => 'getbible-cancel-favourite-verse', 'close' => true, 'name' => JText::_('COM_GETBIBLE_CANCEL'), 'class' => 'uk-button uk-button-danger uk-width-1-3']
]; ];
@ -74,37 +74,142 @@ const favouriteBook = document.getElementById('getbible_favourite_book');
const favouriteChapter = document.getElementById('getbible_favourite_chapter'); const favouriteChapter = document.getElementById('getbible_favourite_chapter');
const favouriteVerse = document.getElementById('getbible_favourite_verse'); const favouriteVerse = document.getElementById('getbible_favourite_verse');
const favouriteLinker = document.getElementById('getbible_favourite_linker'); const favouriteLinker = document.getElementById('getbible_favourite_linker');
const favouriteSelection = document.getElementById('getbible-select-favourite-verse');
const cancelFavouriteSelection = document.getElementById('getbible-cancel-favourite-verse');
<?php if ($this->params->get('show_settings') == 1): ?>
const sessionAccessStatusSwitch = document.getElementById('getbible-session-status-switch');
<?php endif; ?>
// Helper function to update the UI
const updateUIAfterSettingFavourite = (linker, pass) => {
favouriteError.style.display = 'none';
setActiveLinkerOnPage(linker);
setLocalMemory('getbible_active_linker_guid', linker);
setLocalMemory(linker + '-validated', true);<?php if ($this->params->get('show_settings') == 1): ?>
setSessionStatusAccess();<?php endif; ?>
UIkit.modal('#getbible_favourite_verse_selector').hide();
};
// Helper function to handle errors
const handleFavouriteError = (errorMessage) => {
favouriteError.style.display = '';
favouriteErrorMessage.textContent = errorMessage;
};
// two variables to hold the resolve and reject functions of our Promise
let resolveFavouriteVerseSelection, rejectFavouriteVerseSelection;
// function to try and set the linker access // function to try and set the linker access
const activeLinkerAccess = async () => { const setGetBibleFavouriteVerse = () => {
UIkit.modal('#getbible_favourite_verse_selector').show();
return new Promise((resolve, reject) => {
resolveFavouriteVerse = resolve;
rejectFavouriteVerse = reject;
});
};
favouriteSelection.addEventListener('click', async () => {
try { try {
// create the pass key
favouriteError.style.display = 'none'; favouriteError.style.display = 'none';
let pass = favouriteBook.value + '_' + favouriteChapter.value + '_' + favouriteVerse.value; let pass = favouriteBook.value + '_' + favouriteChapter.value + '_' + favouriteVerse.value;
let linker = favouriteLinker.value; let linker = favouriteLinker.value;
// Wait for the server to return the response, then parse it as JSON.
const data = await setLinkerAccess(linker, pass); const data = await setLinkerAccess(linker, pass);
// Call another function after the response has been received
if (data.success) { if (data.success) {
// set the linker global updateUIAfterSettingFavourite(linker, pass);
favouriteError.style.display = 'none'; resolveFavouriteVerse();
setActiveLinkerOnPage(linker);
setLocalMemory('getbible_active_linker_guid', linker);
setLocalMemory(linker, pass);
UIkit.modal('#getbible_favourite_verse_selector').hide(); UIkit.modal('#getbible_favourite_verse_selector').hide();
} else if (data.error) { } else if (data.error) {
// show the error handleFavouriteError(data.error);
favouriteError.style.display = ''; rejectFavouriteVerse(data.error);
favouriteErrorMessage.textContent = data.error;
} else { } else {
// Handle any errors let error = "Unknown error occurred: " + JSON.stringify(data);
console.error("Error occurred: ", data); console.error(error);
rejectFavouriteVerse(error);
} }
} catch (error) { } catch (error) {
// Handle any errors
console.error("Error occurred: ", error); console.error("Error occurred: ", error);
rejectFavouriteVerse(error);
} }
} });
cancelFavouriteSelection.addEventListener('click', () => {
rejectFavouriteVerse('User cancelled the operation');
UIkit.modal('#getbible_favourite_verse_selector').hide();
});
const setFavouriteVerseForBrowser = async () => {
return new Promise(async (resolve, reject) => {
try {
await setGetBibleFavouriteVerse();
resolve();
} catch (err) {
reject(err);
}
});
};
<?php if ($this->params->get('show_settings') == 1): ?>
const removeFavouriteVerseFromBrowser = () => {
return new Promise(async (resolve, reject) => {
try {
let linker = getLocalMemory('getbible_active_linker_guid');
if (linker) {
let revoked = await revokeLinkerAccess(linker);
if (revoked.success) {
setLocalMemory(linker + '-validated', false);
resolve();
} else if (revoked.error) {
reject(revoked.error);
} else {
reject("Unexpected response");
}
} else {
reject("Linker is undefined");
}
} catch (err) {
reject(err);
}
});
};
const lockSessionStatusAccess = async () => {
sessionAccessStatusSwitch.setAttribute('uk-icon', 'icon: lock; ratio: 5');
sessionAccessStatusSwitch.classList.remove('uk-text-success');
sessionAccessStatusSwitch.setAttribute('uk-tooltip', '<?php echo JText::_('COM_GETBIBLE_ENABLE_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_NOTES_AND_TAGS'); ?>');
};
const unlockSessionStatusAccess = async () => {
sessionAccessStatusSwitch.setAttribute('uk-icon', 'icon: unlock; ratio: 6');
sessionAccessStatusSwitch.classList.add('uk-text-success');
sessionAccessStatusSwitch.setAttribute('uk-tooltip', '<?php echo JText::_('COM_GETBIBLE_REVOKE_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_NOTES_AND_TAGS'); ?>');
};
const changeSessionStatusSwitch = async () => {
var isLocked = sessionAccessStatusSwitch.getAttribute('uk-icon') === "icon: lock; ratio: 5";
if(isLocked) {
setFavouriteVerseForBrowser().then(() => {
unlockSessionStatusAccess();
}).catch((error) => {
console.error("An error occurred:", error);
});
} else {
removeFavouriteVerseFromBrowser().then(() => {
lockSessionStatusAccess()
}).catch((error) => {
console.error("An error occurred:", error);
});
}
};
const setSessionStatusAccess = async () => {
// check if we have an open or closed session
let linker = getLocalMemory('getbible_active_linker_guid');
if (linker) {
let pass = getLocalMemory(linker + '-validated');
if (pass) {
unlockSessionStatusAccess();
} else {
lockSessionStatusAccess();
}
} else {
lockSessionStatusAccess();
}
};
document.addEventListener('DOMContentLoaded', function() {
setSessionStatusAccess();
sessionAccessStatusSwitch.addEventListener('click', function() {
changeSessionStatusSwitch();
});
});
<?php endif; ?>
</script> </script>

View File

@ -0,0 +1,61 @@
<?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');
?>
<?php if ($this->linker['share'] && !empty($this->linker['guid'])): ?>
setLocalMemory('getbible_active_linker_guid', '<?php echo $this->linker['guid']; ?>');
const getbible_linker_guid = '<?php echo $this->linker['guid']; ?>';
let pass = getLocalMemory(getbible_linker_guid);
if (pass) {
setLinkerAccess(getbible_linker_guid, pass);
}
linkerManager.set(<?php echo json_encode($this->linker); ?>);
<?php else: ?>
// make sure the linker is set and ready for use
const getbible_linker_guid = getLocalMemory('getbible_active_linker_guid', '<?php echo $this->linker['guid'] ?? 'empty'; ?>', true);
// update server if needed
if (getbible_linker_guid !== '<?php echo $this->linker['guid'] ?? 'empty'; ?>') {
// check if we have pass
let pass = getLocalMemory(getbible_linker_guid);
if (pass) {
setLinkerAccess(getbible_linker_guid, pass).then((data) => {
if (data.success) {
location.reload();
}
});
} else {
setLinker(getbible_linker_guid).then((data) => {
if (data.success) {
location.reload();
}
});
}
} else {
linkerManager.set(<?php echo json_encode($this->linker); ?>);
}
<?php endif; ?>
<?php if ($this->params->get('show_settings') == 1): ?>
linkerManager.all().then((data) => {
if (data) {
getLinkersDisplay(data);
}
});
<?php // Loading for ajax JLayoutHelper::render('getbiblelinkers', [?]); ?>
<?php endif; ?>

View File

@ -565,10 +565,7 @@ class GetbibleViewApp extends HtmlView
*/ */
protected function getLinker(): array protected function getLinker(): array
{ {
return [ return Factory::_('GetBible.Linker')->activeDetails();
'guid' => Factory::_('GetBible.Linker')->active(),
'share' => Factory::_('GetBible.Linker')->share()
];
} }
/** /**
@ -678,7 +675,6 @@ class GetbibleViewApp extends HtmlView
// Set the Custom JS script to view // Set the Custom JS script to view
$this->document->addScriptDeclaration(" $this->document->addScriptDeclaration("
const UrlAjax = '$url_ajax'; const UrlAjax = '$url_ajax';
const getShareHisWordUrl = (linker, translation, book, chapter) => { const getShareHisWordUrl = (linker, translation, book, chapter) => {
// build share His Word url // build share His Word url
return UrlAjax + return UrlAjax +
@ -686,13 +682,11 @@ class GetbibleViewApp extends HtmlView
'&linker=' + linker + '&book=' + book + '&linker=' + linker + '&book=' + book +
'&chapter=' + chapter; '&chapter=' + chapter;
}; };
const getCheckValidLinkerUrl = (linker, oldLinker) => { const getCheckValidLinkerUrl = (linker, oldLinker) => {
// build share His Word url // build share His Word url
return UrlAjax + return UrlAjax +
'checkValidLinker&linker=' + linker + '&old=' + oldLinker; 'checkValidLinker&linker=' + linker + '&old=' + oldLinker;
}; };
const getSearchURL = (search, translation) => { const getSearchURL = (search, translation) => {
// build search url // build search url
return UrlAjax + return UrlAjax +
@ -701,7 +695,6 @@ class GetbibleViewApp extends HtmlView
'&case=$search_case' + '&target=1000' + '&case=$search_case' + '&target=1000' +
'&book=' + 0 + '&search=' + search; '&book=' + 0 + '&search=' + search;
}; };
const getOpenaiURL = (guid, words, verse, chapter, book, translation) => { const getOpenaiURL = (guid, words, verse, chapter, book, translation) => {
// build open ai url // build open ai url
return UrlAjax + return UrlAjax +
@ -710,47 +703,56 @@ class GetbibleViewApp extends HtmlView
'&chapter=' + chapter + '&verse=' + verse + '&chapter=' + chapter + '&verse=' + verse +
'&words=' + words; '&words=' + words;
}; };
const getSetLinkerURL = (linker) => { const getSetLinkerURL = (linker) => {
// build set linker url // build set linker url
return UrlAjax + return UrlAjax +
'setLinker&linker=' + linker; 'setLinker&linker=' + linker;
}; };
const revokeLinkerSessionURL = () => {
const getSetLinkerAccessURL = (linker, pass, oldPass) => { // build set linker revoke access url
return UrlAjax + 'revokeLinkerSession';
};
const getSetLinkerAccessURL = () => {
// build set linker access url // build set linker access url
return UrlAjax + 'setLinkerAccess'; return UrlAjax + 'setLinkerAccess';
}; };
const revokeLinkerAccessURL = () => {
// build set linker revoke access url
return UrlAjax + 'revokeLinkerAccess';
};
const setLinkerNameURL = () => {
// build set linker access url
return UrlAjax + 'setLinkerName';
};
const getSetNoteURL = () => { const getSetNoteURL = () => {
// build set note url // build set note url
return UrlAjax + 'setNote'; return UrlAjax + 'setNote';
}; };
const getSetTagURL = (name) => { const getSetTagURL = (name) => {
// build create tag url // build create tag url
return UrlAjax + return UrlAjax +
'setTag&name=' + name; 'setTag&name=' + name;
}; };
const getTagVerseURL = (translation, book, chapter, verse, tag) => { const getTagVerseURL = (translation, book, chapter, verse, tag) => {
// build set tag url // build set tag url
return UrlAjax + return UrlAjax +
'tagVerse&translation=' + translation + '&book=' + book + '&chapter=' + chapter + 'tagVerse&translation=' + translation + '&book=' + book + '&chapter=' + chapter +
'&verse=' + verse + '&tag=' + tag; '&verse=' + verse + '&tag=' + tag;
}; };
const getRemoveTagFromVerseURL = (tag) => { const getRemoveTagFromVerseURL = (tag) => {
// build set tag url // build set tag url
return UrlAjax + return UrlAjax +
'removeTagFromVerse&tag=' + tag; 'removeTagFromVerse&tag=' + tag;
}; };
const installBibleChapterURL = (translation, book, chapter) => { const installBibleChapterURL = (translation, book, chapter) => {
// build load Bible url // build load Bible url
return UrlAjax + 'installBibleChapter&translation=' + translation + return UrlAjax + 'installBibleChapter&translation=' + translation +
'&book=' + book + '&chapter=' + chapter; '&book=' + book + '&chapter=' + chapter;
}; };
const getLinkersDisplayURL = () => {
// build load Bible url
return UrlAjax + 'getLinkersDisplay';
};
"); ");
} }

View File

@ -71,4 +71,22 @@
<maintainerurl>https://getbible.net</maintainerurl> <maintainerurl>https://getbible.net</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Get Bible</name>
<description>The Bible for Joomla</description>
<element>pkg_getbible</element>
<type>package</type>
<client>site</client>
<version>2.0.5</version>
<infourl title="Get Bible!">https://getbible.net</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v2.0.5.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://getbible.net</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates> </updates>