i'm not sure it's working
zanuxzan - June 9, 2009 - 02:11
| Project: | ad_flash |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | ad_flash, max width, min width |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| ad_flash_validate_size.patch | 5.74 KB |

#1
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 ?
#2
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.