PDA

View Full Version : extensions


saint@t-og.net
02-14-2006, 12:11 PM
hi, currently you can't upload .bmp files to photoplog, does anyone know how I can make my gallery capable of doing this?

Please help :)

Nitro
02-14-2006, 01:14 PM
I am guessing you would need to make changes in upload.php edit.php and to the thumb creating function in functions.php.

As to exactly what code you would need to add I dont know, I would guess the thumb code would be the hardest element tho. ;)

saint@t-og.net
02-14-2006, 03:32 PM
yea, i think im guna have to look at it myself because noone else seems to know :S ty anyway

Morgan
02-14-2006, 04:02 PM
PhotoPlog Lite uses the GD library for image processing, but it is currently not possible to process BMP files using the GD library. Not sure why, but perhaps it is because BMP files tend to be rather large and might lend more to size and timeout issues. That said, you could edit files like Nitro suggests, using this:
Content visible to registered users only.
Instead of this:
Content visible to registered users only.
And using this:
Content visible to registered users only.
Instead of this:
Content visible to registered users only.
Though there is still the thumbs issue, where you could use width / height attributes to resize, but basically there would need to be some rewrite of the code, whether through the use of the ImageMagick program or custom BMP functions, to account for the lack of BMP support in the GD library.

saint@t-og.net
02-15-2006, 11:16 AM
i have already been through and changed

Content visible to registered users only.

to
Content visible to registered users only.
was there any reason it should be 6?

Also I changed
Content visible to registered users only.

To
Content visible to registered users only.

I was wondering, with bmp the file types are infact bitmap imamges where as jpg ones are jpeg and in the coding jpeg is used do you think that I need to put in

Content visible to registered users only.

At the moment with the edits I have made uploading 'bmp' doesnt work. (Says sorry: user bad file)

Cheers

Morgan
02-15-2006, 01:43 PM
Number 4 is for SWF files, number 6 is for BMP files. The bitmap MIME Type is image/bmp though there might be others:
Content visible to registered users only.
These changes alone won't get around the bigger issue: PhotoPlog Lite uses the GD library for image processing, but it is currently not possible to process BMP files using the GD library, so there would need to be some rewrite of the code, whether through the use of the ImageMagick program or custom BMP functions, to account for the lack of BMP support in the GD library.

ImageMagick binaries can be run via hell through the use of the exec function. Custom BMP functions are functions that would need to be created to handle BMP files. ImageMagick is probably preferable, but not every hosting account has ImageMagick or allows the exec function. For larger than large BMP files, custom BMP functions might be too slow to be of any real use.

Either way though, it is possible to upload BMP files but not with a quick edit here or there.

saint@t-og.net
02-15-2006, 02:00 PM
ok i have changed the 4 to 6 from my previous edits, ow instead of saying "bad file" it says "bad save"

Morgan
02-15-2006, 02:10 PM
That's because PhotoPlog Lite cannot make thumbs from BMP files, because PhotoPlog Lite uses the GD library for image processing, but it is currently not possible to process BMP files using the GD library, so there would need to be... ;)

saint@t-og.net
02-15-2006, 02:15 PM
ok, not to worry, im guna have to live with JPG's, its going to be hard trying to teach the gamers! they aren't too good with designs/ images. In your postbit you have a link to your gallery... Is this a released mod? If so where can i find this :) cheers. ty for the help

Morgan
02-15-2006, 02:31 PM
Think of the bandwidth you'll save using JPGs instead of BMPs. ;)

The gallery link (with count) in postbit is part of the pro version.

You can add a general link by using the following in postbit:
Content visible to registered users only.