I found Scripturizer after I wrote this, and frankly I think this version is more slick.
Allows you to show bible verses on your web page from http://www.esvapi.org/ by feeding in the verse information.
Place any number of verses in the ‘verses’ variable, with each verse separated by a semicolon. See the example below for formatting. Be sure to go to http://www.esvapi.org to register for an API key, which you will need to supply in the key parameter.
{exp:wi_bible_text verses="Exodus 3:1; Romans 12:9-21; Psalm 100; Matthew 25:31-46" key="my_api_key"}
Or, even better, use a custom field to supply the verse info:
{exp:wi_bible_text verses="{my_custom_field}" key="my_api_key"}
To see this in action, visit any sermon on this site: Bellevue First Congregational Church
Here is a link to the CSS that ESV provides to help format the returned verses nicely. Just add it to your CSS file, and tweak it as you see fit. http://www.gnpcb.org/esv/assets/style/text.css
EE1 and EE2 versions now available at Devot-EE http://devot-ee.com/add-ons/encaf-bible-verses/
Obtained an esv key and tested, using exact same syntax as your example, but with my key.
Receive ‘following tag has syntax error’ for the bible text tag. To confirm, tested plugin in a clean EE install with no extra modules, extensions or plugins: received same error message.
Any clues?
Hi russlipton-
I can’t say I’ve seen that error - it is generated from ESV, not the plugin. Have you tried some other test verses? That example, by the way, I patched together from several real sermons being used on the site- so theoretically there could be a syntax error but it looks fine to me.
This API page may have some info about errors- http://www.esvapi.org/api let me know if you find anything I can take a look at the plugin again.
I’m stumped - still retrieving the syntax error message.
I can retrieve verses with my key using a hard-coded query:
I fooled around a bit with your code, but it’s pretty straightforward and I can’t find a problem so far. No zen moments with the API doc either. It’s a shame. I can make this work functionally without your plugin, but that’s no fun.
Hey Russ - turns out this was a stupid mistake on my part- I renamed the plugin to release it publicly but did not update the instructions. The plugin call should be
{exp:wi_bible_text verses="{my_custom_field}" key="my_api_key"}
Let me know if that works. I’ll update the plugin. Sorry for the delay.
Chad, thanks for this plugin. I must have missed it when it was released.
I’ve been using CURL to grab the ESV for a while, but hadn’t thought of putting it into a plugin. I’ve just replaced my PHP chunk with your plugin.
e.g. http://www.toongabbieanglican.org.au/bibletalks/snc/a-good-god-in-a-cruel-world/
Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.