{"id":833,"date":"2004-05-28T17:12:47","date_gmt":"2004-05-29T01:12:47","guid":{"rendered":"http:\/\/glenandpaula.com\/wordpress\/archives\/2004\/05\/28\/scripturizer-in-php\/"},"modified":"2004-05-28T17:12:47","modified_gmt":"2004-05-29T01:12:47","slug":"scripturizer-in-php","status":"publish","type":"post","link":"https:\/\/glenandpaula.com\/wordpress\/archives\/2004\/05\/28\/scripturizer-in-php","title":{"rendered":"Scripturizer in&nbsp;PHP"},"content":{"rendered":"<p>UPDATE 12\/23\/2004: I\u2019ve moved my version of the code to the new <a href=\"http:\/\/www.wp-plugins.org\/\">WP Plugins repository<\/a>, so you can download it at <a href=\"http:\/\/dev.wp-plugins.org\/file\/scripturizer\/trunk\/scripturizer.php\">http:\/\/dev.wp-plugins.org\/file\/scripturizer\/trunk\/scripturizer.php<\/a><\/p>\n<p>UPDATE: plans are afoot to merge the three existing codebases (Dean\u2019s, <a href=\"http:\/\/scott.yang.id.au\/archives\/2004\/05\/31\/scripturizer-for-wordpress\/\">Scott Yang\u2019s<\/a>, and this one) into a single Sourceforge project. (UPDATE 12\/23\/2004: nothing has really come of that\u2013we\u2019re all a little busy and haven\u2019t really worked to make it happen. Oh&nbsp;well\u2026)<\/p>\n<hr>\n<p>Not realizing that <a href=\"http:\/\/www.healyourchurchwebsite.com\/\">Mean Dean<\/a> was <a href=\"http:\/\/www.healyourchurchwebsite.com\/archives\/001271.shtml\">porting Scripturizer to PHP<\/a>, I went ahead and did it so that I could begin using it on this WordPress site. At about the same time <a href=\"http:\/\/scott.yang.id.au\/2004\/05\/scripturizer-for-wordpress\/\">Scott Yang made one<\/a>, so there are two versions out there. Sorry about&nbsp;that.<\/p>\n<p>I originally wasn\u2019t 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 <code>add_action<\/code> was nonobvious (at least when I first did this\u2013I believe the documentation has improved considerably), so I wanted to provide a clear example.<\/p>\n<p>It extends the functionality of the original and also changes the data permanently in the user\u2019s database (as opposed to Scott\u2019s, which filters it on the fly). You can set mine to do that (see the source code), but Scott\u2019s 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.<\/p>\n<p><b>Usage:<\/b> just copy the source code to a file named <i>scripturize.php<\/i> in your <i>wp-content\/plugins<\/i> folder. Go to your administration panel, click on <i>Plugins<\/i>, and activate it. Then just refer to the Bible in your posts. If you don\u2019t want a Bible reference hyperlinked, be sure to enclose it in preformatting tags, like&nbsp;so:&nbsp;<\/p>\n<pre>&lt;pre&gt;John 3:16&lt;\/pre&gt;<\/pre>\n<p><b>Changes from Dean\u2019s original:<\/b> <\/p>\n<ul>\n<li>You can specify a translation you want to link to by putting the standard abbreviation after the reference like so: <a href=\"http:\/\/biblegateway.com\/cgi-bin\/bible?language=english&amp;version=NIV&amp;passage=John+3%3A16\">John 3:16, NIV<\/a> or <a href=\"http:\/\/www.bible.org\/cgi-bin\/netbible.pl?header=on&amp;book=2co&amp;chapter=5&amp;verse=20\">2 Cor 5:20 (NET)<\/a>. This one is huge, for&nbsp;me.<\/li>\n<li>Added <a href=\"http:\/\/www.bible.org\/netbible\/index.htm\">New English Translation<\/a>. I like this translation for several reasons, but mostly for <a href=\"http:\/\/www.bible.org\/docs\/about\/netbible.htm\">its philosophical underpinnings<\/a>.<\/li>\n<li>Made syntax a little more permissive. For instance, you can now specify a reference by saying <a href=\"http:\/\/biblegateway.com\/cgi-bin\/bible?language=english&amp;version=NIV&amp;passage=Gen.+12%3A1\">Gen. 12:1<\/a> or <a href=\"http:\/\/biblegateway.com\/cgi-bin\/bible?language=english&amp;version=NIV&amp;passage=Gen+12%3A1\">Gen 12:1<\/a> (period\/no period).<\/li>\n<li>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).<\/li>\n<li>The regular expressions handle linking a little bit differently. It does something more useful when confronted with a crazy reference like <a href=\"http:\/\/biblegateway.com\/cgi-bin\/bible?language=english&amp;version=NIV&amp;passage=Rom+1%3A3\">Rom 1:3, 5\u20138, 10,12<\/a> that the online Bibles don\u2019t know what to do&nbsp;with.<\/li>\n<li>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&nbsp;that.<\/li>\n<li>You can now specify a default translation. It is initially set to the NIV, because I assume that\u2019s what most people will&nbsp;want.<\/li>\n<\/ul>\n<p><b>Please Report Bugs In Bug Tracker<\/b><br>\nI\u2019d really like to know if you catch any bugs. I use this plugin myself, so bugs directly affect me!&nbsp;\ud83d\ude42<\/p>\n<p>There is a bug tracker set up at <a href=\"http:\/\/dev.wp-plugins.org\/newticket\">http:\/\/dev.wp-plugins.org\/newticket<\/a>, so please report any problems there.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE 12\/23\/2004: I\u2019ve 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\u2019s, Scott Yang\u2019s, and this one) into a single Sourceforge project. (UPDATE 12\/23\/2004: nothing has really come of that\u2013we\u2019re all a little busy \u2026 <a href=\"https:\/\/glenandpaula.com\/wordpress\/archives\/2004\/05\/28\/scripturizer-in-php\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> \u201cScripturizer in&nbsp;PHP\u201d<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[17],"tags":[],"class_list":["post-833","post","type-post","status-publish","format-standard","hentry","category-geek"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6Ded-dr","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/posts\/833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/comments?post=833"}],"version-history":[{"count":0,"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/posts\/833\/revisions"}],"wp:attachment":[{"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/media?parent=833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/categories?post=833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glenandpaula.com\/wordpress\/wp-json\/wp\/v2\/tags?post=833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}