diff --git a/CHANGELOG.md b/CHANGELOG.md index 10d99b1..014ec73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v5.0.13 + +- Add back to Bible button to Open AI page. + # v5.0.12 - Add PHP check on installation. @@ -54,12 +58,10 @@ - Moved to Joomla 4 and 5 -# v4.0.12 +# v4.0.13 -- Add PHP check on installation. -- Add Database check on installation. +- Add back to Bible button to Open AI page. -# v3.0.9 +# v3.1.1 -- Add PHP check on installation. -- Add Database check on installation. \ No newline at end of file +- Add back to Bible button to Open AI page. \ No newline at end of file diff --git a/GetbibleInstallerScript.php b/GetbibleInstallerScript.php index 868ec74..a5847cd 100644 --- a/GetbibleInstallerScript.php +++ b/GetbibleInstallerScript.php @@ -795,7 +795,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface echo '
'; +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. diff --git a/site/language/en-GB/en-GB.com_getbible.ini b/site/language/en-GB/en-GB.com_getbible.ini index 947cb4a..3c9d0b4 100644 --- a/site/language/en-GB/en-GB.com_getbible.ini +++ b/site/language/en-GB/en-GB.com_getbible.ini @@ -206,6 +206,7 @@ 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_UPDATED="The note was successfully updated." +COM_GETBIBLE_THE_OPEN_AI_FEATURE_HAS_NOT_BEEN_ACTIVATED_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR_OF_THIS_WEBSITE_TO_RESOLVE_THIS="The Open AI feature has not been activated. Please contact the system administrator of this website to resolve this." 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_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." diff --git a/site/src/Model/AjaxModel.php b/site/src/Model/AjaxModel.php index 993bc12..bda0874 100644 --- a/site/src/Model/AjaxModel.php +++ b/site/src/Model/AjaxModel.php @@ -524,11 +524,15 @@ class AjaxModel extends ListModel { if ($abbreviation === 'all' || $abbreviation === $translation) { - // set the return UR - $return = urlencode(base64_encode((string) Route::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter))); + // set the return URL + $return = ''; + if ($book > 0 && $chapter > 0) + { + $return = '&bibleurl=' . urlencode(base64_encode(trim(Uri::base(), '/') . Route::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter))); + } // we return the AI url - return ['url' => trim(trim(Uri::base(), '/') . Route::_('index.php?option=com_getbible&view=openai&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&bibleurl=' . $return . '&guid=' . $guid . '&book=' . $book . '&chapter=' . $chapter . '&verse=' . $verse . '&words=' . $words))]; + return ['url' => trim(trim(Uri::base(), '/') . Route::_('index.php?option=com_getbible&view=openai&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . $return . '&guid=' . $guid . '&book=' . $book . '&chapter=' . $chapter . '&verse=' . $verse . '&words=' . $words))]; } return ['error' => 'There was an error please try again.']; diff --git a/site/src/View/Openai/HtmlView.php b/site/src/View/Openai/HtmlView.php index d12401d..b074c4a 100644 --- a/site/src/View/Openai/HtmlView.php +++ b/site/src/View/Openai/HtmlView.php @@ -30,6 +30,7 @@ use TrueChristianChurch\Component\Getbible\Site\Helper\HeaderCheck; use TrueChristianChurch\Component\Getbible\Site\Helper\GetbibleHelper; use TrueChristianChurch\Component\Getbible\Site\Helper\RouteHelper; use Joomla\CMS\Session\Session; +use Joomla\CMS\Router\Router; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Helper\ModuleHelper; @@ -70,8 +71,18 @@ class HtmlView extends BaseHtmlView // remove from page (in case debug mode is on) $this->params->set('openai_token', null); $this->params->set('gitea_token', null); - // set meta - $this->setMetaData(); + // set the input object + $this->input = $this->app->input; + // is the area active + if ($this->params->get('enable_open_ai') == 1) + { + // set the page direction globally + $this->getDocument()->setDirection($this->translation->direction); + // set the global language declaration + // $this->getDocument()->setLanguage($this->translation->joomla); (soon ;) + // set meta + $this->setMetaData(); + } // Set the toolbar $this->addToolBar(); diff --git a/site/tmpl/openai/default.php b/site/tmpl/openai/default.php index 62d5c0c..313a835 100644 --- a/site/tmpl/openai/default.php +++ b/site/tmpl/openai/default.php @@ -27,17 +27,23 @@ defined('_JEXEC') or die; ?> -item): ?> - loadTemplate('getbibleai'); ?> - item) > 1) : ?> - loadTemplate('getbibleaifilter'); ?> +params->get('enable_open_ai') == 1): ?> + item): ?> + loadTemplate('getbibleai'); ?> + item) > 1) : ?> + loadTemplate('getbibleaifilter'); ?> + + +