More AJAX for NextGEN Gallery

When I review the questions in the forum , I can see that still the biggest problems is caused by the memory limit. It’s annoying that the create thumbnail process stopped or failed very often. I did my best to catch the problem, but as you can see from the 1&1 problem, I’m helpless when the script didn’t get the correct result from the web server.

For Version 1.00 I introduce a new AJAX based solution. Instead to process the thumbnail operation for all images via the PHP script ,I used a AJAX solution which submit each thumbnail step by step. This will ensure that the main script not suddenly stopped by a fatal error or warning. Here are some pro’s and con’s about my new solution :

Pro 

  • A fatal error (memory_limit) will not break the main script
  • I can show up any error message as inline message
  • It will only in strange cases hit the “Max Script Execute Time”
  • Therefore I can combine different server intensive operation (thumbnails, resize, set watermark ) 

Contra

  • Require much more time
  • More database queries during the process

I uploaded this changes now to my GoogleCode project, if somebody is interested for testing , go and get the trunk code. It also contain now the new ImageMagick support (Thanks to the help of Frederic De Ranter). Please note that the trunk is fresh alpha build : not tested, not reviewed and nothing for a live blog system !

Advertisements
Tagged , , ,

30 thoughts on “More AJAX for NextGEN Gallery

  1. Mike Brisk says:

    Does this is mean in the future there will be Ajax pagination for the galleries? Or is this just ajax for the admin areas. We are wondering here at iphonepixels.com if we will be able to go through gallery pages without the page reloading.

    Thanks for the great work so far!!

  2. alex.rabe says:

    Mike,

    it’s not about pagination. It’s about the batch process when NextGEN Gallery creates the thumbnails. I done a lot of testing for the best solution and this procedure should be the best mix IMHO…

  3. onlinebisnes says:

    How I want to make the album page pagination?

    eg. look at this page : http://www.celebase.com/celebrity-gallery <- (not my site).

    can I make similar album page with max 20 gallery on it? The rest will be on the next page (max 20 gallery per-page).

  4. Tom says:

    Hi Alex,

    first let me thank you for your fantastic gallery Plugin. 🙂

    If noticed that the Slideshow Plugin is using the full sized pics to display them in a scaled down version, but therefore the pics are still very large and they are causing a lot of traffic for the site.

    Is it possible to use scaled down thumbnails for the slideshow?

    Thank you and cheers

    Tom

  5. Hi Alex,

    Great plugin and a suggestion. Can you make it an option to ajax the uploads? Can you make it so you can set how many to process at once? I only have a problem with it hanging or timing out when I try and upload more then 50 at a time. If I could set it to upload 200 in groups of 25 that would be the best of both worlds. No timeouts and cut down on the processing time and server load. What do you think?

  6. alex.rabe says:

    I cannot control the upload speed, I can only control the batch process

  7. Technique says:

    Hi Alex

    After about 10 months of trying to figure out why your plugin wouldn’t upload pics on my server I finally realised it was because of my 1and1 hosting using php4 rather than 5. And now I’ve finally got the thing working (today!) I see that 1and1 is causing yet another problem with batch uploading that you mention recently.. It seems like 1and1 just doesn’t want me to use your great plugin!!

    Never-the-less I still am going to take a little time to re-aquaint myself with the plugin as it is the business.

    Keep up the good work!!

  8. anakrantau says:

    There is sample here that show WordPress Nextgen album page :- http://nextgen.boelinger.com/album/

    tag that I use to show the album on page is [album=id,compact].

    but when my gallery on the album page have more than hundreds, it will show all the gallery on one page.
    How can I set the album page to have maximum gallery per page?

  9. Hi,

    i am using nextgen-gallery for a good friend of mine. She is using a single page to display an album of her images. dou you think it’s possible to get some breadcrumbs on the galleries, and the images? kind of | | PictureName where the user can click back to the album? 🙂

  10. “If noticed that the Slideshow Plugin is using the full sized pics to display them in a scaled down version, but therefore the pics are still very large and they are causing a lot of traffic for the site.

    Is it possible to use scaled down thumbnails for the slideshow?”

    This problem that Tom mentioned is the number one problem I have with NextGen. I want to have all my full resolution images stored online, but it is impossible when I am trying to run slideshows or even just have people browse through pictures because it is trying to load 2-4 MB per photo. It’s even worse if you try and use some of the NextGen plugins like Polaroid.

  11. telepieza says:

    NextGEN Gallery V.098 : the effect slide doesn’t work in the version wordpress 2.6.1

  12. The largest thing is still a good integration with WordPress comments for comment-per-image. 🙂

  13. dashdot says:

    Hi first thank youuu for the gallery it is the best of the best for me with a www full of images;
    if something is a mising feature it would be the NEXT button on the same spot; now it is shuffeling when going portrait-landscape and the visitor has to mouse to the next-button so if that one could be on a fixed spot i would be even more happy 🙂
    and maybe apply tag to all images in gallery?
    anyways a note of big thanks from me

  14. Max says:

    Has lots of bells and whistles but the only thing I wanted it to do was missing – use my Flickr account as a repository for the gallery. I don’t want to have to recreate my photo repository and take up space on my blog.

  15. Hello here I have the famous too memory bug in nextgen….
    I have to upload the resized images in thumbs manually….

    But is not to painful…

    The biggest bug /feature that I want is the possibility
    to have a go back/up button in album view

    And yes, a folder structure can be more simple to use…
    without album/categories

    Thanks for your good plugin and if I can help…

    For now I think that I can beta test the ajax part…

    Nicola Lunghi

  16. rounak says:

    hello alex this is a mind blowing plug in im simply loving it
    also i will make some donation very soon, but i wanted to ask that is it possible to open those gallary images in new window with google adds ?

    once again Thanks for great plug in

  17. Alessandro says:

    Hi, i used your new gallery 1.00 and i’ve same error of memory… required 49.08 and i have limit to 32.

    😦

  18. alex.rabe says:

    @Alessandro
    My new AJAX solution will NOT fix a memory limit, it will not break the batch process…nothing more or less

  19. Alessandro says:

    Then i cant use a image that use many memory i think i cant use image superior to 300kb of size. i upped 3.2mb photo and it show memory limit problem 😦

    The problem is creating thumnail, then therisnt a solution 😦

  20. Michael Collins says:

    Alex,

    First and foremost: thank you! NGG is — in itself — a piece of art.

    That being said, what do you think the possibility would be of incorporating TanTan’s Amazon S3 layer into NGG to actually host the galleries using Amazon.com’s Simple Storage Service?

    I’d be more than willing to help fund your effort for including this support in if you give me an idea about how much it’d cost. I’m sure many others would benefit from this as well!

    Thanks again,

    Michael Collins

  21. alex.rabe says:

    @Michael

    I’m open for such a integration and the support for S3. I will have a look into it after V1.00 will be released… based on the donations it can be speed up 🙂

  22. I need help for istall Plugin Gallery in my site!
    Is possible send for me Tutorial?
    Regards!

  23. sweeboo says:

    wow it uses ImageMagick. remind me of drupal when using the ImageMagick support, it performs very quicky and yet uses small amount of memory, it also maintain the Image Quality.

    great work alex

  24. R. Jonna says:

    Hello Alex,

    Thank you for supporting imagemagick. I have a problem, however: After using macports to install imagemagick and confirming that it is working, I cannot get nextgen to find imagemagick. I feel like I have tried every path imaginable. Macports installs image magick in opt/local/bin. But this path does not work so I am not sure what nextgen is actually looking for when it says “Path to library”. I also tried opt/local/lib and variations on opt/local/include/ImageMagick/magick/. Please help!

    Thanks,

    jonna

  25. Benito says:

    Man! Is there no good tutorial online for integrating NGG with Yoast Breadcrumbs? The navigation within galleries is the BIGGEST issue with this plugin (however amazing it is). Seems like such a basic feature to omit.

    Anyone have any luck with Yoast or other solutions? I’m running on Thesis+Wordpress framework.

  26. Freddy says:

    I was searching everywhere for a breadcrumb plugin that would work with NGG. I couldn’t find anything so I just inserted some PHP into the gallery.php file.

    Benito, it might not be exactly what you’re looking for, but this is what I’m using and it works.

    You Are Here: <a href="/”>Home -> <a href="/gallery”>Gallery -> title ?>

    I placed this code right about the ngg-galleryoverview div.

    Hope that helps.

  27. Freddy says:

    The PHP was stripped out of my last comment. Sorry. Email me if you want me to send it to you.

  28. Dave says:

    Freddy, I’d like to see your breadcrumb code…not sure how to email you though? Thanks in advance.

  29. Birks says:

    Hello, I found this post after pleading for help on the WordPress forum. I too am a bit stumped on what to do for breadcrumbs and also social bookmarking when displaying images on a page rather than using fancy ajax techniques.

    I don’t think it’s unreasonable for users to want to share an image on Facebook, Twitter etc. but because the querystring isn’t appended the link to the entire gallery is used.

    I can’t get the sidebar widget to link to an image page rather than just the jpg either, which makes it a bit redundant, to me anyway.

    Real shame, as otherwise NextGen seems to be at the top of the pile of image galleries in WordPress. A friend has advised me to switch to Drupal, but I really don’t want to do that!

    Anyway, whinge over. Alex, if you could spare a few mins attention to this, I think it would perfect the plugin for those who want to have an old fashioned gallery without all the fancy stuff.

    Thanks!

  30. Daniel says:

    I’m at a loss too with allowing TanTan’s S3 to work with NGG. Any solutions found till date?

Comments are closed.

%d bloggers like this: