PDA

View Full Version : vBPicGallery 10.0.5 Running on cpurigs.com


Pages : [1] 2 3 4

Greg
12-03-2007, 02:35 PM
This is what is covered in the release. You can test things out here. If I get some good feedback, I'll zip it up and release it.

Revision 10.0.5
modified vbpicgallery_viewgallery template so lightbox JS is not loaded if full size images for guests
is set to no in the acp settings.
modified vbpicgallery_imagebits template so lightbox JS is not loaded if full size images for guests
is set to no in the acp settings.
Edited vbpicgallery.php to optimize random home page photo query.
Changed how vbpgimage.php sends errors.
fixed bug in move2fs.php.
Added CSS to upload Iframe. Thanks wpwood3.
Added search feature that uses list template and list bit template.
Added search phrase to vbpicgallery_navbar template.
Modified images table with two indexes for search.
Modified upload filename handling in vbpgupload.php.
Updated all templates with proper xml <head> tags.
Fixed vbpgajax.php to properly delete images from files system on delete.
Changed submit button on edit gallery screen to read finished instead of submit.
New phrase added, vbpicgallery_finished.
added utility to removed orphaned images in file system not previously deleted properly. del-orphaned-images.php
Added utility to refresh data store for postbit links. user-id-ds-updt.php
Added new function to admin functions file in includes folder.
Added upload instructions to editgallery with new phrase.
Added server max upload size message to vbpgupload.php.
Enabled more error reporting in vbpgupload.php.
Added code to attempt to avoid php timeouts in vbpgupload.php.
Added code to use server max upload if vbpg settings are higher than allowed by the server in vbpgupload.php.
added img bbcode text to file description table on full size image display page.
Fixed vbpicgallery.php, vbpgajax.php and vbpgedit.php to output special chars correctly for pic descriptions.
Added JPG resampling code to vbpgupload.php to reduce image size of jpegs to suggested max target size by lowering quality setting.
Added bytecount field to vbpicgallery_images. INT(10);
Added filesize display to full size image wiew template vbpicgallery_popup.
Added content length and filename header output to image output in vbpgimage.php
Fixed resizing bug in vbpgupload.php that shorted the set dimensions 1px.


NEW PHRASES:
vbpicgallery_search_by_key_word
vbpicgallery_search_in
vbpicgallery_titles_only
vbpicgallery_description_only
vbpicgallery_matching_options
vbpicgallery_match_any_words
vbpicgallery_match_all_words
vbpicgallery_finished
vbpicgallery_server_upload_limit
setting_vbpgalljpg_title
setting_vbpgalljpg_desc
setting_vbpgresamplejpg_title
setting_vbpgresamplejpg_desc
setting_vbpgmintargetquality_title
setting_vbpgmintargetquality_desc
setting_vbpgtargetsize_title
setting_vbpgtargetsize_desc

NEW IMAGE:
closelabel.gif. Changed black X to Red X. Thanks wpwood3.

Updated December 5, 2007 1:30PM

wpwood3
12-03-2007, 04:58 PM
Did you give any thought to adding Sir William's hack (http://www.cpurigs.com/forums/showthread.php?t=3856) that automatically resizes and compresses images? That is really handy when most of your board members (like mine) are not computer savvy and don't have a clue how to compress jpeg's on their computer.

Greg
12-03-2007, 05:08 PM
The resizing is in there, but there is still a 2mb limit on uploads on most servers. So, if the photo is over 2mb, it's not uploading anyway it appears.

I'll take a quick look at how it is done and see if we can test differently so the existing resizer does what you need. I explained how to pull it off somewhere.

Greg
12-03-2007, 09:38 PM
More on auto file resizing....

You can upload a file up to what your server allows in a few settings.

1) php.ini memory_limit setting set to 32M
2) php.ini post_max_size setting 8M - this setting includes all of the form, not just the file uploaded.
3) php.ini upload_max_filesize setting 2M (usual default)

All you have to do to get the resizer working is to set a super high number in group permissions for vBPicGallery.

The above numbers are defaults except the memory_limit setting. That was at 16M and we upped it to 20, 24, and then 32 to get a 1.9meg file uploaded.

The uploaded file was 1.9MB, it's 22.3K after vBPicGallery resized it.

The uploaded file dimensions were 2816x2112 and it was reduced to 640x480 by vBPicGallery.

Large file resized automatically by vBPicGallery (http://www.cpurigs.com/forums/vbpicgallery.php?do=big&p=283)

It's in there and it works if your server is configured for the above settings or similar.

In any event, I took a good 4 hour look at the code which resuted in some changes and being able to detail uploading larger files. But, allowing 2M uploads will use bandwidth and lots of memory.

So, the max upload setting will be checked now. If it's higher than the server limit, we will use the server limit. If it's lower than the server limit, we will use that setting from group settings.

Remember, if your vbpg upload setting is lower than the server max, vbpg will still throw an error and reject the file. 2MB == 2048000 bytes or 2048x1024. PHP reports 2097152
bytes limit at 2M.

Greg
12-03-2007, 11:00 PM
One more thing, the uploads form is mostly redone. No more auto uploads. Members will click an "upload" button to submit images. The submit button to end your editing now reads "Finished" instead of submit which was confusing I was told.

I need folks to try out vBPicGallery here to see if there are any issues to be addressed before I post this code.

Thanks

dennisuello
12-04-2007, 01:11 AM
One more thing, the uploads form is mostly redone. No more auto uploads. Members will click upload to submit images. The submit button to end your editing now reads "Finished" instead of submit which was confusing I was told.

I need folks to try out vBPicGallery here to see if there are any issues to be addressed before I post this code.

Thanks
The upload form is much better. Thank you. When will this release be live?

Greg
12-04-2007, 02:07 AM
I'm about burnt out working on it. So, soon. Maybe tomorrow. I have to write instructions and stuff. I'm almost done.

basically, replace all files. Remove old product. Install New Product. Check settings.

The product didn't over write for me. Unless I missed checking the box. I dunno. That concerns me. But deleting the 10.0.4 product didn't mess up 10.0.5.

wpwood3
12-04-2007, 04:48 PM
Not to beat a dead horse but...

I have carefully reviewed your code in vbpgupload.php and the comments you posted above regarding auto image resizing.

There is a difference between the way you are risizing images and the concept in Sir William's hack.

You are resizing the height and width of the image to 640x480 or whatever and changing the jpeg quality to a fixed level of 75%. The filesize is whatever it is.

The hack takes your resized image and then uses class-jpegfit.php to adjust the jpeg quality anywhere from 0% to 100% to yield a filesize equal to or smaller than the vbpicgallerymaxfilesize.

This allows larger pictures to be displayed while limiting filesize.

Greg
12-04-2007, 06:16 PM
OK, I have looked at that code. To add similar code would not be difficult. All the mechanisms are there. However, what concerns me is image quality. I'll have to think on this one.

Done properly, it would have a dedicated "target" size in the APC that is global. This way, you can experiment. Obviously by looking at the loop, you can see where quality is compromised. With a global ACP setting, each webmaster could set a "target" that suits them.

A target of 25K may be attainable, but at what cost of quality?

I'll give this a serious look before posting 10.0.5. If I do it, it will be in the file with out loading a class. I'll copy that public domain logic and use our existing mechanisms.

wpwood3
12-04-2007, 06:25 PM
That seems reasonable to me. At least it gives the Webmaster the option to select filesize and quality limits.

I'm just so tired of dealing with members of my site who upload thumbnail sized images because they have no clue how to compress jpegs. Many give up and just link to photobucket or something similar rather than upload an image.

Greg
12-04-2007, 06:45 PM
Reasoning like that convinces me. My Biker members are not the most computer savvy, I give them credit for getting on to begin with. But resizing photos has not been received well.

I'll work on this tonight and see what's up. Of course you realize this is only on jpgs? But I think almost all cameras output jpg and most that would use gif and png would know how to handle images, yes? So this will solve a lot of problems it seems.

So, you'll get your wish. I hope. :p

wpwood3
12-04-2007, 06:52 PM
For a guy with no in his name, you're a reasonable fellow noppid. ;)

Greg
12-04-2007, 07:05 PM
It took a little bit to get back into coding. Now that I have it in my head fresh again, it was easier to wrap my head around.

It's a great idea and goes well with the new releases intention of being easier to upload.

Thanks for being so persistent. hehe

wpwood3
12-04-2007, 07:15 PM
I have a test server setup with 1600 images and 650 galleries or so. If you want me to test some code I'd be happy to do it.

wpwood3
12-04-2007, 07:30 PM
Just in case you need it, here's the latest jpegfit package from the author:

Greg
12-04-2007, 07:44 PM
Cool deal. They added a resizer before the resample. We are already resized by the time we will resample.

Thanks

wpwood3
12-04-2007, 07:49 PM
One more thought...

I don't see why a subroutine can't be added to convert any non-jpg images to jpg images before resizing. Your code does this already for the thumbnails. Why not do it for the full size pics? Save everything as a jpg. That way if someone wants to upload a png or a gif they still can.

imagecreatefrompng
imagecreatefromgif

Greg
12-04-2007, 07:58 PM
I just knew that was coming. I was looking at it too. But, I wounder how image fanatics would feel about losing their native formats?

The idea was as clear as a bell to me. I saw it too, but I balked.

Stick around if you can, I have the first part coded already.

wpwood3
12-04-2007, 08:09 PM
Will do...

The "fanatics" will keep a copy of their images. If they don't shame on them! As a webmaster, I don't think it's my responsibility to look after someone else's image files. I'm trying to run a website...not a master image respository.

I was just doing some reading in the GD imglib manual and the php manual.
It sounds like there is absolutely nothing to gain by setting jpg quality higher than 80%. The filesize gets bigger but the image quality is no better.

Greg
12-04-2007, 08:26 PM
Interesting observation. Look at the hack code again. It sends the image on a loop and determines the best number for the function imagejpeg( ) to be called with the optimal quality setting for the target file size, but the hack never calls it or passes then number to the function later. So, the image can be popped off 16 times and still nothing more than what vbpicgallery does, minus the specified 75 parameter, is done. I'm fixing it to actually work, so be patient.

One of my big concerns for the effort is the quality that will be lost when this works. That has not been a problem because the images are always near 75 quality even with the hack in place.

So, be prepared to be disapointed IMO. But hey, I'm the huckleberry coding it!. hehe