News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

QueenKnitter:BibleGateway

Started by QueenKnitter, April 28, 2007, 04:17:25 PM

Previous topic - Next topic

QueenKnitter

Link to Mod

Adds a Bible Gateway button to the bbcode bar that will link to Bible Gateway for Scripture references in ESV. Many thanks to Karlbenson and his Wikipedia BBCode.

ham1299

OK. So how exactly does this work? I installed it and tested it, but when I click on the link, it doesn't take me to the Scripture - just to Bible Gateway, where I'm told my search results aren't valid! ??? Is there a specific way to enter scripture in order to get the link to work properly?
Heather

tophe

Well.. How does this thing work?
It gives me an idea how to make a good mod, but I can't really use this one.. What does it do and how?

Guiness

The text isn't parsed to the bible= tag which is why the thing doesn't work.
Looks like we have to manually correct the tag by typing text after the bible=
When you click the tag icon on a highlighted text you get

[bible=] text [/bible]


instead of

[bible=text] text [/bible]


eg this code will work and fetch Genesis 1 if you paste it
[bible=Genesis 1]Genesis 1[/bible]


The problem in the mod code is with the &search=$1 in the link, the $1 isn't getting parsed to the link which is why we get empty searches.

array(
'tag' => 'bible',
'type' => 'unparsed_content',
'content' => '<a [b]href="http://www.biblegateway.com/passage/?version=47;&search=$1" [/b]target="_blank" style="border-bottom:1px dashed #FF0000;text-decoration:none">$1</a><sup><span style="font-size:7pt;color:red;">Bible</span></sup>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_content' => '$1',
),


I tried everything to get it to work and no luck, :(

Advertisement: