I'm providing a patch of the bible module version: bible.module,v 1.4 2007/12/31

I started hacking the bible module with the goal of making it use Drupal's theme functions. As I got deeper into the code I noticed that it lacked the correct db_query statements to protect against SQL injection. I also noticed that it passes the values of the arg method directly into the SQL calls without escaping the contents using something like the check_plain method. So I reworked the code in these areas as well. By the time I was done I had reworked a lot of the code.

Here are some of the changes that I've made:

  1. Wrapped all SQL calls inside Drupal methods
  2. Escaped out URL arguments using check_plain method
  3. Created separate theme methods for displaying various bible views (e.g. Verse, Chapter, Book, Translation List, Bible List, etc.)
  4. Reworked the bible_all method to include more specific views (e.g. Individual Verse).
  5. Wrote several helper methods for grabbing specific content (I'm planning on writing a bible service module, so I figured I'd take the time to write a lot of these methods now).
  6. Replaced Golden Verse block with a random verse block (Doesn't require looking up XML from external Web site)
  7. Created an additional block for displaying the Daily Proverb.
  8. Moved search form into a block that can be added to any page.
  9. Renamed functions to follow Drupal conventions (e.g. Every method starts with "bible", and theme methods start with "theme").
  10. Made an attempt to write comments on all of the methods following Drupal standards (Needs more work).

Here are some things that I still have to work out:

  1. I need to figure out how to add to the page's bread crumbs without adding additional bread crumbs. Right now the standard garland theme shows two bread crumb elements stacked on top of each other.
  2. The search needs work. Right now the search string replaces the found text with the keyword, but this also changes the case. I'm thinking we can probably create a pretty good search by looking more closely at the search module.
  3. Displaying the default translation page takes a while to load. This is probably because I've made links to every chapter of every book. I'm thinking that this page could probably be cached somehow.
  4. I need to figure out how to integrate the strong numbers. But it doesn't look like there's any support for it in the DB, and ideally I'd be happier if the strong numbers were wrapped around the individual words in something like a span. Something like this could be easily manipulated using Jquery.

Thank you for writing the bible module. I think it's a great contribution to the Drupal community. I'd like to join this project. I'm new to contributing, so how would I got about doing that?

CommentFileSizeAuthor
bible.zip7.43 KBstrayhand
bible_clean_expand.patch47.22 KBstrayhand

Comments

Kriss-dupe’s picture

Status: Active » Closed (works as designed)

Been here too long, clearing up for efficiency.