jbx
Forum Replies Created
-
Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupAh, it wasn’t working for you because you didn’t have
target="_blank"then. My ads are all with that so the JS was continuing to execute till the end.Regarding
clicktracker.phppermissions seem OK, 0644 and the right user. However I just get HTTP 404. You can have a look at my site if you want.Not sure if wordpress has some kind of permission or something where it does not allow files at a certain folder level only to be executed.
Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupJust tried your code seems to work fine too. (My snippet above was OK too, but there is no need for a timeout).
The only pending issue is the track Id which is not being recognised by the clicktracker.php script.
Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupHi Arnan,
When you say they do not work at all, in what sense? For me it works. I just swapped the two lines so if one works the other should. Any Javascript error in the console or anything that indicates what didn’t work?
It works for me, you can see it here: http://www.eve.com.mt
http://www.eve.com.mt/wp-content/plugins/adrotate/library/jquery.clicktracker.js?ver=0.1When you’re testing make sure your popup blocker is enabled and check that you didn’t choose to allow popups for the server you’re testing on some time in the past. If you’re testing on localhost or a server you’ve been testing on for a long time it could be you allowed popups or something.
In my case, it wasn’t just my browser, it was advertisers who complained that suddenly their ads were being ‘blocked’. I replicated it on both IE 11, Chrome 32 on windows and Chrome 32 on Ubuntu.
I will try your recent solution, it should work too without the setTimeout. Jquery AJAX is async anyway so there isn’t the need for it.
One other thing you might want to look at before you issue an update is why the clicktracker.php is responding with Error 404. For some reason it is not recognising the tracker ID or something.
Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupI have tried to invert them and it seems to solve the issue.
window.open(href,(!target?"_self":target)); setTimeout(function() { jQuery.ajax({ url: location.protocol + '//' + location.hostname + '/wp-content/plugins/adrotate/library/clicktracker.php', data: 'track='+track })},300);However I noticed that the AJAX call to the clicktracker is actually not working anyway (also in the original plugin code).
In the Javascript console I am getting this:
GET http://mydomain/wp-content/plugins/adrotate/library/clicktracker.php?track=OTQsMSwwLDA= 404 (Not Found)Not sure whether it is because the tracker ID has an
=which needs to be converted to the HTML entity value, or because of something else.Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupWell, Ads are blocked only if they open by themselves. If the user explicitly clicks on a link, the user wants that page to open. If this wasn’t like that even google’s revenue stream (Google Ads) would not work any more. I am sure its not the classname.
I did a bit of more research and I think I know the real cause of this.
In
jquery.clicktracker.jsthere is this:jQuery.ajax({ url: location.protocol + '//' + location.hostname + '/wp-content/plugins/adrotate/library/clicktracker.php', data: 'track='+track }); setTimeout(function() { window.open(href,(!target?"_self":target)); },300);So what is happening is that, even if the user is explicitly clicking on the link, the popup is opening up 300ms afterwards, so the browser thinks its one of those annoying popups that come up automatically, ignoring the fact that the user clicked on it 300ms before, because they are separate events.
If you look at this here, http://stackoverflow.com/questions/15818892/chrome-javascript-window-open-in-new-tab
Point 3 of the answer that was given seems to confirm this too.Maybe what we just need is to invert the two, perform the normal
window.openin the same event handler, and just perform the Ajax call withsetTimeoutForum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupI know it doesn’t make much sense. But I removed it and suddenly its working again normally. I know clicktracking will stop working, but the issue of adverts being blocked was much worse for me.
It could be that the javascript that is acting on links with the class
gofollowis doing something that is causing browsers to open the links in a new window rather than a new tab.I don’t know, but something definitely changed in one of the most recent releases because ads (the same ones, so nothing changed from that side) suddenly started behaving like this and getting blocked.
Forum: Plugins
In reply to: [AdRotate Banner Manager] Ads being blocked after update to AdrotateI’ve just solved it temporarily by commenting out the following code in
adrotate-output.php:if(preg_match('/<a[^>]+class=\"(.+?)\"[^>]*>/i', $banner_output, $regs)) { $result = explode(" ", $regs[1]); $result[] = "gofollow"; $result = implode(" ", $result); $banner_output = preg_replace('/class=\"(.+?)\"/i', 'class="'.$result.'"', $banner_output); } else { $banner_output = str_replace('<a ', '<a class="gofollow" ', $banner_output); }I don’t know what the class
gofollowis actually for, maybe its affecting click tracking or something. But at least ads are coming up properly now in a new tab, until a proper solution is provided.Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popup🙂 I’ve posted a separate question too before I noticed your post.
Just solved it temporarily with a hack, until the author gives us a proper solution.Edit the plugin code and in adrotate-output.php comment out this part:
if(preg_match('/<a[^>]+class=\"(.+?)\"[^>]*>/i', $banner_output, $regs)) { $result = explode(" ", $regs[1]); $result[] = "gofollow"; $result = implode(" ", $result); $banner_output = preg_replace('/class=\"(.+?)\"/i', 'class="'.$result.'"', $banner_output); } else { $banner_output = str_replace('<a ', '<a class="gofollow" ', $banner_output); }Make sure you comment out up to the right curly bracket.
Seems to have solve the issue for me, although it might be affecting clicktracking, so maybe the plugin author will give us a proper solution eventually.
Forum: Plugins
In reply to: [AdRotate Banner Manager] New link in a popupI also noticed this new behaviour. It seems to be caused by class=”gofollow”. It causes ads to be popup blocked by most browsers, rather than opening in a new tab like they were doing before.
Forum: Plugins
In reply to: [Facebook] Facebook widgets interfere with widget titles by escaping HTMLCheers, looking forward to the update.
Forum: Fixing WordPress
In reply to: Disable the install page when the mysql database is not availableThanks for your reply. Its the wordpress error handling that I need to change. If there is a temporary glitch (which rarely happens, but happens) I don’t want wordpress to display the install page and overwrite my .htaccess file.
Yes I can do it, however how will the .htaccess file know that wordpress is failing to connect to the Mysql database?
Bump?! Any ideas?
Mmm, is there any way to disable bookings and coupons completely from loading? I don’t use those, they’re not even in my template.
I will try it, although I doubt this will have any effect. If it was an issue I guess I would have got “Allowed memory size of xxxxxx bytes exhausted”
Well it has 1GB. Its never really reaching it though when I do top its always consuming something like 700Mb. I doubt a few events would consume lots of memory.