I’m experiencing a problem, it seems a FF add-on popup blocker adds a strange class to my portfolio images, this causes the images not to load anymore, I tried to remove the class with JS, still it ads it again. Now, my question is how do I fix this, does it have to do with the names of my classes?
You can see it Here
thank you! jayc
You will not believe this: I had WP generate thumbs like this:
parent::addImageSize(300, 250, $settings[‘post_type’].’-preview’, true);
guess what it was naming the image something like:
which has the “300×250” text, which is a standard banner size and was blocked by banner blockers.
So, never ever make thumb sizes of 300×250.
Which popup blocker?
It might be the particular image size is triggering it (tried a diff size?) – maybe only a single pixel might get round it.https://easylist-downloads.adblockplus.org/easylist.txt
will give you an idea what to not name the files (not sure if class names / id’s trigger it, but it looks like resizing scripts with certain image sizes will).
Ah heh, slightly too late
Glad you fixed it
I don’t think it’s a theme’s responsibility to handle issues created by some pop-up blocker from a 3rd party. It’s like coding a workaround for some security setting in an ancient IE version; you just can’t cover all scenarios. And you shouldn’t, because it’s a website template, not an app or something else.
Don’t get me wrong jayc, but you shouldn’t need to do that; let alone spend 6 hours on it. (it’s for a commercial theme, I suppose?)
Anyway, it sure is plain stupid for that plugin to block images based on a name pattern. They should find another way of blocking them, as a site owner I want to name my images however the hell I wish. Stupid plugin.
I think its just one of those things we have to deal with. Well, we don’t have to, and its not the responsibility of the theme author.. but if a buyer has an adblocker running, view the demo and the demo uses a size that makes it blockable, its a potential lost sale (it is also a lot of possible support questions down the line).
I think most of the filters they check for would be no prob (putting ‘ad’ and such in the names isn’t too likely ;)) – but the image sizing is definitely one that could catch you out (I think I have run into it before).
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.