Group Admins

  • Avatar Image

Site Help

Public Group active 6 days, 13 hours ago

For support using Biblefox.com

Parsing Verses (2 posts)

← Group Forum   Group Forum Directory
  • Avatar Image Andrew Tegenkamp said 1 year ago:

    Our site is going great with Biblefox but our minister prefers to do verses as “Psalm 67.4″ instead of “Psalm 67:4” so I was wondering if there was a way to change Biblefox’s parsing for this? I am guessing it is in parser.php and will happily play around in there if you nobody knows this off hand and share my results, but thought I’d ask first just in case it’s an easy switch somewhere!

  • Avatar Image Richard Venable said 1 year ago:

    Yeah, this is something I plan to support soon.

    I think you can get it working real quick by making the following changes to parser.php:

    In function regex():

    Update the regex strings for detecting the references:


    if ($this->forward) $this->_regex = "/\b($book_regex)\b(\.?\s$space_star\d([\s-:,;]*\d)*)$cv_question/i";
    else $this->_regex = "/((\d[\s-:,;]*)*\d\s$space_star\.?)$cv_question\b($book_regex)\b/i";

    To include \. in the [\s-:,;] part:


    if ($this->forward) $this->_regex = "/\b($book_regex)\b(\.?\s$space_star\d([\s-:,;\.]*\d)*)$cv_question/i";
    else $this->_regex = "/((\d[\s-:,;\.]*)*\d\s$space_star\.?)$cv_question\b($book_regex)\b/i";

    And update function parse_book_str():

    At the beginning, replace all occurrences of ‘.’ with ‘:’, like so:


    $str = str_replace('.', ':', $str);

    I haven’t tested it, but those changes should work.