Welcome, Guest
Username Password: Remember me

Bible text in pdf
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Bible text in pdf

Bible text in pdf 26 Apr 2011 07:32 #2525

Hi,

I have just updated our website to JBS6.2.4 from 6.011a and the Scripture text nolonger shows in the PDF file that opens when you click the PDF icon. I cannot seem to find where to enable that, or has it been removed?

Thank
Andrew

Re: Bible text in pdf 26 Apr 2011 23:58 #2527

  • Tom
  • OFFLINE
  • Moderator
  • Posts: 316
Hi Andrew,

That functionality should be there. Click on the pdf link from this page:

www.calvarychapelnewberg.org/bible-studies/studydetails/763/1

I see the Scripture show up - and it is in the code. I don't even think its an option - check again to make sure you have entered something in the study record for the Scripture.

Tom

Re: Bible text in pdf 27 Apr 2011 00:35 #2528

Hi Tom,

Thanks for the reply.

I don't get the text in the pdf on the new install (6.2.4) located on my testbed, asbc.thegees.info/resources/sermons.html but I do get it in the live version (6.011a) www.alicebaptist.org/resources/sermons.html.

You won't see it work on the live server now as I just updated it and got the same affect, no scripture in the PDF.

What file generates the Bible text, perhaps I can go digging?

Regards
Andrew
Last Edit: 27 Apr 2011 08:13 by Andrew Gee.

Re: Bible text in pdf 27 Apr 2011 14:27 #2531

  • Tom
  • OFFLINE
  • Moderator
  • Posts: 316
So what seems to be missing is the pdf button on the studydetails page.

I made this link: asbc.thegees.info/resources/sermons.html...uid=1&format=pdf

and the resulting pdf page does show the Scripture.

You turn the pdf link off and on in the Template Display Settings under Study Details view.

If you want to dig - look at /views/studydetails/view.pdf.html and in that same folder the /tmpl/view_main.html

Tom

Re: Bible text in pdf 28 Apr 2011 01:47 #2535

The PDF's were there but I removed them in the template because they only had the heading information. The Scripture did not show up. I did that after my last post...sorry for not lettin gyou look first.

I just clicked on the link you made and I get the same result a PDF with the header deatils (Title etc) but a blank contents. I am getting this on four different computer (2 pcs and 2macs) at different locations.

I will take alook through the code and see if I can figure out what is happenning.

Andrew

27 Apr 2011 20:06 #2537

  • Tom
  • OFFLINE
  • Moderator
  • Posts: 316
Now I see what you mean - it's not the Scripture reference but the passage itself that is missing. So the key will be in the /views/studydetails/view.pdf.html.

Here is the code in question:

 
//code added to provide Scripture reference at bottom
if ($params->get('show_passage_view') > 0) {
if (isset($scripture1)) {
 
 
$key = "IP";
$passage = urlencode($scripture1);
$options = "include-passage-references=false";
$url = "http://www.esvapi.org/v2/rest/passageQuery?key=$key&passage=$passage&$options";
 
$p = (get_extension_funcs("curl")); // This tests to see if the curl functions are there. It will return false if curl not installed
if ($p) { // If curl is installed then we go on
$ch = curl_init($url); // This will return false if curl is not enabled
if ($ch) { //This will return false if curl is not enabled
 
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
echo '<br /><hr /><br />';
echo "".$scripture1." (ESV)";
print $response;
} // End of if ($ch)
} // End if ($p)
 
}
} // end of if
 


The weird thing is that if it works in the regular view then it should work in the pdf - but perhaps not. Maybe this really is a bug.

Now that I'm looking at the code, it is handled differently in the view. HEre is the same passage view from the /tmpl/default_main.php:

 
switch ($this->params->get('show_passage_view', '0'))
{
case 0:
break;
 
case 1:
?>
<strong><a class="heading" href="javascript:ReverseDisplay('scripture')">>>
<?php echo JText::_('Show/Hide Scripture Passage');?><<</a>
<div id="scripture" style="display:none;"></strong>
<?php
 
$passage_call = JView::loadHelper('passage');
$response = getPassage($params, $row);
echo $response;
echo '</div>';
break;
 
case 2:
echo '<div id="scripture">';
$passage_call = JView::loadHelper('passage');
$response = getPassage($params, $row);
echo $response;
echo '</div>';
break;
}
 


For grins you could try to substitute that code for the code in the pdf view and see what happens. By the way - Joomla 1.6 doesn't support pdf creation natively so we've dropped this view in version 7.0.0 until we can find a better solution.

Tom
  • Page:
  • 1
Moderators: Richard Hunt
Time to create page: 0.98 seconds