{"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 PHP"},"content":{"rendered":"<p>UPDATE 12\/23\/2004: I\u2019ve moved my ver\u00adsion of the code to the new <a href=\"http:\/\/www.wp-plugins.org\/\">WP Plu\u00adg\u00adins repos\u00adi\u00adto\u00adry<\/a>, so you can down\u00adload 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 exist\u00ading code\u00adbas\u00ades (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 sin\u00adgle Source\u00adforge project. (UPDATE 12\/23\/2004: noth\u00ading has real\u00adly come of that\u2013we\u2019re all a lit\u00adtle busy and haven\u2019t real\u00adly worked to make it hap\u00adpen. Oh well\u2026)<\/p>\n<hr>\n<p>Not real\u00adiz\u00ading that <a href=\"http:\/\/www.healyourchurchwebsite.com\/\">Mean Dean<\/a> was <a href=\"http:\/\/www.healyourchurchwebsite.com\/archives\/001271.shtml\">port\u00ading Scrip\u00adtur\u00adiz\u00ader to PHP<\/a>, I went ahead and did it so that I could begin using it on this Word\u00adPress 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 ver\u00adsions out there. Sor\u00adry about that.<\/p>\n<p>I orig\u00adi\u00adnal\u00adly was\u00adn\u2019t going to pack\u00adage it for release, but it turns out that I had to do it to actu\u00adal\u00adly use it on my site :), and so I fig\u00adured I might as well put it in the pub\u00adlic ver\u00adsion to make it easy for any\u00adone else to use. Also, fig\u00adur\u00ading out how to use <code>add_action<\/code> was nonob\u00advi\u00adous (at least when I first did this\u2013I believe the doc\u00adu\u00admen\u00adta\u00adtion has improved con\u00adsid\u00ader\u00adably), so I want\u00aded to pro\u00advide a clear exam\u00adple.<\/p>\n<p>It extends the func\u00adtion\u00adal\u00adi\u00adty of the orig\u00adi\u00adnal and also changes the data per\u00adma\u00adnent\u00adly in the user\u2019s data\u00adbase (as opposed to Scot\u00adt\u2019s, which fil\u00adters it on the fly). You can set mine to do that (see the source code), but Scot\u00adt\u2019s will work that way out of the box. Which you pre\u00adfer is up to you. Mine is more effi\u00adcient, his affects all the archives with\u00adout mak\u00ading you man\u00adu\u00adal\u00adly edit any\u00adthing.<\/p>\n<p><b>Usage:<\/b> just copy the source code to a file named <i>scripturize.php<\/i> in your <i>wp-con\u00adtent\/\u00adplu\u00adg\u00adins<\/i> fold\u00ader. Go to your admin\u00adis\u00adtra\u00adtion pan\u00adel, click on <i>Plu\u00adg\u00adins<\/i>, and acti\u00advate it. Then just refer to the Bible in your posts. If you don\u2019t want a Bible ref\u00ader\u00adence hyper\u00adlinked, be sure to enclose it in pre\u00adfor\u00admat\u00adting tags, like so: <\/p>\n<pre>&lt;pre&gt;John 3:16&lt;\/pre&gt;<\/pre>\n<p><b>Changes from Dean\u2019s orig\u00adi\u00adnal:<\/b> <\/p>\n<ul>\n<li>You can spec\u00adi\u00adfy a trans\u00adla\u00adtion you want to link to by putting the stan\u00addard abbre\u00advi\u00ada\u00adtion after the ref\u00ader\u00adence 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 me.<\/li>\n<li>Added <a href=\"http:\/\/www.bible.org\/netbible\/index.htm\">New Eng\u00adlish Trans\u00adla\u00adtion<\/a>. I like this trans\u00adla\u00adtion for sev\u00ader\u00adal rea\u00adsons, but most\u00adly for <a href=\"http:\/\/www.bible.org\/docs\/about\/netbible.htm\">its philo\u00adsoph\u00adi\u00adcal under\u00adpin\u00adnings<\/a>.<\/li>\n<li>Made syn\u00adtax a lit\u00adtle more per\u00admis\u00adsive. For instance, you can now spec\u00adi\u00adfy a ref\u00ader\u00adence by say\u00ading <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 peri\u00adod).<\/li>\n<li>Made syn\u00adtax a lit\u00adtle less per\u00admis\u00adsive as regards white\u00adspace. Just write things nor\u00admal\u00adly and every\u00adthing will work fine (I changed this to cor\u00adrect some errors I was see\u00ading where\u00adin the link would run into the blank space after the ref\u00ader\u00adence).<\/li>\n<li>The reg\u00adu\u00adlar expres\u00adsions han\u00addle link\u00ading a lit\u00adtle bit dif\u00adfer\u00adent\u00adly. It does some\u00adthing more use\u00adful when con\u00adfront\u00aded with a crazy ref\u00ader\u00adence 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 with.<\/li>\n<li>As I men\u00adtioned, by default it will actu\u00adal\u00adly change your post as stored in your data\u00adbase. For\u00adev\u00ader. Irre\u00adversibly. With no back\u00adup. Just be aware of that.<\/li>\n<li>You can now spec\u00adi\u00adfy a default trans\u00adla\u00adtion. It is ini\u00adtial\u00adly set to the NIV, because I assume that\u2019s what most peo\u00adple will want.<\/li>\n<\/ul>\n<p><b>Please Report Bugs In Bug Track\u00ader<\/b><br>\nI\u2019d real\u00adly like to know if you catch any bugs. I use this plu\u00adg\u00adin myself, so bugs direct\u00adly affect me! \ud83d\ude42<\/p>\n<p>There is a bug track\u00ader set up at <a href=\"http:\/\/dev.wp-plugins.org\/newticket\">http:\/\/dev.wp-plugins.org\/newticket<\/a>, so please report any prob\u00adlems there. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE 12\/23\/2004: I\u2019ve moved my ver\u00adsion of the code to the new WP Plu\u00adg\u00adins repos\u00adi\u00adto\u00adry, so you can down\u00adload it at http:\/\/dev.wp-plugins.org\/file\/scripturizer\/trunk\/scripturizer.php UPDATE: plans are afoot to merge the three exist\u00ading code\u00adbas\u00ades (Dean\u2019s, Scott Yang\u2019s, and this one) into a sin\u00adgle Source\u00adforge project. (UPDATE 12\/23\/2004: noth\u00ading has real\u00adly come of that\u2013we\u2019re all a lit\u00adtle busy \u2026 <a href=\"https:\/\/glenandpaula.com\/wordpress\/archives\/2004\/05\/28\/scripturizer-in-php\" class=\"more-link\">Con\u00adtin\u00adue read\u00ading<span class=\"screen-reader-text\"> \u201cScrip\u00adtur\u00adiz\u00ader in 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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"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}]}}