1 to 4 of 4
Hi, I've just upgraded to v2.04. demographics is not working (I've set some banners to display only to US and I can see them now living outside US).
As a suggestion, i'd like to see Paypal, Entrecard and future payment options can be set on a per-ad basis, I mean, that site owner caould be able to set which payment processor will accept on each Ad. For instance I don't want to accept Entrecard as a payment option on all my ad zones, just a few of them.
Another suggestion: keep text ads widgetized, they blended OK with the rest of the menus on my sidebar.
Thanks
Anthony
P.S. Edited to add: OIO installed on Wordpress 2.3, PHP4, MySQL5. Demographics was working until v1.62
I'll check the demographics out for you later today. The text ads are covered by a widget though.
EDIT: just re-tested the demographics and it seems to be functioning correctly. Can you open the file modules/demographics/oiopub-load.php and find the function 'get_location'.
Just before the final closing bracket in tht function (the line above it) add:
echo $oiopub_set->visitor_country
This will check to see whether the country code is being set, as a page refresh should then show the country code at the top of the page (don't look at an admin page though, look at a blog page).
I'm afraid isn't working yet and I cannot see the country code also. Did I add the code in the right place?
//get location
function get_location() {
global $oiopub_set, $oiopub_cache;
if(!oiopub_is_admin()) {
if($oiopub_set->host_name != "localhost") {
$ip = oiopub_clean($_SERVER['REMOTE_ADDR']);
$oiopub_set->visitor_country = $oiopub_cache->get(md5($ip));
if(empty($oiopub_set->visitor_country)) {
if(!@function_exists('geoip_open')) {
include_once($oiopub_set->demographics_dir . '/geo/geoip.php');
}
$gi = @geoip_open($oiopub_set->demographics_dir . "/geo/GeoIP.dat", GEOIP_STANDARD);
$oiopub_set->visitor_country = @geoip_country_code_by_addr($gi, $ip);
$oiopub_cache->write(md5($ip), $oiopub_set->visitor_country);
@geoip_close($gi);
}
}
}
echo $oiopub_set->visitor_country;
}
I don't know if that could have to do with the way I upgraded (I always have done the same process without problems)
1. Uploaded OIO plugin into a folder named oiopub-direct-new
2. go to OIO admin panel and disable the plugin
3. through FTP renamed oiopub-direct folder as oiopub-direct-old
4. then renamed oiopub-direct-new folder as oiopub-direct
5. go to OIO admin panel and enable the plugin
6. if something goes wrong just revert the process
7. if everything is OK, I consider it upgraded
Since I upgraded to 2.04 I'm dealing with two issues: geolocation is not working and some default banner ads vanished form some of the spots (not big deal, but it happened after all).
I've added the code you suggested but still geolocation is not working and cannot see the country code at the top of the page (not even looking at the source code).
Would you mind sending some FTP details over via the contact form?
1 to 4 of 4