Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
TXP image type includes .swf ?
Stupid question, but suddenly I doubt…
Textpattern’s images tools does handle .swf flash files?
The doc says it does, but I got an error trying to upload one. And I never payed much attention to flash files :-/
Offline
#2 2007-06-15 02:45:59
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: TXP image type includes .swf ?
…does handle .swf flash files?
Yes, it should.
What error?
Offline
Re: TXP image type includes .swf ?
The only_graphic_files_allowed string one. I’ve tested on two different revisions, including a 2406 quite recent.
I wanted to be sure before I try to debug it more.
I’ve tested on three different install, three different revisions, but same host. So either it’s a bug that has gone unnoticed since 4.0.4, or it’s my host.
Last edited by Jeremie (2007-06-15 03:27:43)
Offline
#4 2007-06-15 06:45:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: TXP image type includes .swf ?
Okay. Yeah, start in the image_data() function. Try removing the error suppression operator (@) and try again, see if you get any further errors.
Offline
Re: TXP image type includes .swf ?
Since when is .swf an image format? I can understand why it isn’t seen as a file, but it’s not really an image either (no thumbnailing, etc).
Offline
Re: TXP image type includes .swf ?
Hence my initial question, and my first post not being a bug report. If i was asked, out of the blue, if TXP/Image could handle Flash files, I would have said no.
But on the other hand, on the frontend side, it’s quite like an image. A writer could input one in its article the same way it input a jpeg or png file.
Yes it doesn’t have thumbnail, or its own-by-design height and width, but the same apply to .svg file for example and those are definitely images.
And most of the images functionalities (thumb, size, caption, alt text, etc.) can be applied to flash files (and .svg) even if it’s with different code.
@Mary: I remove it and get back to you.
Offline
Re: TXP image type includes .swf ?
Mary: as far as I found, there are only three occurrences of image_data() (all in txp_image.php) and none use the @ parameter.
Last edited by Jeremie (2007-06-15 16:27:30)
Offline
#8 2007-06-17 05:46:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: TXP image type includes .swf ?
Jérémie: line 619 of /textpattern/include/txp_image.php.
Ruud: Actually, they can be. Lots of people use Flash to make graphic headers that do fancy things (but nothing substantial like navigation) or to display images they want some small amount of protection of.
Offline
Re: TXP image type includes .swf ?
Done. After trying to upload a .swf (and only this, works fine with jpeg and the other):
Notice: Undefined offset: 13 in /textpattern/include/txp_image.php on line 619
With this diag:
Version de Textpattern: 4.0.4 (r2414)
Dernière mise à jour: 2007-06-15 03:34:02/2007-06-15 03:33:25
Document racine: /home.10.5/dorem/multi/lapagedublacky.net
$path_to_site: /home.10.5/dorem/multi/lapagedublacky.net
Chemin d’accès à Textpattern: /home.10.5/dorem/multi/lapagedublacky.net/textpattern
Format des URL: section_title
Répertoire temporaire: /home/dorem/multi/lapagedublacky.net/textpattern/tmp
URL du site: lapagedublacky.net
Version de PHP: 5.2.1
Bibliothèque GD: bundled (2.0.28 compatible) formats supportés : GIF, JPG, PNG.
Date & heure du serveur: 2007-06-17 14:30:38
MySQL: 5.0.26-log
Locale: fr_FR.UTF-8
Serveur: Apache
API PHP du serveur: cgi
Entêtes RFC 2616: 0
Système d’exploitation serveur: Linux 2.6.21.1-grsec-mutu-grs-ipv4-32Vérifications:
————————————
/home.10.5/dorem/multi/lapagedublacky.net/textpattern/setup/ existe encore
————————————contenu du fichier .htaccess:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks<IfModule mod_rewrite.c> RewriteEngine On
#RewriteBase /relative/web/path/ RewriteCond %{HTTP_HOST} ^www\.lapagedublacky\.net [NC] RewriteRule ^/?(.*) http://lapagedublacky\.net/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
</IfModule>#php_value register_globals 0
————————————
Last edited by Jeremie (2007-06-17 12:34:53)
Offline
Re: TXP image type includes .swf ?
You’re uploading a compressed .swf file (which is recognized by PHP as a .swc file).
Can you describe step by step what you are doing, because I can only reproduce it when uploading it as a thumbnail for an already existing image.
Last edited by ruud (2007-06-17 13:33:51)
Offline
Re: TXP image type includes .swf ?
I’m uploading a .swf file (I don’t know exactly which subset it is, Flash and me are far, far apart; it works in all the major browsers) for a new image.
TXP->Content->images->browse|send_image
PS: if it’s a Flash subset thing, do you have a test file that works on your end I can download to test on my end?
Last edited by Jeremie (2007-06-17 13:35:52)
Offline
Re: TXP image type includes .swf ?
Try revision 2433 from SVN
Offline