Would someone be so kind and step me through the following piece of code:
Code: Select all
if($easygbConfig_show_homepage && (!empty($row->homepage))) {
$tmpl->setAttribute('show_homepage', 'visibility', 'visible');
$tmpl->addVar('show_homepage', 'HOMEPAGE', (substr($row->homepage, 0, 4) != 'http' ? 'http://' . $row->homepage : $row->homepage));
$tmpl->addVar('show_homepage', 'EASYGB_VISIT_WEBSITE', EASYGB_VISIT_WEBSITE);
}
As I read it, it first checks for an empty entry, then if the entry is NOT empty, sets the 'visibility' attribute and adds a variable and then displays the entry.
This is where I get lost though:
Code: Select all
$tmpl->addVar('show_homepage', 'HOMEPAGE', (substr($row->homepage, 0, 4) != 'http' ? 'http://' . $row->homepage : $row->homepage));
Any help would be greatly appreciated.