Donnerstag, 25. Juni 2009

Workaround for Flash CS3 Bug in internationalization using Strings Panel : Error 1009

Flash CS3 has a Bug when creating multilanguage projects using the Strings-Panel with String-replacement-setting set to "Automatically at Runtime".

A Bug description can be found at
I did spend a lot of time on trying to find a solution for that problem:

Assuming you have a dynamic textbox linked to a Strings-Panel-ID in Frame 1 - 5 you will receive a TypeError #1009 if the Player comes to frame 6.

TypeError: Error #1009: Cannot access a property or method of a null object reference.

Workaround: The error does not occur if the textbox is embedded in a movieclip that has only one frame.

Dienstag, 23. Juni 2009

Filter filename on fileupload and prevent execution of uploaded files

Its a good way to allways rename uploaded files using something like a MD5-hash and store the original filename in a database.

If for some reason you dont want to rename it using a hash, you should filter the filename using some code like this one:

$filename = strip_tags($_FILES["upload"]["name"]);
$filename = str_replace(array('|','<','>','"','\'',':','\\','/','*','?'),'',$filename);

It's a good idea to deny the execution of all uploaded files: place a .htaccess file in your upload-directory:

RemoveHandler .cgi .shtm .shtml
RemoveType .php .php3 .php4 .php5

deny from all

order deny,allow
deny from all

Mittwoch, 17. Juni 2009

AIE AJAX Image Editor for Drupal

Today I found this great tutorial on how to integrate my AIE (Ajax Image Editor) into the Drupal imagefield module:

As expected, it seems to be pretty easy to integrate AIE into Drupal :-)