GeekLog allows you to enable an external page, but you need to call a geeklog custom method in your default Zend ./public/index.php.
In the example below, i had to
- Include the geeklog php library in the set_include_path()
- Call the EXP_externalAccess() method before calling the Zend app.
The full code for the '/public/index.php' is
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
realpath(APPLICATION_PATH),
'/home/bhaa1/public_html/lib-common.php',
get_include_path()
)));
/** Zend_Application */
require_once '/home/bhaa1/public_html/lib-common.php';
$page_name = substr($_SERVER['SCRIPT_NAME'], 1);
if (!EXP_externalAccess($page_name)) {
$display = COM_siteHeader('menu');
$display .= COM_startBlock($LANG_EX00['access_denied']);
$display .= '<div align="center"><b>' .
$LANG_EX00['access_msg'] .
'</b></div>';
$display .= COM_endBlock();
$display .= COM_siteFooter(yes);
echo $display;
exit;
}
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/dashboard.ini'
);
$application->bootstrap()->run();
?>
This ensures the page will only be called when a user has correct permissions.
The final step is to update my layout.phtml to have the geek-log 'menu' and 'footer' wrapping the html rendered by the zend app.
<?php echo COM_siteHeader('menu');?>
// .. ZEND LAYOUT STUFF
<?php echo COM_siteHeader('end');?>