Within Ads > Settings > Flash Ad you can set the max and min width for any ad groups (which are just taxonomy terms). You can also set a 'default' max/min width which is used for any ads that are not placed within a group.

The issue is that only the default is ever validated against. If max and min is set for a group this is not honoured upon add/update.

Attached is a patch that fixes this issue. I simply copied the code from the ad_image.module for the relevant functions.

Note that like the ad_image.module this change will allow support for validating against multiple ad groups.

Comments

Alex Andrascu’s picture

Title: ad_flash_validate_size only validates default size » i'm not sure it's working

Before the patch

The flash 250x100_rom_ieas.swf is only pixels wide, which is less than the minimum of 200 pixels allowed in the Coloana stanga box ad group.
The flash 250x100_rom_ieas.swf is only pixels high, which is less than the minimum of 50 pixels allowed in the Coloana stanga box ad group.

After the patch

The flash 250x100_rom_ieas.swf is only pixels wide, which is less than the minimum of 200 pixels allowed in the Coloana stanga box ad group.
The flash 250x100_rom_ieas.swf is only pixels high, which is less than the minimum of 50 pixels allowed in the Coloana stanga box ad group.

quick peak with Firebut revealed this

<script type="text/javascript">
1AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','src','http://constructiv.ro/sites/default/files/250x100_rom_ieas_0','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://constructiv.ro/sites/default/files/250x100_rom_ieas_0','width','0','height','0','menu','false','wmode','transparent','flashvars','clickTAG=http://constructiv.ro/ad/redirect/788/t1128');
</script>

where width and height is 0 but why is that ?

Alex Andrascu’s picture

I found out that getimagesize() won't always work for flash. Mostly it won't work and it will cause problems for internet explorer 6 or higher. I'm coming up with a solution using getID3 to get the width and height for the swf file. I'll post it here as soon as i've test it.

Alex Andrascu’s picture

After a little while and some requests beeing made i will post my implementation of getid3 solution for the getimagesize() issue.

Installation instructions provided bellow:

1. Install, enable, configure and verify the getID3 module and getid3 php library
2. Install the ad_flash 6.x-1.x-dev as instructed there.
3. Apply this patch.

Hug me :)

petr illek’s picture

Big hug :) - it is working.

There is only one small mistake in the patch where is the require of the GETID3 library - which is located in sites/all/libraries/getid3/getid3 (like the getid3 modul wants) and not in the sites/all/libraries/getid3.

Thanks a lot.

Alex Andrascu’s picture

i know of it but it's getid3 module related. we should post it there :)

Alex Andrascu’s picture

Version: 6.x-1.x-dev » 6.x-2.1
Assigned: Unassigned » Alex Andrascu
Status: Active » Fixed

fixed in the 6.x-2.1 version
Note that ad_flash requires getid3 module and library to work properly now

Status: Fixed » Closed (fixed)
Issue tags: -max width, -min width, -ad_flash

Automatically closed -- issue fixed for 2 weeks with no activity.