Chris_D
08-29-2005, 04:39 PM
https://vborg.vbsupport.ru/showthread.php?t=83081
Hi there, above is the Usergroup Specific Ads hack. I'm trying to get it to work with phpAdsNew so not only can I make sure that my paying users don't get ads, but also so those that don't pay get served the correct ad via phpAdsNew.
I have to display the phpAdsNew code which is the following:<?php
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>Unfortunately if you put this into the globaladverts template then you get the following error message:The following error occurred when attempting to evaluate this template:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/website/public_html/website/forums/includes/adminfunctions_template.php(3504) : eval()'d code on line 5
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.According to hellsatan, the developer, this is because I can't have any PHP code in the template. Is there any other ways of doing it? He suggested something that didn't work, and haven't heard back from him since. Does anyone else have a solution?
Hi there, above is the Usergroup Specific Ads hack. I'm trying to get it to work with phpAdsNew so not only can I make sure that my paying users don't get ads, but also so those that don't pay get served the correct ad via phpAdsNew.
I have to display the phpAdsNew code which is the following:<?php
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>Unfortunately if you put this into the globaladverts template then you get the following error message:The following error occurred when attempting to evaluate this template:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/website/public_html/website/forums/includes/adminfunctions_template.php(3504) : eval()'d code on line 5
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.According to hellsatan, the developer, this is because I can't have any PHP code in the template. Is there any other ways of doing it? He suggested something that didn't work, and haven't heard back from him since. Does anyone else have a solution?