I'm hoping someone can help me.. I'm having trouble displaying Openx Ads in various locations. For example in the header template.
This is the php code that Openx generates:
PHP Code:
//<!--/* OpenX Local Mode Tag v2.8.4 */-->
// The MAX_PATH below should point to the base of your OpenX installation
define('MAX_PATH', 'path/to/openx');
if (@include_once(MAX_PATH . '/www/delivery/alocal.php'))
{
if (!isset($phpAds_context))
{
$phpAds_context = array();
}
$phpAds_raw = view_local('', 1, 0, 0, '_blank', $forumid, '0', $phpAds_context, '');
echo $phpAds_raw[html];
}
This is the code I'm trying to use:
PHP Code:
//<!--/* OpenX Local Mode Tag v2.8.4 */-->
// The MAX_PATH below should point to the base of your OpenX installation
define('MAX_PATH', '/path/to/openx');
if (@include_once(MAX_PATH . '/www/delivery/alocal.php'))
{
ob_start();
if (!isset($phpAds_context))
{
$phpAds_context = array();
}
$phpAds_raw = view_local('', 1, 0, 0, '_blank', $forumid, '0', $phpAds_context, '');
$templater = vB_Template::create('ad_global_header2');
$templater->register('phpAds_raw', $phpAds_raw);
$templatevalues['phpAds_raw'] = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('header', $templatevalues);
}