Bible Field Drupal Module Quickstart Guide

This is a quick guide to getting started with the Bible Field Drupal module.

Adding the field to your content type

Click the "Manage Fields" link next to your content type in /admin/content/types and scroll down to the bottom. Select the "Bible reference" type and fill in the rest of the form.

Next, choose your settings. There are two settings specific to Bible Field, the Version and the alphabetical sorting. If set to sort alphabetically, any book fields will be sorted from 1-9 and A-Z, otherwise the sorting will follow the default, which is likely the real order.

The version allows you to select from multiple Bible versions. As an example of using a different source file, I've added a file called hitchhikers_guide_to_the_galaxy.txt in the optional_csv folder to demonstrate how Bible Field can be used for any book reference. If you drag this file over to the bible_csv folder, you'll be able to choose from the default King James Bible or the Hitchhiker's Guide to the Galaxy.

Using the field

Now that you've added the field, you can add references in your nodes. Go to the node add page for the content type you added the field to, and you should see the following:

Here you can select as many references as you need to. When you select a book, the chapter input will automatically be populated with the number of chapters in that book. Choose a starting chapter will automatically set the ending chapter to the same number.

Setting up filters in Views

Once you have content with references, you can set up a View. You can use the book, starting chapter, ending chapter, starting verse and ending verse fields, but there are two special filters as well.

The first is a range selector, to allow searching through a range of chapters and verses.

First, click the plus button next to the Filters section of the view to add a new filter, and select the Content category. Scroll down until you see the following, check the 'Ending chapter' or 'Starting chapter' and click the Add button.

Now you'll see the settings form for the filter. The special one available here is called "Within start and end range, as you see below:

If you select that, and expose the filter, you'll see a select input with a list of chapters. To make this most useful, also add a filter for the book as well and expose it. The resulting form might look something like this when you preview it in Views:

If you do this, the chapter select input should auto-fill with the number of chapters in the selected book. So if someone is doing a search for Genesis, chapter 5, and a piece of content matches a range of Genesis chapters 3-10, it will match.

The second special filter is simple and granular. Add a new filter, select to show only Content filters, and select the "Bible field composite" item, as seen below:

This will open up an options form to allow you to select the granularity of the input. You can choose to display just the book, the book and chapter, or the book, chapter and verse inputs, as you see below:

This filter works only as an exposed filter, so make sure to expose it. When you do, it should look something like this if you selected 'verse' for the granularity:

That's it, enjoy!

Add New field Bible reference Label feld bible reference Field name (a-z, 0-9, Bible reference Type of data to store. Default bible field i-H Form element to edit the data. [ Default bible field NF. to lame (a-z, of field. reference reference ERE CARLI 'it ale tie 'it bier ve Tv- Fo-i El m n to El to tt el These settings apply to the Bible reference field in every content type in which it appears. Required Number of values: Unlimited hrj Maximum number of values users can enter for this field. 'Unlimited' will provide an 'Add more' L-jttsr the users can add as many values as they like. Warning! Changing this setting afterBta has been created could result in the loss of data! Bible version: King James Sort books alphabetically Global settings In to of can :or will an nore" butto AN AS the after values of tl- l'sx after /jia ll 11 CH It SNP ch Jl--. BE JA Ja ted L-i Bible reference: Book Hfrj from Chapter Verse frfrj to Chapter h»j Verse l-frj Book hfrj from Chapter I4j Verse to Chapter Verse hrj (Add another item IF to TA 3cok to Clo- 3cok i'OT ...er A=d i:er Defaults: Add filters Groups: Content Delta Appears in: rest content type Content: Bible reference (field_bible_reference) Book Content: Bible reference (field_bible_reference) Ending chapter Content: Bible reference (field_bible_reference) Ending verse lQ Content: Bible reference (field_bible_reference) Starting chapter LJ Content: Bible reference (field_bible_reference) Starting verse Bible reference Appears in: Video Content: Bible reference (field_bible_reference) delta Delta Appears in: Video Content: Child Care (field_child_care) Text Appears In: Group fr (Add) (Cancel) Delta in: [field bible reference) (field bib refers ice CHAPTER ble [Held BIB refere ice ble [Held BIB refere ice ble [field bib refere ice [field bible reference) In: (field child care) in: GROUND bible_reference) If eld bib ble If eld bib ble If eld bib ble If eld bib (field_criilrJ_care) PEA pea le- Sib Deo -lie ence quo THI Co rar Co Defaults: Configure filter Content: Bible reference (field_bible_reference) Ending chapter This item is currently not exposed. If you expose it, users fiII be able to change the filter as they view it. Expose") Operator: Ise qual Is less than Is less than or equal to Is equal to Is not equal to Is greater than or equal to Is greater than Is between Is not between Is empty (NULL) Is not empty (NOT NULL) Within start and end ra Value: (field bible reference) ■vi BE TO IF or or la- lot IS IS IOC npcy NOT is npcy ERA bet. cha- GE IFyo. Live preview Display: Arguments: Defaults (preview) Automatic live preview Separate arguments with as though they were URL PATH Book Chapter App ly LevWcus <Any> AS Chapter Leviticu lVli.1i UI we-e a URL pa:i u-l- viticjs Arv> LE Oe Defaults: Configure extra settings for filter Content: Bible field composite (field_bible_reference) Granularity: Book Chapter Verse If you select "Book", only the book input will display Fo "Chapter", BOTH the book and chapter inputs will display, and so on. (update) (Cancel (field bible reference) If you will moo settings LIAM TH oo;kard Fo di. 05. IF BOOK II Cfl I' II csi Upcate DTP Defaults: Add filters Groups: Confer: Content: Bible field composite (field_bible_reference) ntent: ite [feld bib eferen FIE CO VIDEO OS ice) ite bib Co ble fie comoos SIB 3ibe dec TO vsr Book: Chapter: Verse: CApplyJ Exodus Ht Verse: EX"dL 1*3-.,,'!.. Jl ,


Comments

Does this module only work to search and filter Bible text? OR can it be used to tag sermons, articles, Bible studies, etc... with passages and verses?

For example, if someone posted a Bible study on Romans 1:16, it would be great if this could be used so that the user could tag it using this module so that if/when users are searching for a Bible study in the range of Romans 1, it comes up.

Even if not, this is a great module. Thank you!

It works just the way you described, to mark a piece of content (like a Bible study) as referencing a particular section of the Bible. Then, you can set up filters in Views to allow people to search for content that has that reference. They can search granularly, so they can search for Romans, or they can search for Romans Chapter 16. They can even pinpoint a verse, or a range.

The module doesn't work with Bible text at all, just adds references.

This is perfect! Not that I don't want it to work with the Bible text, but it is priceless as a means to tag and search tagged content.

Thank you so much! I've been thinking about a project that would rely on this functionality, but was expecting to encounter problems with this issue. You're a lifesaver.

Excellent, let me know how the project goes. If you post it publicly, let me know and I'll point people to it on the module project page so they can see a working example.

I definitely will. Though I was stalling a little, mostly because of the issue you just helped me to resolve : )

First off, thank you for developing this module. I like it and it is a big help.

I did notice three problems, as I have been trying to use this module.

#1, I noticed that when selecting the book and using the chapter drop-down, it displays one less chapter than it should. Genesis has 50 chapters; it displays 49. To correct this, I had to add 1 chapter number to each in the bible_csv file. So, the first line of king_james.txt needed to be changed from Genesis,50 to Genesis,51.

#2, and more serious is that I am able to "Add another item" but not delete it! This means that if I change my mind, I cannot save the page. It does not allow me to. If I hit the back button, then I can save. This is not intuitive.

#3, it appears that whether your module is set to required or not, if I do not fill it out, I cannot save the page. And what is really bad is that if I have filled it out and open the page for editing, another item is added and if I don't fill that out, I cannot save my edits!

...So, I know that your module is in beta stages and this means that bugs still need to be worked out. Even at this point, I find your module very useful though. So, I hope that you will fix these issues/bugs and I look forward to future enhancements!

I thought about adding these issues over on Drupal.org, but I decided to leave a comment here instead. :-) However, if you want me to make tickets over on Drupal.org, I can try to do that.

Thanks for posting these, as well as posting them in the issue queue. I'll let you know when I have a chance to look through them. I'm also interested in how you're applying the module.

Cheers!
Chris

Chris,
Thanks for your response! I am eagerly waiting for the fixes because I am contemplating whether or not I will need to temporarily deactivate your module while I go ahead and do multiple editing on many-many pages. I am also wondering what the affect will be. I imagine the data will stay in place in the database, even after deactivating the module, yes? ...Let me know what your ETA is on the fixes, if possible. Thanks for continuing to work on the module! ...I am not using the module on a site for a King James, by the way. I just used it as an example because that is your example CSV. I didn't even test how your KJV CSV would work, all that much. ...I am using your module on a Russian/Ukrainian site. We'll see how it goes. It's rather time consuming, but I am driven to do it for the result! :-)

I'm not sure if the data will stay in the database if the module is disabled, I would do a test run first. It's CCK based, so it depends on how CCK deals with data in columns that no longer have associated modules, which I'm not sure about. If you do run a test, post back here to let me know.

Because of some time constraints, I may not be able to get to these soon unless the client that sponsored the development runs into these issues too and wants them fixed. It would be awesome to see how it works on your site, but understand if it's not workable as-is.

Cheers, and good luck!

That's not good news for me. I was hoping you would support your own module. I thought that's what Drupal was about. There's plenty of developers supporting their own modules, regardless of their customers paying for more work. I found problems in the use of your module. Wouldn't the fixes benefit your customer anyway? They'd be happy for the increased functionality? You'd get more business from them, because they feel good about more progress? ...I really doubt your customer doesn't experience problems with the module, like I have. Maybe they don't want to pay you any more money? I wonder why? Maybe you're wanting too much? I could think of lots of reasons. ...Rather disappointing.

And by the way, your spam protection (that displays the "We KNOW you can't be THAT fast." message) is very annoying and doesn't work properly. You should get rid of it. Here I spent at least a couple minutes typing my message, I unchecked "Notify me when new comments are posted," hit the save button and I get that message. Not very user friendly...

I would also say, judging by the lack of knowledge of your own module - and how it would work in Drupal - makes me suspect you didn't develop the module yourself? Maybe you paid someone to make it for you, in turn for your customer? Maybe that's why you can't support the module any further? Lots of guesses.

Mr. Anonymous,

Perhaps it's the language gap, but your posts are coming across pretty harsh. Or, maybe you're just figuring out how parts of the Drupal space actually works and you're frustrated by it. That's understandable - it's tough realizing that Drupal isn't actually run by a team of tireless developers with infinite patience and no bills to pay - and I don't mind bearing the brunt of your frustration if I can help you and other folks in your shoes come to terms with a more accurate perspective.

From a user's point of view, in the ideal world every developer would have the time and desire to regularly pummel their issue queues into submission (like some people). In the developer's world, things look a little different. Most of us have enough going on that we have to prioritize what gets done, and that depends on a huge number of factors, including but not limited to:

* Can the module / community work be integrated into client work? (i.e. killing two birds with one stone)
* What kind of time is there beyond client work (i.e. bill-paying work) is there to work on other projects?
* Out of the numerous projects that you have on your plate, which ones are the most important strategically in getting you closer to your longer-term goals?
* How many people will be affected by your work?
* Who are the people will be affected by your work?
* How educational or exciting is the work going to be?

I may be speaking just for myself, but I'm not positively influenced by how upset a single community user gets about poor support. That sort of reaction means that the user probably has some other pressures in their life impacting their overall happiness and they aren't going to get an awful lot happier through you responding to their demands. So posts like yours above beget the opposite reaction to what you were probably hoping for. I'm actually less enthusiastic about tackling the issues you mentioned, not out of spite, but just because I can't help but get a little bummed out.

Each module on Drupal.org has a backstory, and some of those stories involve a developer who actually is tireless and is doing this work only because of a pure desire to make Drupal better and push their own skills, and it's this focus that allows them to put a strong focus on supporting the module, regardless of who asks or what they're getting paid.

There are other situations where a developer creates a module because they are asked to do so for a client - as with this particular module. What I was actually asked for was a particular feature, and upon my suggestion the client generously agreed to sponsor the extra time that would be required to make the feature modular and share it on Drupal.org - i.e. they understood the value of sharing. I wouldn't have built this module without the financial support because I don't have enough use cases to justify the time required. So my motives are around making the client happy while sharing as much of the work as I can with others.

Now here's the next part of the equation, which is where you come in. You found a good use case for the module - which is great, but doesn't mean that it changes how or when I can work on it. Because the code is open source and free to use, however, you now have the ability to actually go in and fix those problems you've found, or find someone who has the skill set to do so. You're free! You're not beholden to my currently limited ability to offer support, you can actually take action and get something done. And I'd say that in contrast to what you suggested Drupal was all about, that this is a lot closer. It's people doing what they can, when they can, as they need to, and sharing it all.

Good luck!
Chris

Chris, I am sorry I bummed you out! Really, dude! But, you couldn't have been more bummed out than I, when I realized - after many days and hours of use of your module on my site and many days of waiting for solutions to come from you, even after I posted tickets - that #1, you're not capable of actually supporting your own module and #2, you really don't even understand how your module works and how it would react on a drupal site, given certain circumstances! What a crock of an answer you gave me! You're a fake!

Well said, funny I was just thinking I should look into what his would take to see if I am capable of submitting a patch but thought I'd research it a bit more first. Sounds like you're open to them and this module provides a unique and elegant solution to a problem I've struggled implementing with previous tools.

Thanks for encouraging your client to give back!

Lol, obviously Ukr is not using this for a Christians site! What's with the attitude!

Great module Chris, please don't get discouraged by people like Ukr. I'm sure the silent majority are behind you 100%!

I'm trying to revamp my church's website and being able to filter the sermon message by bible books will be a great benefit to the visitors! The inspiration came from

http://www.desiringgod.org/resource-library/sermons/by-scripture

They way they setup their resource section is awesome!

Hello Chris, First thank you for this module. Second, don't let Anonymous get you down. You're right on target. This is open source , shared code, for "free", not like a pay for product with a service level agreement contract guarantee. Anonymous is basically complaining that something freely given is not perfect, like a free car is getting 20 miles per gallon and not 50 miles per gallon.

Anonymous, move on ... find another product that does what you need, write your own OR fix the problems you are finding and submit the patches to Chris so he can add your work to the project and we all will be benefited.

Hey Chris,
Great module so far. I'm using it as I'm rebuilding my church's sermon database. One issue I'm having, which I'm hoping you could shed some light on, is that the reference input is not showing up correctly on my node add page. When I look at your third screenshot above, your fields are in a nice line with the label above them...mine however, can't get the label to show up and the fields all have a line break in between them...any ideas why this could be happening?

To Chris, I think what you have done is great and possibly what I need. (haven't started to implement it yet). I am taking the time to thank you because after the previous exchanges on here I feel you need another voice on here, someone to say, your points were well argued, and you deserve more thanks and respect than you were getting.

To Ukr-Anonymous, on the slim chance you come back and read this. Chill out. Drupal is about people donating parts to make the whole better. This developer took something they were paid to do, and did something they didn't have to, contributed it so that people like you and I would have it FREE. As in, we didn't have to pay either in time or money to get as far as this developer did. Even if it wasn't exactly what _you_ wanted, I'm sure it was much more valuable, or at least could be, than starting from scratch. I have used many modules for free to do things I couldn't have even imagined would have been possible. And every once in a while I need to jump into the code and try to mess with it to make it do exactly what I want. And I really don't have a firm enough grasp of module development to even get a 'hello world' module working. But I know that I'm getting a heck of a lot for free, so I am thankful.

You just spit in the face of someone who tried to hand you something free, and acted like you ordered it and he didn't deliver. With that attitude your going to have a hard time with Drupal.

Chris, again, I'm thankful for your contribution, because I know if something doesn't work the way I want it to I have the freedom to modify it, or remove it. And it cost me nothing but a little time and could be a huge short cut.

The scariest part of this to me is that we're talking about a Bible related module, and there was more hate and entitlement in that comment than a Christian should have. (not that anyone here has identified themselves as Christian) I hope my comment can repair reader's views that there are Christian Drupal users/developers that know how to act in a open-source environment.

Most likely, Chris paid someone else to write this and can't get someone to follow-up and fix issues in a timely fashion. Don't give me this load of hooey.

He's taken patches of mine and re-written them to better fit his needs. There is plenty of evidence that he is capable of doing this on his own without paying someone else. He does drupal training, which means he's in front of people with this knowledge and can't fake that. There is no need to accuse him of such things. It is purely speculation and not easily supported.

Cheers, Josiah! I kind of left that last comment hanging because I thought it was a little funny. ;) Have a good one.

Chris,

I found your module by looking around on the Bible module project page. The idea behind yours seems to really fit the main thing of what I want to do - still would need the Bible module for having the daily verse show up, I suppose, and that sort of thing, but this would give a much better method for allowing folks to search for sermons and Bible studies by Bible passage. I've yet to try the module, but I plan on trying tonight or very soon.

Thanks for putting this together, and keep up the good work (from what I'm reading so far).

Well, I tried the module, and it looks good so far. One problem I'm having so far, though is if I try to edit a content item (Drupal 7), where I've already added a verse previously, it shows another new verse entry, and won't let me save the item without adding a new item. That, and there doesn't appear to be a way to delete a previously added item. Seems those items would be fairly important.