Stable release of v2.0.19

Adds metadata to each Bible page to resolve getBible/support#6. Adds option to force chapter hash checking.
This commit is contained in:
Robot 2023-08-13 11:50:18 +02:00
parent e9693965d3
commit 5806bba7f3
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
22 changed files with 297 additions and 31 deletions

View File

@ -92,4 +92,9 @@
# v2.0.18
- Adds bottom module position on tag, search, ai and app pages.
- Fixed JavaScript Database Manager some more.
- Fixed JavaScript Database Manager some more.
# v2.0.19
- Adds metadata to each Bible page to resolve getBible/support#6
- Adds option to force chapter hash checking.

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.18)
# Get Bible (2.0.19)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,21 +18,21 @@ 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)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 10th August, 2023
+ *Version*: 2.0.18
+ *Last Build*: 13th August, 2023
+ *Version*: 2.0.19
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**552 Hours** or **69 Eight Hour Days** (actual time the author saved -
**553 Hours** or **69 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **197705**
+ *File count*: **1717**
+ *Line count*: **198087**
+ *File count*: **1718**
+ *Folder count*: **163**
**364 Hours** or **46 Eight Hour Days** (the actual time the author spent)
@ -43,7 +43,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> **mapping @55hours** = codingtime / 10;
> **office @92hours** = codingtime / 6;)
**916 Hours** or **115 Eight Hour Days**
**917 Hours** or **115 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.18)
# Get Bible (2.0.19)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,21 +18,21 @@ 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)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 10th August, 2023
+ *Version*: 2.0.18
+ *Last Build*: 13th August, 2023
+ *Version*: 2.0.19
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**552 Hours** or **69 Eight Hour Days** (actual time the author saved -
**553 Hours** or **69 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **197705**
+ *File count*: **1717**
+ *Line count*: **198087**
+ *File count*: **1718**
+ *Folder count*: **163**
**364 Hours** or **46 Eight Hour Days** (the actual time the author spent)
@ -43,7 +43,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> **mapping @55hours** = codingtime / 10;
> **office @92hours** = codingtime / 6;)
**916 Hours** or **115 Eight Hour Days**
**917 Hours** or **115 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -13,6 +13,7 @@
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
<action name="core.edit.created_by" title="COM_GETBIBLE_EDIT_CREATED_BY" description="COM_GETBIBLE_EDIT_CREATED_BY_DESC" />
<action name="core.edit.created" title="COM_GETBIBLE_EDIT_CREATED_DATE" description="COM_GETBIBLE_EDIT_CREATED_DATE_DESC" />
<action name="book.force_hash_check" title="COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS" description="COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC" />
<action name="book.update_chapters_names" title="COM_GETBIBLE_BOOK_UPDATE_CHAPTERS_NAMES_BUTTON_ACCESS" description="COM_GETBIBLE_BOOK_UPDATE_CHAPTERS_NAMES_BUTTON_ACCESS_DESC" />
<action name="book.access" title="COM_GETBIBLE_BOOKS_ACCESS" description="COM_GETBIBLE_BOOKS_ACCESS_DESC" />
<action name="book.batch" title="COM_GETBIBLE_BOOKS_BATCH_USE" description="COM_GETBIBLE_BOOKS_BATCH_USE_DESC" />

View File

@ -104,5 +104,59 @@ class GetbibleControllerBooks extends AdminController
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return;
}
public function forceHashCheck()
{
// Check for request forgeries
JSession::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('book.force_hash_check', 'com_getbible'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// check if there is any selections
$number = UtilitiesArrayHelper::check($pks);
if (!$number)
{
// Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_NO_BOOK_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return;
}
elseif (Factory::_('GetBible.Watcher.Chapter')->force($pks))
{
// Redirect to the list screen with success.
$message = array();
$message[] = '<h1>' . JText::_('COM_GETBIBLE_FORCE_HASH_CHECK_ENABLED') . '</h1>';
// get the data to export
if ($number == 1)
{
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_BOOK_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>';
}
else
{
$message[] = '<p>' . JText::_('COM_GETBIBLE_THE_CHAPTERS_OF_THE_SELECTED_BOOKS_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API') . '</p>';
}
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), implode('', $message), 'Success');
return;
}
}
else
{
// Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_ENABLED_FORCEFUL_CHECK_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return;
}
// Redirect to the list screen with error.
$message = JText::_('COM_GETBIBLE_UPDATE_FAILED_PLEASE_TRY_AGAIN_LATTER');
$this->setRedirect(JRoute::_('index.php?option=com_getbible&view=books', false), $message, 'error');
return;
}
}

View File

@ -70,6 +70,8 @@ COM_GETBIBLE_BOOK_CREATED_DATE_DESC="The date this Book was created."
COM_GETBIBLE_BOOK_CREATED_DATE_LABEL="Created Date"
COM_GETBIBLE_BOOK_DETAILS="Details"
COM_GETBIBLE_BOOK_ERROR_UNIQUE_ALIAS="Another Book has the same alias."
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS="Book Force Hash Check Button Access"
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC="Allows the users in this group to access the force hash check button."
COM_GETBIBLE_BOOK_ID="Id"
COM_GETBIBLE_BOOK_MODIFIED_BY_DESC="The last user that modified this Book."
COM_GETBIBLE_BOOK_MODIFIED_BY_LABEL="Modified By"
@ -590,10 +592,11 @@ COM_GETBIBLE_FILTER_TRANSLATION_ASCENDING="Translation ascending"
COM_GETBIBLE_FILTER_TRANSLATION_DESCENDING="Translation descending"
COM_GETBIBLE_FILTER_VERSE_ASCENDING="Verse ascending"
COM_GETBIBLE_FILTER_VERSE_DESCENDING="Verse descending"
COM_GETBIBLE_FORCE_HASH_CHECK="Force Hash Check"
COM_GETBIBLE_FORCE_HASH_CHECK_ENABLED="Force Hash Check Enabled!"
COM_GETBIBLE_GET_TOKEN="Get Token"
COM_GETBIBLE_GET_TOKEN_FROM_VDM_TO_GET_UPDATE_NOTICE_AND_ADD_IT_TO_YOUR_GLOBAL_OPTIONS="Get token from VDM to get update notice, and add it to your global options."
COM_GETBIBLE_HELP_MANAGER="Help"
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_INACTIVE="Inactive"
COM_GETBIBLE_INCORRECT_FAVOURITE_VERSE_SELECTED="Incorrect favourite verse selected."
COM_GETBIBLE_INVALID_SESSION_KEY_VALUE="Invalid session key value."
@ -1606,6 +1609,8 @@ COM_GETBIBLE_TAG_VERSION_DESC="A count of the number of times this Tag has been
COM_GETBIBLE_TAG_VERSION_LABEL="Version"
COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_SELECTED_TRANSLATIONS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="The book names of the selected translations were successfully updated, and they are now in sync with the getBible API."
COM_GETBIBLE_THE_BOOK_NAMES_OF_THE_TRANSLATION_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="The book names of the translation were successfully updated, and they are now in sync with the getBible API."
COM_GETBIBLE_THE_CHAPTERS_OF_THE_BOOK_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API="The chapters of the book will be forcefully synced with the getBible API."
COM_GETBIBLE_THE_CHAPTERS_OF_THE_SELECTED_BOOKS_WILL_BE_FORCEFULLY_SYNCED_WITH_THE_GETBIBLE_API="The chapters of the selected books will be forcefully synced with the getBible API."
COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_BOOK_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="The chapter names of the book were successfully updated, and they are now in sync with the getBible API."
COM_GETBIBLE_THE_CHAPTER_NAMES_OF_THE_SELECTED_BOOKS_WERE_SUCCESSFULLY_UPDATED_AND_THEY_ARE_NOW_IN_SYNC_WITH_THE_GETBIBLE_API="The chapter names of the selected books were successfully updated, and they are now in sync with the getBible API."
COM_GETBIBLE_THE_NAME_COULD_NOT_BE_UPDATED="The name could not be updated."
@ -1912,6 +1917,7 @@ COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_TH
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_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_DO_NOT_HAVE_PERMISSION_TO_ENABLED_FORCEFUL_CHECK_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to enabled forceful check, please contact your system administrator for more help."
COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_BOOK_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to update the book names, please contact your system administrator for more help."
COM_GETBIBLE_YOU_DO_NOT_HAVE_PERMISSION_TO_UPDATE_THE_CHAPTER_NAMES_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to update the chapter names, please contact your system administrator for more help."
COM_GETBIBLE_YOU_HAVE_BEEN_BLOCKED_YOU_WILL_NEED_TO_WAIT_ONE_DAY_BEFORE_TRYING_AGAIN_OR_CONTACT_SUPPORT="You have been blocked, you will need to wait one day before trying again, or contact support."

View File

@ -29,6 +29,8 @@ COM_GETBIBLE_BOOKS_EDIT_STATE="Books Edit State"
COM_GETBIBLE_BOOKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the book"
COM_GETBIBLE_BOOKS_SUBMENU="Books Submenu"
COM_GETBIBLE_BOOKS_SUBMENU_DESC="Allows the users in this group to submenu of book"
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS="Book Force Hash Check Button Access"
COM_GETBIBLE_BOOK_FORCE_HASH_CHECK_BUTTON_ACCESS_DESC="Allows the users in this group to access the force hash check button."
COM_GETBIBLE_BOOK_UPDATE_CHAPTERS_NAMES_BUTTON_ACCESS="Book Update Chapters Names Button Access"
COM_GETBIBLE_BOOK_UPDATE_CHAPTERS_NAMES_BUTTON_ACCESS_DESC="Allows the users in this group to access the update chapters names button."
COM_GETBIBLE_CHAPTERS_ACCESS="Chapters Access"

View File

@ -0,0 +1 @@

View File

@ -137,6 +137,11 @@ class GetbibleViewBooks extends HtmlView
// add Update Chapters Names button.
JToolBarHelper::custom('books.updateChaptersNames', 'generic custom-button-updatechaptersnames', '', 'COM_GETBIBLE_UPDATE_CHAPTERS_NAMES', 'true');
}
if ($this->user->authorise('book.force_hash_check', 'com_getbible'))
{
// add Force Hash Check button.
JToolBarHelper::custom('books.forceHashCheck', 'health custom-button-forcehashcheck', '', 'COM_GETBIBLE_FORCE_HASH_CHECK', 'true');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4" method="upgrade">
<name>COM_GETBIBLE</name>
<creationDate>10th August, 2023</creationDate>
<creationDate>13th August, 2023</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://getbible.net</authorUrl>
<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>
<version>2.0.18</version>
<version>2.0.19</version>
<description><![CDATA[
<h1>Get Bible (v.2.0.18)</h1>
<h1>Get Bible (v.2.0.19)</h1>
<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.

View File

@ -73,6 +73,22 @@ abstract class Watcher
*/
protected ?object $target;
/**
* The today's date
*
* @var string
* @since 2.0.1
*/
protected string $today;
/**
* The two months in the past date
*
* @var string
* @since 2.0.1
*/
protected string $past;
/**
* The target table
*
@ -99,8 +115,10 @@ abstract class Watcher
$this->insert = $insert;
$this->update = $update;
// just in-case we set a date
// just in-case we set some dates
$this->today = (new Date())->toSql();
$this->past = (new Date())->modify('-2 months')->toSql();
}
/**

View File

@ -137,6 +137,41 @@ final class Chapter extends Watcher
return true;
}
/**
* Force book chapter sync
*
* @param array $books The books ids.
*
* @return bool True on success
* @since 2.0.1
*/
public function force(array $books): bool
{
foreach ($books as $book)
{
if (($_book = $this->load->item(['id' => $book], 'book')) === null)
{
return false;
}
if (($chapters = $this->load->items(
['abbreviation' => $_book->abbreviation, 'book_nr' => $_book->nr],
'chapter'
)) !== null)
{
foreach ($chapters as $chapter)
{
$this->update->row([
'id' => $chapter->id,
'created' => $this->past
], 'id', 'chapter');
}
}
}
return true;
}
/**
* Load the chapter numbers
*

View File

@ -132,7 +132,7 @@ abstract class FileHelper
elseif (!self::$curlError)
{
// set the notice
Factory::getApplication()->enqueueMessage(Text::_('COM_GETBIBLE_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BGETBIBLEB_WILL_NOT_FUNCTION_CORRECTLYP'), 'Error');
Factory::getApplication()->enqueueMessage('<h2>Curl Not Found!</h2><p>Please setup curl on your system, or the <b>Joomla Component</b> will not function correctly!</p>', 'Error');
// load this notice only once
self::$curlError = true;
}

View File

@ -1125,7 +1125,7 @@ class com_getbibleInstallerScript
{
$rule_length = $db->loadResult();
// Check the size of the rules column
if ($rule_length <= 44320)
if ($rule_length <= 44480)
{
// Fix the assets table rules column size
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` TEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to TEXT by JCB';";
@ -1539,7 +1539,7 @@ class com_getbibleInstallerScript
echo '<a target="_blank" href="https://getbible.net" title="Get Bible">
<img src="components/com_getbible/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.0.18 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.0.19 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))

View File

@ -23,6 +23,7 @@ COM_GETBIBLE_APP_DESC="App"
COM_GETBIBLE_AUTO_GENERATED="auto generated"
COM_GETBIBLE_AVAILABLE_TAGS="Available Tags"
COM_GETBIBLE_A_BOOK="A Book"
COM_GETBIBLE_BACK_TO_BIBLE="Back to Bible"
COM_GETBIBLE_BASIC_HASH_USAGE_EXPLAINED="Basic Hash Usage Explained"
COM_GETBIBLE_BIBLE="Bible"
COM_GETBIBLE_BOOKS="Books"
@ -75,7 +76,6 @@ COM_GETBIBLE_HELLO_S="Hello %s"
COM_GETBIBLE_HIDE="Hide"
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_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_INSENSITIVE="Insensitive"
@ -137,6 +137,7 @@ COM_GETBIBLE_PROMPT_SETTINGS="Prompt Settings"
COM_GETBIBLE_PROMPT_TOKENS="Prompt Tokens"
COM_GETBIBLE_PROMPT_USED="Prompt Used"
COM_GETBIBLE_QUERY="Query"
COM_GETBIBLE_READ_S_CHAPTER_S_IN_THE_S="Read %s chapter %s in the %s"
COM_GETBIBLE_REDIRECTING_TO="Redirecting to"
COM_GETBIBLE_REFERENCE="Reference"
COM_GETBIBLE_REMOVE="Remove"
@ -169,6 +170,8 @@ COM_GETBIBLE_SHOW="Show"
COM_GETBIBLE_SOURCE="Source"
COM_GETBIBLE_STYLE="Style"
COM_GETBIBLE_STYLE_GO_HERE="Style go here"
COM_GETBIBLE_S_CHAPTER_S_S_S="%s: Chapter %s (%s) - %s"
COM_GETBIBLE_S_CHAPTER_S_S_S_S_S_BIBLE_S_SCRIPTURE_GETBIBLE="%s, chapter %s, %s, %s, %s, %s Bible, %s, scripture, getBible"
COM_GETBIBLE_TAB_NAME_PLACEHOLDERS="Tab Name Placeholders"
COM_GETBIBLE_TAG="Tag"
COM_GETBIBLE_TAGGED_VERSES="Tagged Verses"
@ -206,6 +209,7 @@ COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_REMOVED_FROM_THE_VERSE="The tag was succes
COM_GETBIBLE_THE_TAG_WAS_SUCCESSFULLY_UPDATED="The tag was successfully updated."
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_WORD_OF_GOD="The Word of God"
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_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."

View File

@ -198,7 +198,7 @@ class GetbibleModelApp extends ItemModel
Factory::_('GetBible.Watcher')->sync($this->translation, $this->book, $chapter_previous);
}
$data = [
$data = (object) [
'translation' => $this->translation,
'book' => $this->book,
'chapter' => $this->chapter,

View File

@ -25,7 +25,7 @@ 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); ?>/';
const getbible_page_url = '<?php echo $this->url_base; ?>/';
var triggerGetBibleReload = false;
</script>
<div class="uk-section-default uk-section">

View File

@ -24,13 +24,13 @@ defined('_JEXEC') or die('Restricted access');
<?php echo JLayoutHelper::render('previouschapter', $this->previous); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('activate_sharing') == 1 || $this->params->get('activate_search') == 1 || empty($this->item['daily'])): ?>
<?php if ($this->params->get('activate_sharing') == 1 || $this->params->get('activate_search') == 1 || empty($this->item->daily)): ?>
<?php if (strtolower($this->translation->direction) === 'ltr'): ?>
<div class="uk-float-right">
<?php else: ?>
<div class="uk-float-left">
<?php endif; ?>
<?php if (empty($this->item['daily'])): ?>
<?php if (empty($this->item->daily)): ?>
<a class="uk-icon-button" href="<?php echo $this->url_daily; ?>" uk-tooltip="<?php echo JText::_('COM_GETBIBLE_DAILY_VERSE'); ?>" uk-icon="icon: home"></a>
<?php endif; ?>
<?php if ($this->params->get('activate_search') == 1): ?>

View File

@ -52,8 +52,18 @@ class GetbibleViewApp extends HtmlView
$this->prompts = $this->get('Prompts');
$this->linkertaggedverses = $this->get('LinkerTaggedVerses');
$this->linkertags = $this->get('LinkerTags');
// remove from page (in case debug mode is on)
$this->params->get('openai_token', null);
// only run these if we have an item
if ($this->item)
{
// set the page direction globally
$this->document->setDirection($this->translation->direction);
// set the global language declaration
// $this->document->setLanguage($this->translation->joomla); (soon ;)
// get the input values
$this->input = $this->app->input;
@ -82,11 +92,14 @@ class GetbibleViewApp extends HtmlView
}
// set the base URL
$this->setBaseUrl();
// set the daily verse url
$this->setDailyVerseUrl();
// set the selected verses
$this->verses = new \stdClass();
$this->verses->selected = $this->item['verses'] ? $this->getSelectedVerses($this->item['verses']) : null;
$this->verses->selected = $this->item->verses ? $this->getSelectedVerses($this->item->verses) : null;
$this->verses->first = 1;
$this->verses->last = 2;
if (!empty($this->verses->selected))
@ -109,6 +122,9 @@ class GetbibleViewApp extends HtmlView
// start the modal state
$this->modalState = new \stdClass();
// set metadata
$this->setMetaData();
}
else
{
@ -139,6 +155,81 @@ class GetbibleViewApp extends HtmlView
parent::display($tpl);
}
/**
* Set the page metadata
*
* @return void
* @since 2.0.1
*/
protected function setMetaData()
{
// set the page title
$title = JText::sprintf('COM_GETBIBLE_S_CHAPTER_S_S_S',
$this->chapter->book_name,
$this->chapter->chapter,
$this->translation->abbreviation,
$this->params->get('page_title', '')
);
$this->document->setTitle($title);
// set the Generator
$this->document->setGenerator('getBible! - Open Source Bible App.');
// set the metadata values
$description = JText::sprintf('COM_GETBIBLE_READ_S_CHAPTER_S_IN_THE_S',
$this->chapter->book_name,
$this->chapter->chapter,
$this->translation->translation
);
$this->item->metadesc = $description;
$this->item->metakey = JText::sprintf('COM_GETBIBLE_S_CHAPTER_S_S_S_S_S_BIBLE_S_SCRIPTURE_GETBIBLE',
$this->chapter->book_name,
$this->chapter->chapter,
$this->chapter->name,
$this->translation->translation,
$this->translation->abbreviation,
$this->translation->language,
$this->translation->distribution_lcsh
);
$this->item->created_by = JText::_('COM_GETBIBLE_THE_WORD_OF_GOD');
// set canonical URL
$this->document->addHeadLink($this->url_base, 'canonical');
// OG:Title
$this->document->setMetadata('og:title', $title, 'property');
// OG:Description
$this->document->setMetadata('og:description', $description, 'property');
// OG:Image
// $this->document->setMetadata('og:image', 'YOUR_IMAGE_URL_HERE', 'property');
// OG:URL
$this->document->setMetadata('og:url', $this->url_base, 'property');
// OG:Type
$this->document->setMetadata('og:type', 'website', 'property');
// Twitter Card Type
$this->document->setMetadata('twitter:card', 'summary');
// Twitter Title
$this->document->setMetadata('twitter:title', $title);
// Twitter Description
$this->document->setMetadata('twitter:description', $description);
// Twitter Image
// $this->document->setMetadata('twitter:image', 'YOUR_IMAGE_URL_HERE');
// Twitter Site (Your website's Twitter handle)
// $this->document->setMetadata('twitter:site', '@YourTwitterHandle');
// Twitter Creator (Author's Twitter handle or your website's Twitter handle)
// $this->document->setMetadata('twitter:creator', '@AuthorTwitterHandle');
}
/**
* Set the tabs menu
*
@ -457,6 +548,17 @@ class GetbibleViewApp extends HtmlView
}
}
/**
* Set the base url
*
* @return void
* @since 2.0.1
*/
protected function setBaseUrl()
{
$this->url_base = trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $this->chapter->abbreviation . '&ref=' . $this->chapter->book_name . '&c=' . $this->chapter->chapter);
}
/**
* Set the daily verse url
*

View File

@ -29,6 +29,7 @@ defined('_JEXEC') or die('Restricted access');
<div uk-alert>
<h3><?php echo JText::_('COM_GETBIBLE_NO_TAGGED_VERSES_FOUND'); ?>!</h3>
<p><?php echo JText::_("COM_GETBIBLE_THIS_TAG_CURRENTLY_DOESNT_HAVE_ANY_VERSES_LINKED_TO_IT_PLEASE_SELECT_ANOTHER_TAG_OR_ATTACH_SOME_VERSES_TO_THIS_ONE"); ?></p>
<a href="<?php echo $this->url_bible; ?>" class="uk-button uk-button-default uk-width-1-1 uk-margin-small-bottom"><?php echo JText::_('COM_GETBIBLE_BACK_TO_BIBLE'); ?></a>
</div>
<?php echo $this->loadTemplate('getbibleselecttags'); ?>
</div>

View File

@ -71,7 +71,10 @@ class GetbibleViewTag extends HtmlView
// set sorting books option
$this->setBooks();
}
}
}
// set the Bible url
$this->setBaseUrl();
// Set the toolbar
$this->addToolBar();
@ -204,6 +207,17 @@ class GetbibleViewTag extends HtmlView
}
}
/**
* Set the base url
*
* @return void
* @since 2.0.1
*/
protected function setBaseUrl()
{
$this->url_base = trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $this->chapter->abbreviation . '&ref=' . $this->chapter->book_name . '&c=' . $this->chapter->chapter);
}
/**
* Get the Linker Details
*
@ -212,7 +226,7 @@ class GetbibleViewTag extends HtmlView
*/
protected function getLinker(): array
{
return ['guid' => Factory::_('GetBible.Linker')->active()];
return Factory::_('GetBible.Linker')->activeDetails();
}
/**

View File

@ -305,4 +305,22 @@
<maintainerurl>https://getbible.net</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</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.19</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.19.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>