BibleGateway
Questions answered by this recipe
- How can I have Bible references (i.e., Genesis 1:1, John 3:16) on my page automatically link to the verse text?
- How can I easily display a Verse of the Day on my site?
- How can I provide the capability to search the Bible from within my site (NOTE: the form as provided takes you to BibleGateway)
Description
Provide Bible search, reference replacement, verse of the day capabilities.
Installation
- Download BibleGateway.phpΔ and put it in your
cookbook/
folder - Edit your
local/farmconfig.php
orlocal/config.php
to insert a line like this:
include_once("$FarmD/cookbook/BibleGateway.php");
Internationalization
https://www.BibleGateway.com provides versions of the Bible in almost every conceivable language. Simply specify the version appropriately or search for a word in the language you are interested in.
Usage
Search
(:biblesearch [title="X"] [buttontext="Y"] [logo=0]:)
This will present a form allowing you to search in BibleGateway.
Options:
- The default title (X) is "Lookup a word or passage in the Bible". You can change it by specifying a different X.
- The default text for the search button (Y) is "Search BibleGateway.com". You can change it by specifying a different Y.
- By default the logo for BibleGateway.com shows - you can turn it off by saying logo=0
Examples:
This markup (below) will provide the default search form with a title of "Lookup a word or passage in the Bible" and the search button will be labeled "Search BibleGateway.com" and it will show the logo:
(:biblesearch:)
This markup (below) will provide a search form with all options modified:
(:biblesearch title="Search the Bible" buttontext="Search" logo=0:)
Reference Replacement
(:bibleref [version="X"] [showTooltips=false] [clickTooltip=true]:)
This will automatically replace all Bible references with a link (optionally [but by default] including a tooltip of the verse text itself).
- The default version (X) is "NIV"
- By default tooltips are shown. You can turn this off by including
showTooltips=false
(note the plural) - By default hovering over a reference causes the tooltip to be shown. You can change this to require a click by including the option
clickTooltip=true
(note the singular)
Editors note: My apologies for the inconsistent singular/plural in the options above - I'm just following what BibleGateway.com has for standardization
Verse of the Day
(:bibleVOTD [version="X"]:)
This will get a verse of the day from BibleGateway and display it in place of the markup.
- The default version (X) is "NIV"
Notes
See https://www.biblegateway.com/usage/ for details on how BibleGateway.com is called
Change log / Release notes
2021-08-21 - Initial release with 3 functional markups: biblesearch, bibleref, and biblevotd
See also
Contributors
- Peter Bowers
Comments
See discussion at BibleGateway-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.