Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Attachment Extension 1.4
This discussion has been closed.
Comments
Well for the time being it's working well. I'll be looking into it a bit later but for now I'm satisfied.
For JPEG and jpeg to work you need to change around line 152
from : in_array(strtolower(substr(substr(strstr(basename($File['name']), "."), 1),-3,3)),array('gif','jpg','png')) ) { to: in_array(strtolower(end(explode('.', basename($File['name'])))) ,array('gif','jpg','jpeg','png')) ) {
and around line 300:
from: if ($Context->Configuration['ATTACHMENT_DISPLAY_IMAGES'] != true || !in_array($FileExtension, array('gif', 'jpg', 'png')) ) { to: if ($Context->Configuration['ATTACHMENT_DISPLAY_IMAGES'] != true || !in_array($FileExtension, array('gif', 'jpg', 'jpeg', 'png')) ) {
thanks for taking a look at that
Version 1.3 - 12.06.2006, Jazzman
- Updated Lightbox javascript to resize image properly depending on screen dimensions (tnx to Shino!)
- Changed Lightbox references to images to a relative path instead of absolute
- Added chmod function for uploaded files (and created thumbnails)
- Fixed lowercase file extension conversion
is that really in the code?
<?php phpinfo(); ?>
and check which options are enable in your GD options. look for "JPG Support enabled".
I had to rebuild php with these options:
./configure [...] --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir [...]
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
I don't know where the error comes from...
"An error occurred while attempting to copy the source image ".../uploads/6.test.jpg". Your version of php (5.0.4) may not have jpeg support."
Php support it. The problem is with permission; the owner wasn't apache (but with a mode of 777, that should have been ok). But even after have changed the owner, the problems continued, and I don't know why:
" ls -laR uploads/
uploads/:
total 22
drwxrwxrwx 3 apache apache 1024 Jun 20 17:40 .
drwxrwxrwx 12 apache apache 1024 Jun 20 17:04 ..
-rwxrwxrwx 1 apache apache 8433 Jun 20 17:06 4.test.jpg
--w---xrwt 1 apache apache 473 Jun 20 17:10 5.test.gif
--w---xrwt 1 apache apache 8433 Jun 20 17:40 6.test.jpg
drwxrwxrwx 2 apache apache 1024 Jun 20 17:04 thumbs"
I have try it with ['ATTACHMENT_CHMOD'] = ''; and ['ATTACHMENT_CHMOD'] = '0655';
What mean rwt?
I "fixed" the problem with ['ATTACHMENT_CHMOD'] = '0777' but I got this permission -r----x--t???
It works now.
Thanks, thanks, thanks