A DokuWiki plugin that recognizes bible verses in prose and converts them to acronyms displaying the verse
Compatible with DokuWiki
Greebo, Hogfather
A DokuWiki plugin that recognizes bible verses in prose and converts them to acronyms displaying the verse
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This plugin recognizes bible verses (Mark 3:1, Amos 1:4-13) in prose and converts them to the equivalent of HTML <acronym>s which display the verse as the hover-text. That way, if a user hovers over “Mark 3:1,” pop-up text allows him to read about when Jesus first met a Dokuwiki developer: “and he entered again into the synagogue, and there was a man there who had a withered hand.”
While the plugin is verbosely commented for easy modification and expanded bible support, version 1.0 supports only the Douay Rhiems (“old” Catholic)1) translation of the bible.
Certainly! Let's make it more personalized and conversational:
Search and install the plugin using the Extension Manager.
Alternatively, refer to Plugins on how to install plugins manually:
…/lib/plugins/
directory and upload to your server.
In the file syntax.php
change the folowing lines:
from
public function render($mode, &$renderer, $data) {
in:
public function render($mode, $renderer, $data) {
from
public function handle($match, $state, $pos, &$handler){
in
public function handle($match, $state, $pos, $handler){
Simply write valid bible verse addresses in the text body of your page:
====== PlayGround ====== \\ As seen in the bible, Mark 3:1 , He tests his wiki code. Not HTML code.\\ Lets try some more: 1 Machabees 1:1, and maybe Amos 2:2 and how about 2 Peter 1:1; Romans 3:3\\ Good? \\ Mark 3:3\\ Mark 1:1\\ Mark 2:22-25\\ Amos 1:1-25\\ Mark 3:1-5 \\ Okay, all is good.
Results in a Rendered Page.jpg where hovering over links look like:
To quote Mark chapter 3, verse one:
Mark 3:1
To quote Mark chapter 3, verse one through 9:
Mark 3:1-9
To quote Second Kings chapter 11 verse 8:
2 Kings 11:8
No custom configurations have been added. But that'd be great. You should add some (bible edition, language?).
syntax.php is the only workhorse file, and is heavily commented for easy modification. It contains all 6 required functions and one custom function of my own at the bottom.
To add new translations of the bible:
Listing a match in the regexp that is an invalid bible verse will cause a warning/error to print out at the top of your page. This is by design, but it might be preferable to just ignore those.
For example:
Genesis 7782:448448