janflora2
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [AdRotate Banner Manager] Problems with caching in W3TCHi Arnan,
Did you have a chance to look into this issue?
Best regards,
Jan FloraForum: Plugins
In reply to: [AdRotate Banner Manager] Problems with caching in W3TCI just realised that you can actually post code in here. I’ll try to see if I can add the patch here:
--- adrotate-pro/adrotate-widget.php.old 2015-12-17 11:28:49.846124566 +0100 +++ adrotate-pro/adrotate-widget.php 2015-12-17 11:18:05.162101510 +0100 @@ -47,17 +47,28 @@ } if($adrotate_config['widgetalign'] == 'Y') echo '<ul><li>'; - if($adrotate_config['w3caching'] == 'Y') echo '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; - - if($instance['type'] == "single") { - echo adrotate_ad($instance['adid'], true, 0, 0, $instance['siteid']); + if($adrotate_config['w3caching'] == 'Y') { + echo '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; + echo 'echo "<!-- ".date("c")." -->";'; + if($instance['type'] == "single") { + echo 'echo adrotate_ad('.$instance['adid'].', true, 0, 0, '.$instance['siteid'].');'; + } + + if($instance['type'] == "group") { + echo 'echo adrotate_group('.$instance['adid'].', 0, 0, '.$instance['siteid'].');'; + } + + echo '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; + } else { + if($instance['type'] == "single") { + echo adrotate_ad($instance['adid'], true, 0, 0, $instance['siteid']); + } + + if($instance['type'] == "group") { + echo adrotate_group($instance['adid'], 0, 0, $instance['siteid']); + } } - if($instance['type'] == "group") { - echo adrotate_group($instance['adid'], 0, 0, $instance['siteid']); - } - - if($adrotate_config['w3caching'] == 'Y') echo '<!-- /mfunc -->'; if($adrotate_config['widgetalign'] == 'Y') echo '</li></ul>'; echo $after_widget; --- adrotate-pro/adrotate-functions.php.old 2015-12-17 11:29:36.010126217 +0100 +++ adrotate-pro/adrotate-functions.php 2015-12-17 11:22:11.518110321 +0100 @@ -29,18 +29,29 @@ $output = ''; - if($adrotate_config['w3caching'] == "Y") $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; - - if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad - $output .= adrotate_ad($banner_id, true, 0, $site); - } - - if($banner_id == 0 AND $group_ids > 0) { // Show group - $output .= adrotate_group($group_ids, $fallback, $weight, $site); + if($adrotate_config['w3caching'] == "Y") { + $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; + $output .= 'echo "<!-- ".date("c")." -->";'; + + if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad + $output .= 'echo adrotate_ad('.$banner_id.', true, 0, '.$site.');'; + } + + if($banner_id == 0 AND $group_ids > 0) { // Show group + $output .= 'echo adrotate_group('.$group_ids.', '.$fallback.', '.$weight.', '.$site.');'; + } + + $output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->'; + } else { + if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad + $output .= adrotate_ad($banner_id, true, 0, $site); + } + + if($banner_id == 0 AND $group_ids > 0) { // Show group + $output .= adrotate_group($group_ids, $fallback, $weight, $site); + } } - if($adrotate_config['w3caching'] == "Y") $output .= '<!-- /mfunc -->'; - return $output; }
Viewing 2 replies - 1 through 2 (of 2 total)