Changeset 1837049
- Timestamp:
- 03/09/2018 02:12:01 PM (8 years ago)
- Location:
- affilinet-performance-module
- Files:
-
- 74 added
- 4 edited
- 3 copied
-
tags/1.9.4 (added)
-
tags/1.9.4/affilinet.php (copied) (copied from affilinet-performance-module/trunk/affilinet.php) (1 diff)
-
tags/1.9.4/classes (added)
-
tags/1.9.4/classes/Api.php (added)
-
tags/1.9.4/classes/Helper.php (added)
-
tags/1.9.4/classes/PerformanceAds.php (added)
-
tags/1.9.4/classes/Plugin.php (added)
-
tags/1.9.4/classes/View.php (added)
-
tags/1.9.4/classes/Widget.php (added)
-
tags/1.9.4/classes/Yieldkit.php (added)
-
tags/1.9.4/images (added)
-
tags/1.9.4/images/120x600.jpg (added)
-
tags/1.9.4/images/160x600.jpg (added)
-
tags/1.9.4/images/168x28.jpg (added)
-
tags/1.9.4/images/216x36.jpg (added)
-
tags/1.9.4/images/250x250.jpg (added)
-
tags/1.9.4/images/300x250.jpg (added)
-
tags/1.9.4/images/300x50.jpg (added)
-
tags/1.9.4/images/300x600.jpg (added)
-
tags/1.9.4/images/320x50.jpg (added)
-
tags/1.9.4/images/468x60.jpg (added)
-
tags/1.9.4/images/728x90.jpg (added)
-
tags/1.9.4/images/affilinet_icon.png (added)
-
tags/1.9.4/images/affilinet_logo.png (added)
-
tags/1.9.4/images/affilinet_signet.png (added)
-
tags/1.9.4/images/affilinet_signet_small.png (added)
-
tags/1.9.4/images/banner-772x250.jpg (added)
-
tags/1.9.4/js (added)
-
tags/1.9.4/js/affilinet_editor_buttons.js (added)
-
tags/1.9.4/js/affilinet_settings.js (added)
-
tags/1.9.4/js/jquery-flot (added)
-
tags/1.9.4/js/jquery-flot/.gitignore (added)
-
tags/1.9.4/js/jquery-flot/.travis.yml (added)
-
tags/1.9.4/js/jquery-flot/API.md (added)
-
tags/1.9.4/js/jquery-flot/CONTRIBUTING.md (added)
-
tags/1.9.4/js/jquery-flot/FAQ.md (added)
-
tags/1.9.4/js/jquery-flot/LICENSE.txt (added)
-
tags/1.9.4/js/jquery-flot/Makefile (added)
-
tags/1.9.4/js/jquery-flot/NEWS.md (added)
-
tags/1.9.4/js/jquery-flot/PLUGINS.md (added)
-
tags/1.9.4/js/jquery-flot/README.md (added)
-
tags/1.9.4/js/jquery-flot/component.json (added)
-
tags/1.9.4/js/jquery-flot/excanvas.js (added)
-
tags/1.9.4/js/jquery-flot/excanvas.min.js (added)
-
tags/1.9.4/js/jquery-flot/flot.jquery.json (added)
-
tags/1.9.4/js/jquery-flot/jquery.colorhelpers.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.canvas.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.categories.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.crosshair.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.errorbars.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.fillbetween.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.image.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.navigate.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.pie.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.resize.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.selection.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.stack.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.symbol.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.threshold.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.flot.time.js (added)
-
tags/1.9.4/js/jquery-flot/jquery.js (added)
-
tags/1.9.4/js/jquery-flot/package.json (added)
-
tags/1.9.4/languages (added)
-
tags/1.9.4/languages/affilinet-performance-module-de_DE.mo (added)
-
tags/1.9.4/languages/affilinet-performance-module-de_DE.po (added)
-
tags/1.9.4/languages/affilinet-performance-module-fr_FR.mo (added)
-
tags/1.9.4/languages/affilinet-performance-module-fr_FR.po (added)
-
tags/1.9.4/languages/affilinet-performance-module-nl_NL.mo (added)
-
tags/1.9.4/languages/affilinet-performance-module-nl_NL.po (added)
-
tags/1.9.4/readme.txt (copied) (copied from affilinet-performance-module/trunk/readme.txt) (2 diffs)
-
tags/1.9.4/uninstall.php (copied) (copied from affilinet-performance-module/trunk/uninstall.php)
-
tags/1.9.4/views (added)
-
tags/1.9.4/views/reporting.php (added)
-
tags/1.9.4/views/settings.php (added)
-
tags/1.9.4/views/signup.php (added)
-
tags/1.9.4/views/start.php (added)
-
trunk/affilinet.php (modified) (1 diff)
-
trunk/classes/Plugin.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
affilinet-performance-module/tags/1.9.4/affilinet.php
r1834651 r1837049 4 4 Plugin Name: affilinet Performance Ads 5 5 Description: Integrate our data driven and automated performance display plugin into your WordPress platform and serve your users targeted ads in real time. 6 Version: 1.9. 36 Version: 1.9.4 7 7 Author: affilinet 8 8 Author URI: https://www.affili.net/de/publisher/tools/performance-ads -
affilinet-performance-module/tags/1.9.4/readme.txt
r1834651 r1837049 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.9 6 Stable tag: 1.9. 36 Stable tag: 1.9.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 == Changelog == 81 81 82 = 1.9.4 = 83 * Release Date: March 9, 2018 84 * Fix: Suppress warnings on file write for ads.txt 85 82 86 = 1.9.3 = 83 87 * Release Date: March 6, 2018 -
affilinet-performance-module/trunk/affilinet.php
r1834636 r1837049 4 4 Plugin Name: affilinet Performance Ads 5 5 Description: Integrate our data driven and automated performance display plugin into your WordPress platform and serve your users targeted ads in real time. 6 Version: 1.9. 36 Version: 1.9.4 7 7 Author: affilinet 8 8 Author URI: https://www.affili.net/de/publisher/tools/performance-ads -
affilinet-performance-module/trunk/classes/Plugin.php
r1834651 r1837049 24 24 25 25 // check for ads.txt 26 27 // manual update 28 add_action( 'upgrader_process_complete', array($this, 'plugin_upgraded')); 29 // manual activation 30 31 register_activation_hook( AFFILINET_PLUGIN_FILE, array( $this, 'plugin_upgraded' ) ); 32 33 // check for version changes 34 35 // check for version changes 36 $pluginVersion = get_file_data( AFFILINET_PLUGIN_DIR . DIRECTORY_SEPARATOR . 'affilinet.php', array( 'Version' => 'Version' ), 'plugin' ); 37 if ( get_option( 'affilinet-performance-ads-version', false ) !== $pluginVersion['Version'] ) { 38 $this->plugin_upgraded(); 39 update_option( 'affilinet-performance-ads-version', $pluginVersion['Version'] ); 40 } 41 42 // if file was deleted restore it 43 $filePath = ABSPATH . DIRECTORY_SEPARATOR . 'ads.txt'; 44 if ( ! file_exists( $filePath ) ) { 45 $this->plugin_upgraded(); 46 } 47 26 $this->updateAdsTxtOnDemand(); 48 27 } 49 28 … … 58 37 <?php 59 38 } 39 40 if (!$this->adsTxtExistsAndIsUpToDate()) { 41 ?> 42 <div class="notice notice-warning is-dismissible"> 43 <p><?php _e('<strong>affilinet Performance Ads:</strong><br> Missing ads.txt file. Please see instructions on settings page ', 'affilinet-performance-module' ); ?> 44 <a class="button" href="admin.php?page=affilinet_settings"><?php _e('Check your settings.', 'affilinet-performance-module');?></a> 45 </p> 46 </div> 47 <?php 48 } 49 60 50 } 61 51 … … 266 256 } 267 257 268 269 public function plugin_upgraded() { 258 public static function adsTxtExistsAndIsUpToDate() { 259 $filePath = ABSPATH.'ads.txt'; 260 return file_exists($filePath) && strpos(file_get_contents($filePath), self::getAdsTxtContent()) !== false; 261 } 262 263 public function updateAdsTxtOnDemand() { 270 264 // check for correct ads.txt 271 265 272 $filePath = ABSPATH.DIRECTORY_SEPARATOR.'ads.txt'; 273 274 $neededContent = 275 '# affilinet-performance-module-start' . PHP_EOL . 276 '# Do not modify the following lines' . PHP_EOL . 277 '# Ver. 1.9.1' . PHP_EOL . 278 'appnexus.com, 8332, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 279 'appnexus.com, 8327, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 280 'appnexus.com, 8334, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 281 'appnexus.com, 8333, RESELLER, f5ab79cb980f11d1'. PHP_EOL . 282 '# affilinet-performance-module-end' . PHP_EOL; 283 284 if (file_exists($filePath)) { 285 $adsTxtFile = file_get_contents($filePath); 286 if (strpos($adsTxtFile, $neededContent) === false) { 287 // write to file 288 file_put_contents($filePath, PHP_EOL . $neededContent, FILE_APPEND); 289 } 290 }else { 291 file_put_contents($filePath, $neededContent, FILE_APPEND); 292 } 266 $filePath = ABSPATH.'ads.txt'; 267 268 if (!$this->adsTxtExistsAndIsUpToDate()) { 269 $this->writeAdsTxt($filePath, $this->getAdsTxtContent()); 270 } 271 272 } 273 274 public static function getAdsTxtContent() { 275 return '# affilinet-performance-module-start' . PHP_EOL . 276 '# Do not modify the following lines' . PHP_EOL . 277 '# Ver. 1.9.1' . PHP_EOL . 278 'appnexus.com, 8332, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 279 'appnexus.com, 8327, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 280 'appnexus.com, 8334, RESELLER, f5ab79cb980f11d1' . PHP_EOL . 281 'appnexus.com, 8333, RESELLER, f5ab79cb980f11d1'. PHP_EOL . 282 '# affilinet-performance-module-end' . PHP_EOL; 283 } 284 285 private function writeAdsTxt($filePath, $content) { 286 287 try 288 { 289 $fp = @fopen($filePath, "a+"); 290 if ( !$fp ) { 291 throw new Exception('File open failed.'); 292 } 293 @fwrite($fp, $content); 294 @fclose($fp); 295 296 297 } catch ( Exception $e ) { 298 // no output intended 299 } 293 300 294 301 } -
affilinet-performance-module/trunk/readme.txt
r1834636 r1837049 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.9 6 Stable tag: 1.9. 36 Stable tag: 1.9.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 == Changelog == 81 81 82 = 1.9.4 = 83 * Release Date: March 9, 2018 84 * Fix: Suppress warnings on file write for ads.txt 85 82 86 = 1.9.3 = 83 87 * Release Date: March 6, 2018 -
affilinet-performance-module/trunk/views/settings.php
r1624836 r1837049 155 155 156 156 <?php 157 if (Affilinet_Plugin::adsTxtExistsAndIsUpToDate() === false) { 158 ?> 159 <div class="wrap"> 160 <h2 class="alert">Ads.txt Error:</h2> 161 <p>The Plugin could not create an ads.txt file in your root folder. <br> 162 Please create a file named 'ads.txt' in your root folder (next to wp-config.php) with the following content: 163 <br> 164 This file is needed to improve your revenue. 165 <a href="https://iabtechlab.com/ads-txt/" target="_blank">Details about ads.txt.</a> 166 167 </div> 168 <textarea cols="60" rows="10"><?php echo Affilinet_Plugin::getAdsTxtContent(); ?></textarea> 169 </div> 170 171 <?php 172 } 173 ?> 174 175 <?php 157 176 if ( function_exists('submit_button')) { 158 177 submit_button();
Note: See TracChangeset
for help on using the changeset viewer.