Joomla help

Hi all,

I’m redesigning my church website on DH, using joomla.

I grabbed the bible verse-of-the-day from the joomla site, but it requires url_fopen capabilities, which apparently aren’t allowed here. Does anyone know or have anything similiar that will work on DH? Either a bible verse or proverb of he day…


You need to replace the use of url_fopen with a curl call. Here is the working script using curl. You just need to replace the hard-coded variables with the dynamic assignments from Joomla’s xml config file, which is the commented out part, to use this in Joomla.

defined( ‘_VALID_MOS’ ) or die( ‘Direct Access to this location is not allowed.’ );
$verse = “”;
$Version = $params->get(‘Version’);
$CharLimit = $params->get(‘CharLimit’);
$DisplayAudio = $params->get(‘DisplayAudio’);

$verse = “”;
$Version = 9;
$CharLimit = 1000;
$DisplayAudio = “No”;

$cTargetPage = “".$Version."&jscript=0”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $cTargetPage);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);

$verse = curl_exec($ch);

$verse = str_replace(“—”,"-",$verse);
$verse = str_replace("<a href","<a target="_blank" href",$verse);
$verse = stripslashes(utf8_decode($verse));

if ($DisplayAudio == “No”) {
$verse = str_replace(strstr($verse,’ <’),’’,$verse);
$verse .= “”;
if ($CharLimit !== “None”) {
if (strlen($verse) <= $CharLimit) {
echo $verse;
} else {
$verse = substr($verse, 0, $CharLimit - 10);
$verse .= “… <a href=”.$Version."&jscript=0 target=_blank>[More]";
echo $verse;
} else {
echo $verse;

Thanks. Sorry if I’m being stupid here, but what file is this?
And does this need to be modified?

That’s a rewrite of the qotd php script included in the zip archive you got when you downloaded the qotd extension. I got it, unzipped it, and rewrote the method.

Just find the modules/mod_qotd folder in your Joomla site and ftp up the corrected code.

It works. Awesome. Thanks.