Changeset 842553
- Timestamp:
- 01/21/2014 05:38:21 PM (12 years ago)
- Location:
- progrids-widgets/trunk
- Files:
-
- 3 edited
-
classes/ProGridsApi.php (modified) (1 diff)
-
functions.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
progrids-widgets/trunk/classes/ProGridsApi.php
r842537 r842553 70 70 $startDate = $startDate ? $startDate : date('Y-m-d', strtotime('-30 days')); 71 71 $endDate = $endDate ? $endDate : date('Y-m-d'); 72 $url = PROGRIDS_BASE_URL . (PROGRIDS_DEV_ENVIRON ? '/publisher/report' : '/reportData') . "?startDate=$startDate&endDate=$endDate";72 $url = PROGRIDS_BASE_URL . "/publisher/report?startDate=$startDate&endDate=$endDate"; //(PROGRIDS_DEV_ENVIRON ? '/publisher/report' : '/reportData') . 73 73 $resp = $this->request($url); 74 if (isset($resp->total) && !PROGRIDS_DEV_ENVIRON) {75 $t = $resp->total;76 $t->cpc = $t->click > 0 ? $t->commission / $t->click : 0;77 $t->ecpm = $t->impression > 0 ? $t->commission / $t->impression * 1000 : 0;78 $t->ctr = $t->impression > 0 ? $t->click / $t->impression * 100 : 0;79 }74 // if (isset($resp->total) && !PROGRIDS_DEV_ENVIRON) { 75 // $t = $resp->total; 76 // $t->cpc = $t->click > 0 ? $t->commission / $t->click : 0; 77 // $t->ecpm = $t->impression > 0 ? $t->commission / $t->impression * 1000 : 0; 78 // $t->ctr = $t->impression > 0 ? $t->click / $t->impression * 100 : 0; 79 // } 80 80 return $resp; 81 81 } -
progrids-widgets/trunk/functions.php
r842537 r842553 4 4 * Plugin Name: ProGrids Widget Plugin 5 5 * Description: ProGrids.com widget management plugin 6 * Version: 1.5. 06 * Version: 1.5.1 7 7 * Author: Sazze, Inc. 8 8 * Author URI: http://progrids.com/ … … 20 20 21 21 define('PROGRIDS_PLUGIN_DIR', dirname(__FILE__)); 22 //if (preg_match('~.*(localdev|blog1).*~', $_SERVER['HTTP_HOST'])) { 23 // define('PROGRIDS_PLUGIN_URL', plugins_url('', 'progrids/functions.php')); 24 //} else { 25 define('PROGRIDS_PLUGIN_URL', PROGRIDS_DEV_ENVIRON || preg_match('~.*current.*~', __FILE__) ? plugins_url('', 'progrids/functions.php') : (plugins_url() . '/' . basename(dirname(__FILE__)))); 26 //} 22 23 define('PROGRIDS_PLUGIN_URL', PROGRIDS_DEV_ENVIRON ? plugins_url('', 'progrids/functions.php') : (plugins_url() . '/' . basename(dirname(__FILE__)))); //|| preg_match('~.*current.*~', __FILE__) 27 24 28 25 define('PROGRIDS_VIEW_DIR', dirname(__FILE__) . '/views'); -
progrids-widgets/trunk/readme.txt
r842537 r842553 4 4 Requires at least: 3.2 5 5 Tested up to: 3.8 6 Stable tag: 1.5. 06 Stable tag: 1.5.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.