UPDATE 12/23/2004: I’ve moved my version of the code to the new WP Plugins repository, so you can download it at http://dev.wp-plugins.org/file/scripturizer/trunk/scripturizer.php
UPDATE: plans are afoot to merge the three existing codebases (Dean’s, Scott Yang’s, and this one) into a single Sourceforge project. (UPDATE 12/23/2004: nothing has really come of that–we’re all a little busy and haven’t really worked to make it happen. Oh well…)
Not realizing that Mean Dean was porting Scripturizer to PHP, I went ahead and did it so that I could begin using it on this WordPress site. At about the same time Scott Yang made one, so there are two versions out there. Sorry about that.
I originally wasn’t going to package it for release, but it turns out that I had to do it to actually use it on my site :), and so I figured I might as well put it in the public version to make it easy for anyone else to use. Also, figuring out how to use
add_action was nonobvious (at least when I first did this–I believe the documentation has improved considerably), so I wanted to provide a clear example.
It extends the functionality of the original and also changes the data permanently in the user’s database (as opposed to Scott’s, which filters it on the fly). You can set mine to do that (see the source code), but Scott’s will work that way out of the box. Which you prefer is up to you. Mine is more efficient, his affects all the archives without making you manually edit anything.
Usage: just copy the source code to a file named scripturize.php in your wp‐content/plugins folder. Go to your administration panel, click on Plugins, and activate it. Then just refer to the Bible in your posts. If you don’t want a Bible reference hyperlinked, be sure to enclose it in preformatting tags, like so:
Changes from Dean’s original:
- You can specify a translation you want to link to by putting the standard abbreviation after the reference like so: John 3:16, NIV or 2 Cor 5:20 (NET). This one is huge, for me.
- Added New English Translation. I like this translation for several reasons, but mostly for its philosophical underpinnings.
- Made syntax a little more permissive. For instance, you can now specify a reference by saying Gen. 12:1 or Gen 12:1 (period/no period).
- Made syntax a little less permissive as regards whitespace. Just write things normally and everything will work fine (I changed this to correct some errors I was seeing wherein the link would run into the blank space after the reference).
- The regular expressions handle linking a little bit differently. It does something more useful when confronted with a crazy reference like Rom 1:3, 5–8, 10,12 that the online Bibles don’t know what to do with.
- As I mentioned, by default it will actually change your post as stored in your database. Forever. Irreversibly. With no backup. Just be aware of that.
- You can now specify a default translation. It is initially set to the NIV, because I assume that’s what most people will want.
Please Report Bugs In Bug Tracker
I’d really like to know if you catch any bugs. I use this plugin myself, so bugs directly affect me! 🙂
There is a bug tracker set up at http://dev.wp-plugins.org/newticket, so please report any problems there.