Download & Extend

More flexible verse formatting

Project:Bible
Version:6.x-1.0-rc5
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

At present, verses have to be listed in the node content in a GEN:1:1 format, which for most people is not the way they would write a verse reference. I'd like to see this module (an excellent one for the Christian community, by the way) function if the verse references were in any of the following formats:

Gen 1:1
Gen. 1:1
Genesis 1:1

There are some others that might be common for some books, like Matt or 1 Cor., etc.

The Scripture Filter ( http://drupal.org/project/scripturefilter ) implements this idea, however I like your module better since it pops up the verse rather than giving an off-site link.

I'm going to try to work on this, but my php skills are limited, especially when it comes to regex. I think it would be a great improvement, but I also realize that part of the problem is the fact that the .bc file itself uses the GEN:1:1 format.

Thanks.

Comments

#1

I was able to come up with a solution for this which I hope will be helpful for someone else. If anyone can improve on the way that I did this, that would be great since, as I said I'm not a PHP genius. I've attached the file, which if nothing else may prompt another user to improve on it.

Thanks again for a great module.

AttachmentSize
bible.zip 10.45 KB

#2

Status:active» fixed

Dear Sir:
Thanks for your code help. I've improve code and release a new version for this function. You can find new release here: http://drupal.org/node/312776
MikeLee

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#4

Status:closed (fixed)» active

Thanks for implementing this. I have just one more request: It's most common to see the book names abbreviated with a period after the abbreviation and a space before the chapter, like "Gen. 1:1" As you have the module currently written, the longer names and different abbreviations get recognized, but the link is still displayed on the page as "Genesis:1:1". I can change this on line 1510 by substituting

$bls = $book. ' '. $chap. ':'. $verse;

in place of

$bls = $book. ':'. $chap. ':'. $verse;

which produces the space between the book name and the chapter number, but I can't figure out how to get the periods after the abbreviated book names. Adding "Gen." to the list of $book_namelist doesn't work and actually causes the module to return N/A for all links.

Thanks.
rww

#5

Status:active» closed (duplicate)

Ill be looking into this myself at some point

#6

Status:closed (duplicate)» postponed
nobody click here