Scripturizer in PHP

UPDATE 12/23/2004: I’ve moved my ver­sion of the code to the new WP Plu­g­ins repos­i­to­ry, so you can down­load it at http://dev.wp-plugins.org/file/scripturizer/trunk/scripturizer.php

UPDATE: plans are afoot to merge the three exist­ing code­bas­es (Dean’s, Scott Yang’s, and this one) into a sin­gle Source­forge project. (UPDATE 12/23/2004: noth­ing has real­ly come of that–we’re all a lit­tle busy and haven’t real­ly worked to make it hap­pen. Oh well…)


Not real­iz­ing that Mean Dean was port­ing Scrip­tur­iz­er to PHP, I went ahead and did it so that I could begin using it on this Word­Press site. At about the same time Scott Yang made one, so there are two ver­sions out there. Sor­ry about that.

I orig­i­nal­ly was­n’t going to pack­age it for release, but it turns out that I had to do it to actu­al­ly use it on my site :), and so I fig­ured I might as well put it in the pub­lic ver­sion to make it easy for any­one else to use. Also, fig­ur­ing out how to use add_action was nonob­vi­ous (at least when I first did this–I believe the doc­u­men­ta­tion has improved con­sid­er­ably), so I want­ed to pro­vide a clear exam­ple.

It extends the func­tion­al­i­ty of the orig­i­nal and also changes the data per­ma­nent­ly in the user’s data­base (as opposed to Scot­t’s, which fil­ters it on the fly). You can set mine to do that (see the source code), but Scot­t’s will work that way out of the box. Which you pre­fer is up to you. Mine is more effi­cient, his affects all the archives with­out mak­ing you man­u­al­ly edit any­thing.

Usage: just copy the source code to a file named scripturize.php in your wp-con­tent/­plu­g­ins fold­er. Go to your admin­is­tra­tion pan­el, click on Plu­g­ins, and acti­vate it. Then just refer to the Bible in your posts. If you don’t want a Bible ref­er­ence hyper­linked, be sure to enclose it in pre­for­mat­ting tags, like so:

<pre>John 3:16</pre>

Changes from Dean’s orig­i­nal:

  • You can spec­i­fy a trans­la­tion you want to link to by putting the stan­dard abbre­vi­a­tion after the ref­er­ence like so: John 3:16, NIV or 2 Cor 5:20 (NET). This one is huge, for me.
  • Added New Eng­lish Trans­la­tion. I like this trans­la­tion for sev­er­al rea­sons, but most­ly for its philo­soph­i­cal under­pin­nings.
  • Made syn­tax a lit­tle more per­mis­sive. For instance, you can now spec­i­fy a ref­er­ence by say­ing Gen. 12:1 or Gen 12:1 (period/no peri­od).
  • Made syn­tax a lit­tle less per­mis­sive as regards white­space. Just write things nor­mal­ly and every­thing will work fine (I changed this to cor­rect some errors I was see­ing where­in the link would run into the blank space after the ref­er­ence).
  • The reg­u­lar expres­sions han­dle link­ing a lit­tle bit dif­fer­ent­ly. It does some­thing more use­ful when con­front­ed with a crazy ref­er­ence like Rom 1:3, 5–8, 10,12 that the online Bibles don’t know what to do with.
  • As I men­tioned, by default it will actu­al­ly change your post as stored in your data­base. For­ev­er. Irre­versibly. With no back­up. Just be aware of that.
  • You can now spec­i­fy a default trans­la­tion. It is ini­tial­ly set to the NIV, because I assume that’s what most peo­ple will want.

Please Report Bugs In Bug Track­er
I’d real­ly like to know if you catch any bugs. I use this plu­g­in myself, so bugs direct­ly affect me! 🙂

There is a bug track­er set up at http://dev.wp-plugins.org/newticket, so please report any prob­lems there.

transitioning to new content management software

I’m migrat­ing the site from Mov­able Type to Word­Press, so please par­don any tem­po­rary funk­i­ness. I’m also try­ing to refor­mat things to dis­tin­guish use­ful con­tent from fun con­tent using a cool tech­nique I ran across free cha­rade movie down­load .

Puncturing Inflated Grades

I just read a great essay: How to End Grade Infla­tion by Michael Berube (prof at Penn State).

He humor­ous­ly iden­ti­fies the prob­lem: Eng­lish depart­ments have basi­cal­ly worked on the A/B bina­ry sys­tem for some time: A’s and A‑minuses for the best stu­dents, B’s for every­one else and C’s, D’s and F’s for stu­dents who miss half the class­es or threat­en their teach­ers with bod­i­ly harm.

And then pro­pos­es a clever solu­tion: What to do? If we so desired, we could recal­i­brate grades at Penn State, at Prince­ton or at any col­lege in the coun­try. The prin­ci­ple is sim­ple enough, and it’s cru­cial to every div­ing com­pe­ti­tion: we would mere­ly need to account for each course’s degree of dif­fi­cul­ty.

Every pro­fes­sor, and every depart­ment, pro­duces an aver­age grade — an aver­age for the pro­fes­sor over her career and an aver­age for the dis­ci­pline over the decades. And if col­leges real­ly want­ed to clamp down on grade infla­tion, they could whisk it away sta­tis­ti­cal­ly, sim­ply by fac­tor­ing those aver­ages into each stu­den­t’s G.P.A. Imag­ine that G.P.A.‘s were cal­cu­lat­ed on a scale of 10 with the aver­age grade, be it a B‑minus or an A‑minus, count­ed as a 5. The B‑plus in chem­i­cal engi­neer­ing, where the aver­age grade is, say, C‑plus, would be reward­ed accord­ing­ly and assigned a val­ue of 8; the B‑plus in psy­chol­o­gy, where the aver­age grade might be just over B‑plus, would be grad­ed like an easy dive, ade­quate­ly exe­cut­ed, and giv­en a 4.7.

I have to say, I like it. I don’t think any uni­ver­si­ties are going to go for it, but I wish they would…

Changed Message Archive Format

I went nuts today try­ing to fig­ure out a prob­lem with this website–I could­n’t cre­ate an entry with a link to Den­nis’ mes­sage. For some rea­son Mov­able Type (the soft­ware that main­tains this site) would­n’t save any­thing with the link text in it. It drove me up the wall!

Any­way, I wound up recon­fig­ur­ing the entire way that I archive mes­sages on this site before final­ly decid­ing to change the text direct­ly in the data­base.

I men­tion all this to explain why the front page is all links to past messages–a tem­po­rary byprod­uct of the afore­men­tioned recon­fig­u­ra­tion. It will pass as new con­tent is added.

Polyhedral Prophets

Usu­al­ly when Chris­tians talk about role­play­ing games you can expect a lot of heat and very lit­tle light (art­ful­ly mocked by the Dead Alewives’ clas­sic bit Dun­geons and Drag­ons). That’s why I was so thrilled to run across the arti­cle Role­play­ing the Faith which con­tained sev­er­al fas­ci­nat­ing links.

Role­play­ing is a part of geek cul­ture, and Stan­ford is a bit of a geek cam­pus, so I thought these might inter­est some of you: Reli­gion and Role­play­ing, the Chris­t­ian Gamers Guild, and Tra­cy Hick­man’s essay on Ethics in Fan­ta­sy (for the record, Hick­man is a Mor­mon).

Something Completely Unrelated to Dana

I not­ed ear­li­er that one of our our alum­ni was a final­ist in the Miss Sin­ga­pore Uni­verse com­pe­ti­tion.

The finals are Sat­ur­day. Paula and I can’t wait to find out if she’s Miss Sin­ga­pore Uni­verse. Paula was quite close to Ade­line last year, and miss­es her so much she actu­al­ly began cry­ing while look­ing at pho­tos of her online.

Any­way, I stum­bled across the offi­cial page today. She’s the first gal (top left pho­to).

Of course, we already have two Miss Uni­vers­es in our house

Top 100 April Fool&#8217;s Day Hoaxes

In hon­or of today’s very spe­cial nature, I thought I’d men­tion The Top 100 April Fool’s Day Hoax­es down­load sight . There’s some fun­ny stuff there.

Baby Davis Has Arrived!

Glen & Paula had their first child today at 4:03pm. Read more and see pho­tos!

Spring Break Filler

Hope you’re hav­ing a great spring break. Of course, if you are then you’re prob­a­bly not obses­sive­ly check­ing this web­site…

Any­way, Andrew’s off to Rus­sia and Lynet­te’s on her way back from Oxford. Andrew got pick­pock­et­ed in London–I hope he blogs about it.

As you’ve prob­a­bly heard, alum­na Ade­line is a final­ist in the Miss Sin­ga­pore Uni­verse com­pe­ti­tion.

Final­ly, if you haven’t seen the pre­views, there’s a new teen movie com­ing out called Saved that pokes fun at the Chris­t­ian high school scene. Tim Bed­nar has an inter­view with the direc­tor (thanks to Andrew Carea­ga for the lead).