Joomla Bible Study

...components for the glory of God
Welcome, Guest
Please Login or Register.    Lost Password?

{Scripture1} confusing output when single verse
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: {Scripture1} confusing output when single verse
#1882
{Scripture1} confusing output when single verse 5 Months, 1 Week ago  
If a study is on a single verse of the bible, eg 1 Peter 1:3, and a start and end scripture reference is filled in for the study, then the output of {Scripture1} (and possibly scripture2) in the study details, study list and series list is confusing.

I would expect the output for a single verse to be:
1 Peter 1:3

and not
1 Peter 1:3-3

which might be take to be chapter one verse three to chapter three.

I guess before returning the string, you could do a check to see... pseudo code:

if (chapter_begin = chapter_end AND verse_begin = verse_end)
Then
(print Bookname + chapter_begin + chapter_end)

...actually - might have just found it in the code.. in site/helpers/scripture.php, somewhere around line 44:

Code:


if ($ch_e == $ch_b && $v_b == $v_e) {
    $b3 = '';
    $ch_e = '';
    $b2a = '';
    $v_e = '';
}



oo - could this be my first dev contribution!?
Richard Hunt
Moderator
Posts: 48
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1883
Re:{Scripture1} confusing output when single verse 5 Months, 1 Week ago  
Did you try it out? I added it to the helper file in the Trunk of the SVN. Do you think it should replace the IF that is there now?

Code:

if ($ch_e == $ch_b) {
$ch_e = '';
$b2a = '';
}



When you get a chance, give me some more next steps on Xamp - where do I extract the backup and access it with Xamp?

Thanks!

Tom
Tom
Administrator
Posts: 855
graph
User Offline Click here to see the profile of this user
"You shall know the truth and the truth shall set you free." JC
The administrator has disabled public write access.
 
#1884
Re:{Scripture1} confusing output when single verse 5 Months, 1 Week ago  
just a quick one for now, but the following two links should help you with joomla pack restores.. use the 'kickstart' method.. _really_ easy! it's great to have this method for when you can't get an internet connection to your server!

joomlapack.net/help-and-support/document...pack-user-guide.html

joomlapack.net/help-and-support/document...-guide/item/682.html
Richard Hunt
Moderator
Posts: 48
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1889
Re:{Scripture1} confusing output when single verse 5 Months, 1 Week ago  
back on the topic of this fix..
i tried it out on my test site and it seemed to work ok.

i don't think it should replace the current IF for same-chapter verse ranges. The following wikipedia page gives as close to a 'standard' as i can see, which gives the example of John 3:16 for a single verse, and John 3:16-17 for multi-verse within a chapter.

http://en.wikipedia.org/wiki/Bible_citation
Richard Hunt
Moderator
Posts: 48
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1892
Re:{Scripture1} confusing output when single verse 5 Months, 1 Week ago  
That's what I figured. It's been added as a condition then along with the original!

Tom
Tom
Administrator
Posts: 855
graph
User Offline Click here to see the profile of this user
"You shall know the truth and the truth shall set you free." JC
The administrator has disabled public write access.
 
Go to topPage: 1