I tested applying: http://drupal.org/node/274953#comment-5538322
Then added an entry to hopefully pick up the abbreviation for Matthew as follows:
if ($verse) {
$verse = strtok($verse,',& ');
}
// Some descriptors for Bible books may be unknown to the websites providing the text.
// Replace these if necessary. To add such replacements, add new entries to this array
$book_replace = array('Phi' => 'Phil');
$book_replace = array('Matt' => 'Matthew');
if (isset($book_replace[$book])) $book=$book_replace[$book];
switch ($translation) {
case 'ESV':
It did not pick up the (Matt. 12:33) reference on a development version of this production page, which I have altered the production version spelling out Matthew completely so that the mod will pick it up.
http://christians-in-recovery.org/BibleStudies_Hope_NatureAndBasisOfAssu...
Since the Matt. abbreviation did not work, I did not try putting in an entry for the abbreviation for Song of Solomon which was "(Song of Sol. 6:13)". I fully spelled out that one as well on the production site.
Comments
Comment #1
muriqui commentedHmm... Two problems with that approach:
The $book_replace array introduced in #274953: Philippians abbreviation on Bible Gateway handles an abbreviation that is already in the regex, but not recognized by the online Bible (i.e. Bible Gateway doesn't recognize Phi as an abbreviation for Philippians, so $book_replace changes any matches on Phi to Phil before the link is generated). That's not necessary for this issue because all of the supported Bible sites recognize both Matt and Mat as Matthew. So, I think all that's needed is to add Matt to the regex.
The attached patch should fix it for D7... I did D7 first because 274953 has already been applied to the 7.x-1.x branch, and this patch should come after that one. Once that patch is applied to 6.x-1.x, it would be a simple matter to backport this one for D6 as well.
Comment #2
muriqui commentedComment #3
jamesoakleyThat does work. But I've changed it slightly. "|Mat?t|..." is tidier than "|Mat|Matt|...", and is the way the other variable abbreviations are done.
Committed. Thank you.
Comment #4
mdlueck commentedOn the topic of abbreviations, from my OP, may (Song of Sol. 6:13) format be supported as well? Nothing jumped out at me in the $abbrev_regex code as the correct way to handle a book name consisting of several space deliminated words. I have seen that apprev for the book other places than just our website.
Comment #5
jamesoakleyComment #6
jamesoakleyThese patches won't apply unless you download a -dev release that includes the Commit labelled "Strip trailing dots from book names".
First one for Drupal 7, then a back-port to D6.
Comment #7
mdlueck commentedTested on D6 applying the patch to the -dev version. Perfect success. (Song of Sol. 6:13) is a correct / working link. Thank you! :-)
Comment #8
jamesoakleyThanks for testing. That's committed to both branches.