Updating list and edit pages
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 21 Jun 2017 17:09:01 +0000 (13:09 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 21 Jun 2017 17:09:01 +0000 (13:09 -0400)
remove clicks and impressions

Toolkit/Banners/Forms/EditBanner.php
Toolkit/Banners/ListBanners.php

index 82cb554..39fa043 100644 (file)
@@ -201,8 +201,8 @@ class Toolkit_Banners_Forms_EditBanner extends Toolkit_FormBuilder
                         'Y' => $banner->getCampaign()->getEDate()->getYear(),
                     ),
                     'paid_impressions'  => $banner->getCampaign()->getPaidImpressions(),
-                    'clicks'            => $banner->getCampaign()->getClicks(),
-                    'impressions'       => $banner->getCampaign()->getImpressions(),
+                    'clicks'            => 0, //$banner->getCampaign()->getClicks(),
+                    'impressions'       => 0, //$banner->getCampaign()->getImpressions(),
                     'campaign'          => $banner->getCampaign()->getName(),
                     'image'             => $banner->getImage(),
                     'current_image_rmv' => sprintf($img, $path, $banner->getImage()),
@@ -433,31 +433,31 @@ class Toolkit_Banners_Forms_EditBanner extends Toolkit_FormBuilder
                        'opts'    => array('class' => 'text')
         );
                if (filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
-                       $e[] = array(
-                   'type'    => 'static',
-                   'req'     => false,
-                   'name'    => 'clicks',
-                   'display' => 'Clicks'
-               );
-                       $e[] = array(
-                   'type'    => 'static',
-                   'req'     => false,
-                   'name'    => 'impressions',
-                   'display' => 'Impressions'
-               );
+                       // $e[] = array(
+               //     'type'    => 'static',
+               //     'req'     => false,
+               //     'name'    => 'clicks',
+               //     'display' => 'Clicks'
+               // );
+                       // $e[] = array(
+               //     'type'    => 'static',
+               //     'req'     => false,
+               //     'name'    => 'impressions',
+               //     'display' => 'Impressions'
+               // );
                        $e[] = array(
                                'type'     => 'static',
                                'req'     => false,
                                'name'    => 'lastImpression',
                                'display' => 'Last Impression'
                        );
-                       $e[] = array(
-                   'type'    => 'checkbox',
-                   'req'     => false,
-                   'name'    => 'reset_rmv',
-                   'display' => 'Reset Impressions & Clicks',
-                'att'     => array('id' => 'reset')
-               );
+                       // $e[] = array(
+               //     'type'    => 'checkbox',
+               //     'req'     => false,
+               //     'name'    => 'reset_rmv',
+               //     'display' => 'Reset Impressions & Clicks',
+            //     'att'     => array('id' => 'reset')
+               // );
         }
         $e[] = array(
                'type'    => 'text',
index ecfc939..a27b599 100644 (file)
@@ -173,28 +173,28 @@ class Toolkit_Banners_ListBanners
             'edate',
             array('class' => 'dateLink')
         ));
-               $this->addColumn(new Structures_DataGrid_Column(
-            '<abbr title="Impressions">IMP</abbr>',
-            'impressions',
-            'impressions',
-            array('class' => 'dateLink')
-        ));
-               $this->addColumn(new Structures_DataGrid_Column(
-            'Clicks',
-            'clicks',
-            'clicks',
-            array('class' => 'dateLink'),
-            null,
-            array(&$this, 'getClicks')
-        ));
-               $this->addColumn(new Structures_DataGrid_Column(
-            '<abbr title="Click Through Rate">CTR</abbr>',
-            null,
-            null,
-            null,
-            null,
-            array(&$this, 'calculateClickThroughRate')
-        ));
+               // $this->addColumn(new Structures_DataGrid_Column(
+        //     '<abbr title="Impressions">IMP</abbr>',
+        //     'impressions',
+        //     'impressions',
+        //     array('class' => 'dateLink')
+        // ));
+               // $this->addColumn(new Structures_DataGrid_Column(
+        //     'Clicks',
+        //     'clicks',
+        //     'clicks',
+        //     array('class' => 'dateLink'),
+        //     null,
+        //     array(&$this, 'getClicks')
+        // ));
+               // $this->addColumn(new Structures_DataGrid_Column(
+        //     '<abbr title="Click Through Rate">CTR</abbr>',
+        //     null,
+        //     null,
+        //     null,
+        //     null,
+        //     array(&$this, 'calculateClickThroughRate')
+        // ));
                $this->addColumn(new Structures_DataGrid_Column(
             'Banner',
             null,
@@ -344,7 +344,7 @@ class Toolkit_Banners_ListBanners
                                WHERE bccs.campaign = bc.id) AS clicks';
 
                $sql = "
-                       SELECT b.*, b.id AS banner_id, bc.id AS campaign_id, $i, $c
+                       SELECT b.*, b.id AS banner_id, bc.id AS campaign_id, 0 as impressions, 0 as clicks
                          FROM banners b INNER JOIN banner_campaigns bc
                            ON b.campaign = bc.id";