OpenX: Multiple Keywords in page URL
Recently I faced a problem when delivery limitation option needs to be implemented for banner delivery. I had opted Page URL option,that is, check the keywords within URL. In the URL + sign was being used to combine more than one keywords that is: http://example/com/search?keyword=kw1+kw2.
When OpenX was going to search the desired keyword, it was replacing (+) sign with space thus it was not returning true result due to space thus banner was not being delivered. What simply I did that I added following lines page Url plugin file(plugins\deliveryLimitations\Site\Pageurl.delivery.php)
function MAX_checkSite_Pageurl($limitation, $op, $aParams = array())
{
if ($limitation == '') {
return true;
}
//$GLOBALS['loc'] = $_SERVER['HTTP_REFERER'];
$url = empty($aParams) ? $GLOBALS['loc'] : $aParams['loc'];
$message = trim($_SERVER['QUERY_STRING']);
$message = explode("=",$message);
$url = $message[7];
return MAX_limitationsMatchStringValue($url, $limitation, $op);
}
I am over writing the $url value from the value I am getting via Query String and assigned the value. Thus I get raw input of URL. By editing in this file I am not ruining the main implementation of other options of delivery limitation.
p.s: In case you have installed OpenX and looking for customization or consultancy then do contact me at kadnan (at) gmail (dot) com