Jump to content


Approved members
  • Posts

  • Joined

  • Last visited

Posts posted by yashmeena

  1. Hello i am trying to add native ad format by modifying asyncspc.php 

    My idea is...i have pulled all the ads linked to a zone and shorted them by the campaign type and by priorities but in some point of time i realize that fetching ads from $GLOBALS['_MAX']['considered_ads']['0'] is not a good choice as there will be no OABLOCK,OACAP cookies will be there for capping..?

    also found that (i may be wrong) $GLOBALS['_MAX'] is generated by MAX_adSelect function..?

    so far what i have done is but no luck in getting OABLOCK,OACAP cookies working for all the selected ads

    if (!empty($GLOBALS['_MAX']['considered_ads']['0']['xAds'])) {
            usort($xAds, function ($a, $b) {return $a['priority'] < $b['priority'];});


            foreach ($xAds as $id => $value) {            
                // Total_Amount == $value['Total_Amount']
                //echo $ad_id;

                   $aBanner=MAX_cacheGetAd($ad_id,true);// getting banner info from cache///check cache.php
                            if (empty($aBanner)) {
                                $aBanner=OA_Dal_Delivery_getAd($ad_id);// getting banner info from db///check delevery.php
                            $outputbuffer=MAX_adRender($aBanner, $zoneid);
                            $output = array(
                            'html'          => $outputbuffer,
                            'bannerid'      => $aBanner['ad_id'],
                            'contenttype'   => $aBanner['contenttype'],
                            'alt'           => $aBanner['alt'],
                            'width'         => $aBanner['width'],
                            'height'        => $aBanner['height'],
                            'url'           => $aBanner['url'],
                            'campaignid'    => $aBanner['placement_id'],
                            'clickUrl'      => $aBanner['clickUrl'],
                            'logUrl'        => $aBanner['logUrl'],
                            'aSearch'       => $aBanner['aSearch'],
                            'aReplace'      => $aBanner['aReplace'],
                            'bannerContent' => $aBanner['bannerContent'],
                            'clickwindow'   => $aBanner['clickwindow'],
                            'aRow'          => $aBanner,
                            'context'       => _adSelectBuildContext($aBanner, $context),
                            'iframeFriendly' => (bool)$aBanner['iframe_friendly'],
                            // If ad-logging is disabled, the log beacon won't be sent, so set the capping at request
                            if (MAX_Delivery_cookie_cappingOnRequest()) {
                                if ($aBanner['block_ad'] > 0 || $aBanner['cap_ad'] > 0 ||$aBanner['session_cap_ad'] > 0) {
                                    MAX_Delivery_cookie_setCapping('Ad', $aBanner['ad_id'], $aBanner['block_ad'], $aBanner['cap_ad'], $aBanner['session_cap_ad']);
                                if ($aBanner['block_campaign'] > 0 || $aBanner['cap_campaign'] > 0 || $aBanner['session_cap_campaign'] > 0) {
                                    MAX_Delivery_cookie_setCapping('Campaign', $aBanner['placement_id'], $aBanner['block_campaign'], $aBanner['cap_campaign'], $aBanner['session_cap_campaign']);
                                // Store the last view action event om the cookie as well (if required)
                                MAX_Delivery_log_setLastAction(0, array($aBanner['ad_id']), array($zoneId), array($aBanner['viewwindow']));
                            $native_output_xAds[] = array(
                            'html' => $output['html'],
                            'width' => isset($output['width']) ? $output['width'] : 0,
                            'height' => isset($output['height']) ? $output['height'] : 0,
                            'iframeFriendly' => isset($output['iframeFriendly']) ? $output['iframeFriendly'] : false,
                            if (!empty($block) && !empty($output['ad_id'])) {
                            $output['context'][] = array('!=' => 'bannerid:' . $output['ad_id']);
                            if (!empty($blockcampaign) && !empty($output['campaignid'])) {
                            $output['context'][] = array('!=' => 'campaignid:' . $output['campaignid']);
                            if (!empty($output['context'])) {
                            foreach ($output['context'] as $id => $contextArray) {
                            if (!in_array($contextArray, $context)) {
                            $context[] = $contextArray;}}}

    i have placed above code after echo json_encode($spc_output); ...above code is for override campaign...

    can any body tell me what i am doing wrong or what should i do to get it working in proper way..?


  2. On 10/4/2020 at 4:19 AM, lena11d said:

    Hi Krishnapriya:

    We have 10+ banners/big boxes attached/added to the same campaign on the Revive side. In our Joomla backend we are using Revive plugin/module and I set it up to show let's say 5 times on the page. However only 1 banner is showing up on the page. Ive tried all of the combinations of "Dont show a banner from the same campaign on the same page" and I cannot get more than 1 banner showing on the page. (The only thing that works is splitting the banners into different campaigns which is what we ended up doing). It would be nice to figure out why we cant show more than one banner from one campaign on the same page at the same time though.

    Thank you!




    use Companion positioning

  3. On 6/28/2017 at 11:17 AM, andrewatfornax said:

    You will need to put the file in a location that PHP is configured to look for files to include in. That will depend on your PHP configuration.

    Error: cannot load the PEAR XML_RPC class

    any help..?

    I will be your patreon supporter If you start to understand what are you trying to do..?

  4. On 6/15/2017 at 5:25 AM, andrewatfornax said:

    The best way to support us in that process is through Patreon

    i will support you on patreon $10000 if you can explain me how delivery engine shows ads using Asynchronous JS Tag how it decides what adid should be served or is there any why to override and display chosen adid MAKE A COMPLETE DOC ON HOW YOUR ADVERSER WORKS FROM DELIVERY TO LOGGING TO API 

  • Create New...