Lazy-K Gallery

Copyright 2006 Korey Atterberry

Description

The Lazy-K Gallery is a Wordpress plugin that tries to make creating a photo gallery on a website as easy as possible.  It is based on “Lazy Gallery” by Nicholas Bruun Jespersen.

Lazy-K Gallery allows a photo gallery to be embedded onto a Wordpress Page.  It doesn’t require complex configuration and relies on the user uploading image files manually into a folder structure (via FTP, etc.) instead of using a web interface.

Lazy-K Gallery offers the following features:

  • easy image uploading and management via FTP
  • integration into Wordpress as a true plugin
  • thumbnail and slide caching
  • ability to comment on each image or folder individually
  • optionally use Lightbox or Thickbox for displaying images
  • include a gallery on a Wordpress page or blog post
  • display just a portion of your gallery using “subgalleries”

For an example of Lazy-K Gallery in action, see my Example Gallery or any of these fine websites. You might also take a look at my FAQ page for more information an using Lazy-K Gallery. Need help? Take a look in the forums.

Download

The latest version of Lazy-K Gallery is 1.4. Download it with the link below:

If you’re upgrading from a version prior to 1.3, I’d recommend you visit the Cache Manager from the options page and rebuild your cached images. If you have any problems, drop me a line and I’ll help you out. Old versions and a list of changes can be found on the Version History page.

Basic Installation:

  1. Create a folder inside your Wordpress installation directory for your photos and upload them into whatever directory structure you want. You may need to change the permissions on that folder to 755.
  2. Copy the lazy-k-gallery.php file and the lazy-k-gallery folder into your Wordpress plugins directory (wp-content/plugins).
  3. Activate the Lazy-K Gallery plugin from the Admin Panel > Plugins screen.
  4. In Admin Panel > Options > Lazy-K Gallery, enter the root directory for your photos folder and modify the other settings if you want to.
  5. Hit the “Create Page” button. It will create a page for the gallery. You can edit it if you’d like to change the title, body, slug, etc.

Advanced Setup:

Once you’ve performed the basic steps above you should be ready to go. All of the steps below are optional.

Page creation

If the “Create Page” button doesn’t work, you can create the gallery page manually. Create a new Wordpress Page and enter the text <!–lazy-k-gallery–> where you want the photo gallery to appear.

Pre-creating slides and thumbnails

If you want to create your thumbnails and slides ahead right away, you can use the cache manager. If you don’t create these, the first time someone visits a folder within your gallery they will experience a delay.

Visit the Cache Manager from the options page. Check the “create” checkboxes to create all your thumbnails and slides. If you want to recreate existing thumbnails and slides, use the “delete” and “create” checkboxes.

Enable per-picture commenting

If you want to enable commenting on each image/folder individually, you will need to edit your comments template within your theme. Edit the following file within your Wordpress installation:

wp-content/themes/default/comments.php

If you are using a theme other than “default”, edit the file within that theme’s folder instead. You could also edit this file from your admin panel by choosing Presentation > Theme Editor > Comments.

You should have a couple of lines that look something like:


<!-- You can start editing here. -->

<?php if ($comments) : ?>

Put the following line between them:

<?php if (function_exists('lzk_filter_comments')) {$comments = lzk_filter_comments($comments);} ?>

If you have any problems with making that change, just send me a note and I’ll help edit your comments.php file.

Creating Subgalleries

A “subgallery” is just a subset of your full gallery, starting at a given directory. Using subgalleries, you can essentially have multiple galleries on one site. Also, you might use this feature to share just a portion of your gallery in a post or page. Let’s say you’ve uploaded a new folder to your gallery - you could include just that folder in a subgallery in a blog post.

To display a subgallery, create a post or page and include the following tag:

<!--lazy-k-gallery:subgallery=Animals-->

This tag will display a subgallery consisting of all your photos from the “Animals” folder in the root of your gallery.

Known Issues

  • In order to make per-picture commenting work, you have to edit the comment template in your theme. Hopefully Wordpress will add a hook for this filter in a future version.

These issues will be addressed in future releases.  Please leave any other suggestions using the comments form below.  Keep in mind the goal is to keep this plugin simple.  There are other gallery plugins available that are much more powerful than this one. I do have a list of planned improvements that I’m considering.

Acknowledgements

Thanks to…

  • Nicholas Bruun Jespersen for creating the original Lazy Gallery.
  • Marius Kroon and Will for helping work out the initial bugs
  • Mark Jaquith and “io_error” for help in coding the per-picture commenting
  • Paul Kimbrel for help setting up the Ajax stuff
  • Garrett Bartley for solving a problem with single quotes in file/folder names
  • Mike for help with dots in file names and replace underscores feature
  • Bent Graphics for testing help
  • Josip Medjumurac for help with integrating with Thickbox
  • Adeola Awoyemi, Tim Rowe and Sascha for finding and helping to correct some issues

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

174 Responses to “Lazy-K Gallery”

  1. war59312 Says:

    Hey,

    Thanks for this plug-in! :)

    First off, the user must chmod 777 the photos dir she/he creates for all the photos or the lazy-k-thumbs folder will not be created and therefore you phots will not show up at all.

    Secondly, your plug-in is NOT valid XHTML 1.0 Transitional. :(

    Because you do not add alt tages to each image. Perhaps the name of the image could be used for the alt tag for each image.

    So for example change line 286 to:

    echo ”;

    Also noticed the />’; at the end.

    Well, thanks a lot,

    Will

  2. Marc-Antoine Mouilleron Says:

    I followed the instructions, but my galery does not show up. I have a error message Fatal error: Call to undefined function: imagecreatefromjpeg().

  3. Korey Says:

    Thanks for the comments.

    Will, thanks the note on the XHTML spec. I’ll get that fixed ASAP. On the CHMOD for the folder, does it really have to be 777? I’ll look into that soon and add it to the instructions.

    Marc-Antoine, from what I understand, it sounds like you don’t have the GD graphics library (http://www.boutell.com/gd/) compiled into your PHP. I will look into displaying a meaningful message if it’s not available. I’ll also list that as a requirement in my plugin description.

  4. yuzefaron Says:

    hi,, is there any chance you make this great easy gallery commentable for every picture?

  5. Marius Says:

    Hi Korey,

    First of all kudo’s for all your work ! This gallery solution is really what I’m looking for. I have been posting images with my mobile to my website for some time now with postie and I want a gallery for all the pictures I posted in the past. K-Gallery seems to fit this perfectly !

    However.. (of course there is one :-) )

    I’m on a shared webhosting platform and I can’t get the configure screen to validate the default path in the configuration path. I tried pasting almost every relevant path I could find with the phpinfo(); command but to no result this far. Can you give any hints how the path is exactly resolved and what I can/should try ?

  6. Shindogu - total fusion » Korey’s Wordpress Plugin Site » Lazy-K Gallery Says:

    [...] I’m trying to get Korey’s Wordpress Plugin Lazy-K Gallery to work, but no success yet. The shared hosting platform shindogu.com is running on is not really cooperating.   « Mrs. Hirschi Ali doing shopping   Korey’s Wordpress Plugin Site » Lazy-K Gallery » [...]

  7. Korey Says:

    Marius- thanks for the feedback and sorry you’re having trouble. I’m on a shared platform as well. Here’s how mine is set up on my personal site. I have my wordpress installation in the home directory of my host (where they take me when I log in via FTP). There’s a subdirectory of “lazygallery” off of my home directory. I enter “/lazygallery/” as my path in the gallery options page, though it will add the slashes for you if you omit them.

    On the technical side, I build two paths:
    - the “gallery root”, which is the physical path on the disc, is built by concatenating $_SERVER['DOCUMENT_ROOT'] with the path from the options.
    - the “gallery address”, which is the mapped path referenced from the web root, is built by concatening “http://” with $_SERVER['HTTP_HOST'] and finally with the path from the options.

    Since you’re looking at the results of phpinfo(), maybe this will help.

    Drop me a line through the contact page if you get it to work, or definitely if you don’t so we can work on getting it set up properly for you. It could be that my host is atypical and this technique won’t work. I chose it because I didn’t want to constrain a user to having the gallery folder as a subfolder of the wordpress installation folder.

  8. Marius Says:

    Hey Korey, Thanks for the advice ! I got the whole thing working now ! A case of beer for you when you’re in the neighbourhood ! :-)

    It turned out that the configuration of my hostingprovider is very, very atypical. And that’s just saying things politically correct.. The document root that is set in lazy-k-gallery.php didn’t work for my configuration.

    First I tried out copying everything 1-on-1 to my MacMini. Suddenly it all worked fine right out of the box, in the same setup that didn’t work on the hostingprovider’s platform. So, quick conclusion was that there had to be something with the configuration of php at the hostingprovider. And that was a right conclusion.

    The $_SERVER['DOCUMENT_ROOT'] was pointing to a completely different location than my website is in. I replaced lines 174&175 with the path I could find in phpinfo(); .. Rigging that path mostly did the job for me. Next to that I commented out lines 517-526, just to prevent the error message in the admin screens.

    I’ll try to use $_SERVER['SCRIPT_FILENAME'] on line 174, perhaps that can solve the problem of an a-typical configuration of a shared webhosting platform. I will let you know if I succeed, and in the meantime I can finally check out all the pictures that where posted on my website by me and other people. Thank you very much for this wordpress plugin !

  9. Korey Says:

    Marius- Awesome! I’m glad you got it working. If you’d care to email me any details about what you did I can use them to make the next version better for those who don’t have your level of experience.

  10. Marius Says:

    Korey, I mailed you some info on a guessed email address on your domain. :-)

    Whoo.. now I’m off for a beer downtown. Good time to brag about my level of experience on php ;-)

  11. war59312 Says:

    Hey,

    Well, your making progress. ;)

    See:

    http://validator.w3.org/check?uri=http://www.war59312.com/my_gallery/

    Still one little tiny error. ;)

    Thanks,

    Will

  12. Rawiri Blundell Says:

    Great work! By far the simplest gallery plugin I’ve used yet. Keep it up :)

    A couple of queries though. In Firefox, the Prev and Next links don’t line up with the surrounding div. Is it possible to fix this in CSS? Something like text-align: center; if my memory serves correctly.. it’s been a while ;)

    The next and more important one is I have my gallery setup to be as simple as possible for the end users (ie extended family) so that when they are posting, they insert the image using WP2’s built in upload feature. I have configured this install of WP2 to upload to a sole directory (wp-content/uploads) and have lazy-k-gallery set to work in this directory.

    Unfortunately, the WP2 upload feature automatically generates thumbnails into wp-content/uploads alongside the full sized images. lazy-k-gallery then picks these up and dutifully creates its own thumbnails and slides. D’oh!

    I’ve been all over the wordpress support forums and it looks like it’s a bit too much work to hack wordpress and maintain that hack through future wordpress updates, so in a future version of LKGallery, can you enable the ability to ignore files with .thumbnail. in their name?

  13. Korey Says:

    Rawiri-

    Sure, that’d be easy to do. I’ll implement your suggestions soon. There’s already a mechanism in the program for ignoring some directories, so ignoring some file would be hard. Thanks for the suggestion.

  14. Erik Says:

    Thanks a lot for this awesome plugin! There’s one thing I’m missing though.. I’d like to display the folders in my sidebar instead of in a post.. Any chance something like this could get implemented?

  15. war59312 Says:

    Hey,

    he-he Nice one! :)

    Take Care,

    Will

  16. jonal Says:

    Nice work man!

    Simple and easy.. love it!

  17. Keith Says:

    I fixed the problem with the ‘prev’ and ‘next’ buttons being a line too low when viewed in Firefox by editing the php to remove the tag from the relevant line as follows:

    // display the next/prev links and the slide
    echo ”;

    echo ‘« Prev‘;

    echo ‘Next »

    Check my site gallery for an example.

    Thanks for a superb plugin btw.

  18. jayne d'Arcy Says:

    I cannot tell you how much I am glad to see this plugin. I have tried many of the more “sophisticated” ones and have come close to institutionalizing myself.

    This works, beautifully.

    One problem, and I’m not sure what caused it, that I had occurred when I tested the plugin on my test WP installation. This shares the same database as my main site, so I suspect that could be at the root of this problem.

    Anyway, when it worked successfully on the test site, I installed the plugin on my main site and could not make it work. In order to finally get it to work, I uninstalled the plugin and the directory and so on from the test site, uninstalled it from the main site, deactivated all the plugins on my main site and re-activated them, then I reinstalled the plugin. I set up the directory for the gallery, and created the page and it worked.

    I look forward to any and all updates you have.

  19. Thomas Says:

    I changed some functions in the plugin and wrote something new……. are you intrested in it, if yes mail me and i will post it to you

    sry for my bad english ;) I’m german

  20. ShinRa Says:

    Good work guys, for those that want to save disk space you can change this line:

    // the original file was already small enough, so save it as the cache file
    ===> imagejpeg($origimg, $cachefilefull );

    with this

    return $gallery_address.$img;

    By this way the gallery load images with width

  21. ShinRa Says:

    ? with width

  22. ShinRa Says:

    I’m sorry for 3 post, somethings wrong with the comments parser, with width minor of max-width without create any slide image

  23. Thomas Says:

    thanks i got it to work, but i noticed that it display errors with files ending in .JPG

  24. marcus Says:

    hey nice job…this is the 345th gallery plugin i’ve tried and looks like we’ve got a winner :-) there are some error messages on my page I have not been able to figure out just yet if someone can send me some feedback thru my contact page would be great…but will keep reading just in case

    error message as such:
    Warning: strstr(): Empty delimiter. in /home/studio/public_html/wp-content/plugins/lazy-k-gallery.php on line 296

  25. Korey Says:

    If anyone experiences the same problem as Marcus, with the “empty delimiter” error message, take a look if you have two commas in a row in the “excluded files” or folders setting. I’ll fix that issue in an upcoming version.

  26. Shaz Says:

    Lovin’ it! Have tried the original Lazy Gallery, Lazy Gallery Plus and Lazyest Gallery and all nearly drove me to killing myself but this one works perfectly! Kudos! Gracious! =D

  27. Rab Says:

    You are a savour!!

    That gallery script did a wonder and saved me alot of hassle!!

    Thank you very much!!

  28. _Ralp_ Says:

    how to show the gallery??

    and i have the error
    Fatal error: Call to undefined function add_filter() in /home/antipati/public_html/wp-ralp/lazy-k-gallery.php on line 61

  29. Robert Says:

    Hello and thanks for this plugin- it is exactly what I would have made if I had the skill:) I love it and it’s working well execpt for larger images. Is there a way I could keep this from happening:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2960 bytes) in /home/virtual/site33/fst/var/www/html/wp-content/plugins/lazy-k-gallery.php on line 420

    Any help would be appreciated.

    Cheers,
    Rob

  30. Korey Says:

    Rob- I wish I had a better answer, but it sounds like your host isn’t allowing you much memory usage… Line 420 is attempting to open your image file to create a slide or thumbnail version of your image. One workaround would be to scale your original images down before uploading them (obviously), or you could create the thumbnail and slide files for those larger files manually.

    If you want to do that, just resize your files to your slide size (using your favorite image editor) and put them into the “lazy-k-slides” subfolder. Resize each file again to your thumbnail and put them into the “lazy-k-thumbs” folder.

    If these cache files already exist, Lazy-K Gallery won’t try to load the original image files. Sorry it’s not working for you. I’ll look into alternate ways of resizing the images.

  31. Robert Says:

    Thanks for the help Korey- i’ll try your suggestion and report back.

    Take care,

    Rob

  32. Jon Says:

    hey.. I really like your plugin, and I’m using it now.

    http://jonindie.com/gallery/

    I don’t know if you have time or not, but if you could do an update sometime and add the ability for comments, I would love you.

    this plugin is very easily integrated into wordpress.. and exactly what i’m looking for.. the only thing it’s missing is the comments.

  33. marcus Says:

    still have not been able to figure out that problem on my site…but am beginning to believe it may have something to do with the theme…cause i tried it on two sites with the same theme and both have the same error…just tried it on a new site and theme http://itawe.com/?page_id=9 and it is working like a champ…looks like am going to have to change my theme

  34. Jim Says:

    I, like others, have tried many gallery plugins. Plogger is the one that really looks good. However, your simplistic version of Lazy Gallery is great. It works fine for me except for one problem. I use another plugin called zap_imgpop to pop up an image I click on in a separate window. It’s comparable to the lightboxjs plugin. When I click on the thumbnail, it tries to open the file in the new window, but can’t.

    Is there any way around this other than deactivating the imgpop plugin?

    Thanks, jim

  35. Jim Says:

    Sorry for the previous email, but I did figure out how to resolve the problem. Zap_imgpop looks for “a href=” in the tag and then pops up the image in a window. I looked for these references in your script and changed them by putting a space between the href and the “=” sign. This tells zap_imgpop not to display it in a popup window.

  36. lsm0d Says:

    HI, Do you think is possible, to make a version with commets in each picture ? thanks for read it!

  37. Aya Says:

    Korey, this is great. Thanks a lot for your hard work~ :D

  38. Will Says:

    Hey,

    What would be sweet is if Lightbox support where added.

    That is when displaying the full image, use the Lightbox plug-in.

    That would kick ass!

    BTW the Lightbox plug-in is here:

    http://www.m3nt0r.de/blog/lightbox-wordpress-plugin/

    Thanks,

    Will

  39. Robert Says:

    Hello Korey - I figured out what I was doing wrong. I was uploading images that were bigger than the size specified on the options page.

    I was getting this:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2960 bytes) in /home/virtual/site33/fst/var/www/html/wp-content/plugins/lazy-k-gallery.php on line 420

    The options page has the dimension for the large images at 400×400 px, so when I cropped my images to 400×400 everything was cool.

    No more error message! I think I needed some coffee that day.

    Thanx again for the awesome plugin.

  40. Korey Says:

    Robert- you weren’t doing anything wrong. The program is supposed to resize both to your “slide” size (i.e. 400×400) and to the thumbnail size. It still looks in your case like it’s a memory constraint imposed by your host. However, I’m sure your workaround is valid for those in your position!

  41. scott mcdaniel Says:

    Hi Korey! First, thanks for the wonderfully simple and easy to use gallery. It’s a godsend after dealing with some of the bizarre implementations currently out there!

    I wanted to show you how I was using your plugin:
    http://scottmcdaniel.org/w/gallery

    I added lightbox support by simply adding rel=”lightbox” to line 273 of lazy-k-gallery.php. So far, so good!

    Thanks again…really appreciate the great work youve done.

  42. Korey Says:

    Thanks a lot Scott. I’ll look into the Lightbox integration - that would be a pretty good fit with this gallery plugin. I like how it works on your site, though it doesn’t seem to work with IE for me. I’ll admit I haven’t messed with Lightbox much but it seems to be popular.

  43. Will Says:

    Sweet thanks scott. :)

  44. Thomas Says:

    yeahhh, can’t get the comment thing to work with the Rin theme.

  45. Korey Says:

    A solution to Thomas’s problem can now be found on the FAQ page. Some themes are not entirely compliant and need a little tweaking.

  46. Dany Says:

    Hi there!

    Great Script you made - congrats!!!

    But I got the problem, that when I call a photo from my gallery, the page turns dark and somewhat spinning appears. Is this a bug or some limitation in our script?

    Maybe you could have a look and mail me or leave a comment on my page.

    Dany

  47. Korey Says:

    Dany- What you’re seeing is the Lightbox script. I’m assuming you had to install that script, so you shouldn’t be too surprised by the spinning icon! :) If you want to disable that functionality from within Lazy-K Gallery, just uncheck the “Use Lightbox JS” box.

  48. Will Says:

    Hey,

    Nice update! :)

    But, I am having trouble getting the comments system setup.

    See:

    http://www.war59312.com/my_gallery/

    As you can see the comment is just for the page. Odd that it says there are zero though. Anyways, I added the code like it says in the readme to comments.php but it does nothing. No code is generated. Meaning the functioin does not exist, appariently.

    Also, in admin cp and viewing soure there is no lazy comment showing which one the comment was for.

    So something is up.

    Any ideas?

    Thanks,

    Will

  49. jasmine Says:

    I have read the features of this plugin and I’m greatly interested in using it. Though, I have one thing to ask… does this support remote / direct linking? I’m asking this due to bandwidth issues. I have my images stored in an image server but I would like to integrate them to my blog. Does this script support that?

    Hope to hear from you soon and Thanks!

    More power! :D

    ~ Jasmine

  50. Korey Says:

    Jasmine- in this plugin, all of your files must reside in a directory inside of your Wordpress installation. We might be able to come up with something if you resize the photos yourself, but the gallery can’t resize and save files stored on a remote server (we need to do that for the thumbnails and slides). I’ll let you know if I come up with something.

  51. Akane Says:

    Uninstall? Sorry if this is a stupid question. I can’t change permissions or delete the slides/thumbs folders.

  52. Nikolai Says:

    i have some problems with my Next buttons and stuff.

    http://www.bufo.dk/?page_id=16&lzkfile=DSC00961.JPG

    can you help me with that? :)

  53. Alamo Bill Says:

    Korey,

    When I post the code on a page, I get a string of errors in the following pattern.

    Warning: imagejpeg(): Unable to open
    ‘/hsphere/local/home/alamobil/randolphcofc.org/web/wp-content/uploads/gallery/./lazy-k-thumbs/GIBBS.jpg’
    for writing in /hsphere/local/home/alamobil/randolphcofc.org/web/wp-content/plugins/lazy-k-gallery.php on line 473

    I’ve got the options configured correctly, but I can’t figure out where the dot “.” comes from in the first string between “gallery” and “lazy-k-thumbs.

    I think it would word if I could get rid of the dot.

    Thanks,

    bill b

  54. JetShack Says:

    Excellent Plugin.

    Works better than I ever could have hoped for!

  55. JR Says:

    Wonderful! Thanks! So darn easy.

  56. Eluthria Says:

    Hi folks,

    Firstly thankyou for such a wonderful plugin, very impressive stuff.

    I found the plugin defaults worked well however I’m having difficulty getting the lightbox function of Lazy-K Gallery to work.

    I have tried many different versions of ‘lightbox for wordpress’ and received mix results with all. At the moment the latest version from: http://zeo.unic.net.my/2006/03/29/lightbox-js-version-20/ seems the most encouraging.

    The problem I am having is that when I click on a picture in my Lazy-K Gallery the overlay and spinning image logo appear but the actual image never loads; just the spinning logo.

    In order to test that lightbox is working correctly I made a post using a standard href link (http://web.com/images/cat.jpg) and that worked successfully - the overlay appeared, the spinning logo came up and then the image appeared as expected. I then tried modifying my href link to include some php in the address (like it is in the Lazy-K Gallery - http://web.com/index.php/images/?lzkfile=cat.jpg) and the image failed to work as described above.

    It seems that unless you are using a direct link to the image the lightbox function will not work correctly. Has anyone else experienced this? Does anyone know of any work arounds? Has anyone actually got this working and if so which versions of lightbox and Lazy-K?

    - Eluthria

    Windows 2003, IIS 6.0, PHP 5.1.4, MySQL 5.0.21, Wordpress 2.0.2, Lazy-K Gallery 1.1.1, Lightbox JS 2.02 for Wordpress

  57. Eluthria Says:

    Hi again folks,

    I’m pleased to report that I have managed to get Lazy-K Gallery working with Lightbox JS 2. Unfortunately though I was unable to get the two working ‘out of the box’ so to speak. Working from memory here is the list of changes I made to get the two working in my environment.

    ===========================
    1. Downloaded and activated Lazy-K Gallery 1.1.1 as per documentation

    2. Downloaded Lightbox JS 2.02 from - http://www.huddletogether.com/projects/lightbox2/

    3. Created a directory ‘lightbox’ at the root level of my website and unpacked the lightbox zip file here

    4. Edited the lightbox.css file and added /lightbox/ to correct the path for the three image references here

    5. Edited the lightbox.js file and added /lightbox/ to correct the path for the four image references here

    6. Edited the header.php file for my Wordpress theme to include the following lines within the area -

    7. Edited the lazy-k-gallery.php file. Replaced line 336 (this is near the string “foreach($imgfiles as $img)”) with the following -

    echo ‘‘;

    ===========================

    The changes in step 7 force the lightbox activation tags to be inserted after each image (In my environment I found that the Lightbox activation checkbox in the Lazy-K Gallery options did not work for me). The other nice feature of this change is that it adds the current directory within square brackets after ‘rel=”lightbox’ to enable the next and previous navigation options that were included in Lightbox JS 2.

    I hope this is of help to you all.

    - Eluthria

    Windows 2003, IIS 6.0, PHP 5.1.4, MySQL 5.0.21, Wordpress 2.0.2, Lazy-K Gallery 1.1.1, Lightbox JS 2.02 for Wordpress

  58. Eluthria Says:

    Hmmm… step 7 didn’t come out so well… Let’s try again:

    7. Edited the lazy-k-gallery.php file. Replaced line 336 (this is near the string “foreach($imgfiles as $img)”) with the following -

    ===echo ‘‘;===

    Note: You will need to remove the === tags

    - Eluthria

    Windows 2003, IIS 6.0, PHP 5.1.4, MySQL 5.0.21, Wordpress 2.0.2, Lazy-K Gallery 1.1.1, Lightbox JS 2.02 for Wordpress

  59. Eluthria Says:

    Okay Wordpress offically hates me. Hopefully a moderator can fix this mess up.

    For now here is an image with the correct code:

    lazy-k_code.jpg

    NOTE: This image won’t be hosted for long

    - Eluthria

    Windows 2003, IIS 6.0, PHP 5.1.4, MySQL 5.0.21, Wordpress 2.0.2, Lazy-K Gallery 1.1.1, Lightbox JS 2.02 for Wordpress

  60. Korey Says:

    Eluthria-

    I haven’t quite made sense of what you’re trying to accomplish or what problem you’re experiencing, and since you didn’t use a valid email address this is the only way I can ask for clarification.

    For all readers, the version of the Wordpress Lightbox plugin I’m using can be found at http://www.m3nt0r.de/blog/lightbox-wordpress-plugin/

    Also, it seems from your comments that you’re expecting the plugin to behave differently than designed (please clarify if I misunderstand). It looks like you modified your code to use lightbox when clicking on a thumbnail. I didn’t set it up that way out of the box. I have it so that when you click on the SLIDE (i.e. the 400ish pixel view) that it uses lightbox to display the full res version. Your approach is a good idea but not what I did. I’ll consider adding that as an option in future versions.

    Korey

  61. Eluthria Says:

    Hi Korey,

    Thanks for the reply and a fantastic plug-in!

    You’re spot on the money, I was under the assumption that Lazy-K would use the lightbox function directly from the thumbnails, my mistake =P

    Anyway having Lazy-K Gallery working with Lightbox from the thumbnail gallery is just what I have done. Some example photos on my website are here:
    http://eluthria.homeip.net/index.php/public-photos/?lzkfile=Flowers%2F

    - Eluthria

    Windows 2003, IIS 6.0, PHP 5.1.4, MySQL 5.0.21, Wordpress 2.0.2, Lazy-K Gallery 1.1.1, Lightbox JS 2.02 for Wordpress

  62. Will Says:

    Hey,

    Well buddy, still trying to figure out my issue. ;)

    Perhaps you could test with what we had talked about and perhaps you could check this out:

    http://frenchfragfactory.net/ozh/my-projects/wordpress-hooks-filter-flow/

    Perhaps you could see if any of your hooks are causing problems with other plug-ins. Just an idea. BTW that would be great if you could come up with a list so I can check against mine. I am probably blind atm and cant tell. lol

    Take Care,

    Will

  63. Radek Says:

    Is there any way how to display only specific galleri in a POST? Not after clicking on it on a gallery page, but after opening a post with a “more” tag.

  64. Korey Says:

    I haven’t really mentioned it before, but you can in fact put the gallery in a post as well as on a page. I don’t think you can do exactly what you want, if I understand correctly, but you can provide a link to a subdirectory within the gallery by just navigating to that directory and using that URL. I often do that on my blog- write a post about a trip and provide a link to that folder of pictures in the gallery.

  65. Spencer Says:

    All my gallery is working thanks so much this is a great program.
    One thing to ask thought my gallery is not actaully working it says that I am viewing a certain album but then it doesnt actaully display on the screen? What am I doing wrong?
    Please email me to help me out thanks loads. I love this plugin its so easy to use and doesnt take up loads of time like other plugin configs!

    Spencer,

  66. SPrinter Says:

    I have installed it succesfully. Thanks for the nice script.

    However, is it possible to add more then 1 gallery? At this moment i can copy on a page. But i want to add new second gallery in another folder with photo’s. Can i for instance write a page wich links to ?

    If so, please sent me a link or how to within this post or to my mailaddress.

    Thanks in advance.

  67. Fred Says:

    Hi
    thanks for plugin, i use on my site.
    It is possible to put the name of picture view on tittle of the page ?
    Thanks

  68. Korey Says:

    Fred, if you’re talking about putting a heading on the Wordpress Page, that’d be easy. A simple “echo” statement in lzk_showSlide would easily do what you want.

    If you’re talking about changing the title of the HTML page, that’s a little more tricky but could be done, starting in WP 2.0. It would require adding a filter to the wp_title hook, using something like add_filter(’wp_title’, ‘function_name’);

    Those changes are really high on my list, since I’m not sure they’re for everyone, but if you’d like to email me offline I could probably help you implement the changes for your own use. However, if you folks want this functionality, let your voice be heard and I’ll put it on my list.

  69. Fred Says:

    Sorry for my english and thanks for your answers.
    Yes is in HTML page title i would see the title of picture, is for statistiques, how many time this or this pictures have be seen.
    I use WP 2.0.2 and i try to modify the balise on my index.php’s theme (eg )
    It’s easy to make this change or not easy ?

    Thanks a lot.

  70. Fred Says:

    sorry any words are not on message:
    Of cours in index.php is title ‘balise’ i try to modify
    eg

  71. SWeetheart the Clown Says:

    I am using your wonderful plugin, lazy-k gallery at my site, under photos and more photos on the side bar.

    Is it possible to specify a directory, not on the same host, to ‘”get” pictures from? For examply, I want to host my photos on another url, http://www.cableonyourpc.com/photos instead of wp-content/uploads/Photos on my own site. I am running out of space on this hosting solution, and it doesnt have options to increase. :(

    Can you help?

    Thank you!

  72. Korey Says:

    Nope - sorry. The photos have to be on the same host. Actually, they have to be under the Wordpress directory as well. The problem with hosting the images on another server is that my scripts can’t get a list of the files nor can they resize them remotely.

  73. tweeky Says:

    Not working.. still it says: You don’t have permission to access /gallery/ on this server. Dont know where the problem is =(

  74. Lu Says:

    THANKS A LOT for this plugin!!!! It’s the best plugin for photo gallery ever! Easy, beautiful, AND the comments can be used as subtitles - something I wanted so much!
    Still working on it, when I finish to make the adjusts I send to you a link to my gallery. BTW, it’s so cool your page with the links to the sites that use the plugin, so we can see how it woks before installation, in several ways.
    Congrats! :)

    PS.: the permission required is really 755, not 777 (tks God for that, my server doesn’t allow 777).

  75. war59312 Says:

    Hey,

    There is just a issue when using Lightbox JS version 2.0:

    http://zeo.unic.net.my/notes/lightbox-js-version-20/

    You can not view any of the images since it tries to use it on every image, that is on every gallery page.

    See what I mean here:

    http://www.war59312.com/gallery/

    OH and even if you have the option to enable lightbox js disabled, it still uses it.

    Perhaps you could update the plugin to work with this new version.

    Thanks,

    Will

  76. war59312 Says:

    Oh I am blind some times. ;)

    Eluthria works fine, though there are no captions. Perhaps the name of the image should be. Captions of course being the title tag. Eluthria did you happen to add that as well?

  77. war59312 Says:

    Shoot, forgot folders, sorry. lol

    Here:

    http://img111.imageshack.us/img111/1686/screeny9kp.png

  78. David Says:

    Hi Korey,

    I tried your plugin and so far the gallery works fine. But I still have problems with the comments feature. I’d be grateful if you could help me on this. When you say “Put the following line between them”, do you mean like this?

    If so, it doesn’t work. I’d appreciate any help =)

  79. David Says:

    Ugh, never mind, I figured it out. Stupid me >

  80. war59312 Says:

    BTW cpanel reports:

    [Sun Jun 18 19:18:00 2006] [error] PHP Warning: strstr(): Empty delimiter. in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery.php on line 319

  81. Catherine Says:

    I just installed this and it’s working wonderfully! Check it out at http://cathcoll.net/photos if you want to take a look. Comments, by the way, are deliberately NOT enabled.

    Of course, just because they’re always there, I do have some comments and wish list items:I get access errors when I use 755.It would be nice if captions could be included somewhere.It’d be possible to have comments on just the photo pages and not on other pages by using a custom template for the photo page á la the instructions on the http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates page.I wish there were a way to call the directory list from outside the gallery. There’s a comment above about listing the directory in the sidebar, which is essentially the same as I’m talking about (although I’m wanting to do it from my front page) but I didn’t see a response.Thanks again for such a wonderful plugin! It’s been a cinch so far.

  82. Korey Says:

    War59312 (Will)-

    I have investigated the incompatiblity between the WP Lightbox JS plugin from http://zeo.unic.net.my/notes/wp-lightbox-js-wordpress-plugin/ and found that the way that plugin attempts to automatically use Lightbox for image links gets confused by the links from the thumbnails. I’m not aware of anything I can do on my side, but I have contacted the author of the plugin to see what we can do.

    On the other hand, the Lightbox 2 from http://www.m3nt0r.de/blog/lightbox-wordpress-plugin/, as you recommended earlier, works just fine with Lazy-K Gallery.

    Thanks for the report. I’ve added this information to the FAQ.

  83. Korey Says:

    Catherine- Thanks for all the feedback. I’ll try to address each item.

    Adding captions, and adding the directory list to the sidebar… Captions is the next thing on my list of challenges, and I think I’ve got an idea how to do the sidebar stuff. Stay tuned, until I find a little more time to work on the plugin, that is!

    Regarding the custom page template… unless I’m missing something, I don’t think that is going to work. The problem is, each “page” in Lazy-K Gallery is just different content on that same Wordpress “Page”. If you have more information, please let me know.

    Thanks again,
    Korey

  84. Catherine Says:

    Korey,

    I’m sorry, I should have made myself more clear. I’m referring to allowing comments on the entire photo gallery, but not allowing them on other pages such as an about page. In other words, I would think that using the custom template would allow someone to enable comments on the gallery but not on any of the other static pages.

  85. Korey Says:

    Catherine-

    You’re absolutely correct. I realize I misunderstood your original comment (I’ve had a number of requests to do what I was talking about). I’ll add that piece of information to the FAQ. There’s also a “Allow Comments” checkbox on the Write Page screen that can “close” the comments for a given page, but in most themes, it shows “Comments are closed” rather than nothing at all.

  86. war59312 Says:

    Hey,

    Sweet, a new build! :)

    Thanks again,

    Will

  87. Vince Says:

    Hi there i love this plugin.. but in firefox my thumbnails are like 1×1 pixel :S can someone please help.. example:

    http://www.vinzz.nl/?page_id=5&lzkfile=Londen%2F

  88. Korey Says:

    Vince-

    I took a look at your site for you. For anyone, like Vince, using the K2Reloaded theme, there’s a rule in the CSS for that theme that is causing some problems.

    Take a look at the rule for “.primary img”. If you remove the “max-width: 100%” style, the problem goes away. I think that code is designed to shrink oversized images in your posts to fit into the content portion of your page. Unfortunately, it’s also shrinking your thumbnails to fit into those little gray boxes I contain them in.

    I’ll take a look to see if there’s anything I can do on this end, but that rule is pretty strict and would likely have adverse affects on images in many circumstances.

    Korey

  89. Korey Says:

    Vince (and anyone else using the K2 Reloaded theme).

    Here’s a way to make my gallery’s stylesheet override the K2 Reloaded theme just for inside the gallery. This conflict affects version 1.2 and 1.3. I’ll try to solve the issue for the next version, but in the mean time, here’s a workaround.

    Edit the lazy-k-gallery.css file and look for the style for #gallery div.thumbs img. Inside that block, you’ll likely see a margin property and a padding property. Add the following line inside the braces:

    max-width: 200px;

    You should probably replace the 200 with whatever width you set your thumbnails to be.

    That should take care of the issue. Let me know how it goes.

  90. Vince Says:

    Works like a charm thanks again :)

  91. war59312 Says:

    Um, any way to fix the Empty delimiter warning?

  92. war59312 Says:

    Hey,

    Sadly the cache manager is not working.

    Even though WP reports that it does:

    Current progress:
    Finished!
    Processed 3 out of 3 images. 0 errors
    ../wp-content/plugins/lazy-k-gallery/lazy-k-gallery-thumbs.php?deletethumbs=true &deleteslides=true&createthumbs=true& createslides=true&file=NeowinShift01BST/11.PNG
    Last Results:
    OK
    Processed: NeowinShift01BST/11.PNG
    Deleting thumbnail…Success!
    Deleting slides…Success!
    Creating thumbnail.
    Creating slides.

    All the images are the same. I am trying to delete all old ones and rebuild the new ones because it is not working at all. I can not delete the files myself using ftp nor cpanel. :( Just get a access denied error. :(

    See this is what cpanel error log shows:

    [Sat Jul 8 18:44:29 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides/11.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:28 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41
    [Sat Jul 8 18:44:28 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs/11.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:28 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41
    [Sat Jul 8 18:44:27 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides/10.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:26 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41
    [Sat Jul 8 18:44:26 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs/10.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:25 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41
    [Sat Jul 8 18:44:25 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides/1.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:24 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-slides): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41
    [Sat Jul 8 18:44:24 2006] [error] PHP Warning: imagejpeg(): Unable to open ‘/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs/1.PNG’ for writing in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 93
    [Sat Jul 8 18:44:23 2006] [error] PHP Warning: mkdir(/home/war59312/public_html/photos/NeowinShift01BST/lazy-k-thumbs): Permission denied in /home/war59312/public_html/wp-content/plugins/lazy-k-gallery/lazy-k-gallery-image.php on line 41

    I’ve tried chmod everything 777 but that makes no difference. :(

    Cant even remove it using shell:

    # rm SpamChart.PNG
    rm SpamChart.PNG
    rm: remove write-protected regular file `SpamChart.PNG’? y
    y
    rm: cannot remove `SpamChart.PNG’: Permission denied

    Any help would be great.

    Thanks,

    Will

  93. war59312 Says:

    Also, I figured out:

    “Um, any way to fix the Empty delimiter warning?”

    In lazy-k-gallery.php:

    Search For:

    if ( strstr ( $ lzk_currentfile, $ filesegment ) )

    Replace With:

    if ( @ strstr ( $ lzk_currentfile, $ filesegment ) )

    Noticed I just added the @ before ststr. :)

  94. Pablo Fernando Sanchez Says:

    Hi! I just wanted to drop by and say thank you for making this plugin. We are using it at NoticIEEEro, our blog and news centre for IEEE Region 9, Latin America and the Caribbean.

  95. Mark Says:

    Hi,

    Great plugin:

    I have one small problem with it though, in the classic theme in IE the thumbs go under the menu on the right , however in Firefox they do not, if I add a border to the gallery div I see that in both browser they are positioned correctly however for some reason as stated in IE it is placing thumbs outside of the div.

    Any thoughts ?

    Many Thanks

    Mark

  96. Mark Says:

    As a quick work around if anyone else is having this problem. I started the page off inside a table and that restricts the area the thumbs are placed in.

    Like this:

    My photography

  97. Mark Says:

    <table&rt;<tr&rt;<td&rt;
    My photography

    <!–lazy-k-gallery–&rt;

    </td&rt;</tr&rt;</table&rt;

    sorry for the double post, but the code and /code tags dont seem to work ;)

    If this hasnt worked either then simply wrap the lazy-k-gallery command inside a standard table it works fine.

    Mark

  98. Milan'che Says:

    Hi Korey,
    fisr of all congratulations on great work with this plugin.

    Secondly, I’m having trouble to enable commenting on pictures. I followoed your istructions but the commenting form still doesnt show up. You can check it here: http://blog.m2-j.info/galerija/ .
    And also here is the comments file: http://www.m2-j.info/comments.txt
    Can you help please?

    p.s. Is there a way to disable commenting on folder and thumbnail folders and just enable it under pictures?

    Thx

  99. max Says:

    Hi Korey,

    many many congraluration for your plugin!!
    just what I was looking for..

    just a question about submitting comments:
    when I submit my comments I have an error like this:

    Not Found
    The requested URL //?page_id=240 was not found on this server.

    but in fact it is the correct page…
    then I browse back one page and refresh, the comment is correctly stored.

    the redirect to the page works well without the code:

    try yourself the experience:
    http://www.bandadarfo.eu/?page_id=240

    would you please help me?

    thaks in advance

    max

  100. max Says:

    …obviously the code is

  101. max Says:

    sorry but I can’t show the code that cause your gallery to appear in a page… but you understand..

    sorry again..

  102. Shakeb Says:

    Hi Korey,

    Thanks for your great gallery.
    I was just wondering if it is possible to have square thumbnails or equal sized thumbnails for all images.
    This is my gallery at the moment

    http://www.stjosephs-kanpur.com/gallery-testing/

    If all thumbnails were of the same size the page would look much more neat and tidy.

    Thanks and Regards
    Shakeb

  103. Hansje Says:

    I have exactly the same problem as you Max! :(

    ——
    Not Found
    The requested URL //?page_id=4&lzkfile=Album+-+Fotos+van+Hansje+zelf%2FDSC03399.jpg was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    ——

    when i go back, my comment is stored :s

  104. Arturo Says:

    very very very beatiful and usefull gallery!
    but there are an error, the chmod of folder for the picture are 777 not 755 :(

  105. Ed Says:

    Hey,

    Thanks for the plugin! One question, is there any reason that my pictures wont load if I don’t choose to have the filename displayed? If I check it off I just get little squares, as soon as I set to disply the filename, I can see the pictures.

  106. Ed Says:

    hey! nevermind. realized it was a k2 problem, found a fix on your site somewhere. thanks for the great plugin.

    Ed

  107. David Says:

    Dear Korey

    As you can see I also created a Wordpress blog. I installed your plugin and it is worling fine! I searched a lot after something like this :)
    You can find the page over here: http://www.lipkens.eu/dali/?page_id=22
    Three small “comment”, is there a possibility to get rid of:
    - the date and everything that is behind there. Especially on the main picturepage.
    - the possibility to give comments on the main picture page en the folder pages. I only want them to give comments on the pictures themself!
    - The thing with the pictures. I just want them next to each other something like you did on the example page!

    I don’t know if these things are possible, but I truly hope so!

    Greets
    David

  108. David Says:

    - The thing with the pictures. I just want them next to each other something like you did on the example page!

    I was ably to leave that one out, but now they are all on the same line. What do I have to add, to put them on a new rule every 5 thumbs or something…

    Greets
    D

  109. Korey Says:

    David-

    First, the issue with your pictures not laying out right… for some reason your website isn’t including the header information for your plugins, including Lazy-K Gallery’s stylesheet. Take a look in your theme’s header.php and see if there is a mention of wp_head(). If it’s not there, take a look at the default theme to see where it goes. Let me know if that solves your problem.

    Commenting on photos only… I’ve had that request before, and there’s no easy solution at this time.

    I don’t understand what you’re asking about “the date and everything behind there.” If I’m guessing correctly, you don’t want to see the post date above the gallery. To change that, you’ll need to change your themes page.php file and remove the reference to the date. That will change ALL of your pages though, so perhaps you might like to create a new page template instead. See the Wordpress Codex for how to do that.

  110. Mike Says:

    OK.

    Issue 1:
    My folders are all named year.month(.day)_Description_with_Underscores

    When I tried to open one of those folders, I got a view of a placeholder for a picture, but no picture. I beLIEve that the issue was the dot in the folder name. Can you confirm whether this is the case or not by trying a folder containing dots?

    I may be back with an “Issue 2″ later, but I want to try something first.

  111. Mike Says:

    Issue 2:

    How about a feature whereby I can tell it how to order the files?

    I really want everything in order by name, but the readdir function orders them by their order on the hard drive, which makes for some weird chronology when I’ve got a vacation gallery.

  112. Korey Says:

    Mike- on issue 2, that’s a known oversight on my part. I’m planning to release a maintenance release before too long to address that issue and a couple of others. If you’re up to it, look at all the places where I do a readdir and add the natcasesort like I used in a few places.

  113. Mike Says:

    I was able to get things in alphabetical order with the natcasesort function. I figured that, but it took some playing to make sure I did it right.

    Feature requests:
    One: Replace underscore with spaces in folder names and image names

    Two: “Pretty URLs.” The addresses shore would look purdier without the “?lzkfile=” in there. I’m going to see what I can do on that front, but from what I’ve looked at so far, it doesn’t appear to be easy. It’s gotta be possible, but since I don’t know how, I’ll do some digging.

    What I’m going to look for is some way to first check to see what page we are. What is the actual address of the page that has the commented lazy-k-gallery tag. Once I have that, we should be able to strip that off and everything before it to see if there is anything (directory, filename, whatever.) I guess before I do that, I’d have to check to see if the .htaccess file is being used to make things pretty or else it won’t work for people who have ?something=whatever.

    That may not make much sense. I don’t know how to explain it better. Maybe you’ve already look and have found it to be impossible. I don’t know. I’ll check it out and see what I can find though.

  114. Lee Says:

    Great plugin! I am new to WP and it was easy to install. 2 Questions:

    1- My comments do not work, and there is no page.php file in my theme. Any ideas?
    2- How could I go about displaying a thumbnail for each of the galleries instead of only the text description?

  115. Mike Says:

    Here’s what I have so far re: “pretty URLs”

    Dunno how well pasting PHP code works, but I’ll try:

    function lzk_redirect($rules)
    {
    $page_name = get_option(lzk_page_name)
    $rules['($page_name)/(.*)$'] = ‘index.php?pagename=$1&lzkfile=$2′;
    return $rules;
    }
    add_filter(’rewrite_rules_array’, ‘lzk_redirect’);

    function lzk_query_vars($vars)
    {
    $vars[] = “lzkfile”;
    return $vars;
    }
    add_filter( ‘query_vars’, ‘lzk_query_vars’ );

    I got most of the info from http://wordpress.org/support/topic/54915 so if you want to check that out and see what you can do, that’d be coooool. I haven’t tested this yet, and I expect I screwed something up so it won’t work, but I don’t know for sure yet.

    I’ll keep working on it in my rare occasional free time.

    I also added a new function to lazk-k-gallery.php along with the options in -config and a checkbox for it in -admin.

    function format_name($item)
    {
    if (get_option(’lzk_replace_underscore’)) {
    $item = ereg_replace(’_', ‘ ‘, $item);
    return $item;
    } else {
    return $item;
    }
    }
    Then when I’m printing an image name or directory name, I use format_name($dir) or format_name($img).

  116. Mike Says:

    Other note:

    This only works if the lazk-k-gallery admin page creates the page with the
    !– lazy k gallery
    line so that it knows what the name of the page is, so there’d need to be another field for “Page name” or something that created a new page that had the content in it. That page would then theoretically be editable through regular editing means for adding text above or below the gallery itself if necessary.

    But then, if it gets changed on the admin page, then should it delete the old page? Or rename it? Or leave the old one and make a new one? And how to do that properly?

    Perhaps something like this on the options page:
    Name of the page: _____
    Text above the gallery (Optional): [text box]
    Text below the gallery (Optional): [text box]

    Then the admin page could create the page with those contents and add the rewrite rules for that page.

    Is that the proper way of doing that?

    Is that even something you want to do? Or should I quit now with the input?

    And were you ever able to test browsing into a directory with a “.” in it? Just to see if that’s the problem or not so that I can try to figure out *why* it’s a problem?

  117. Bryan Says:

    Korey,
    Everything with the plug-in seems to be working well, but I can’t get the comment boxes to come up. I’ve inserted the code as the directions say, but it hasn’t changed anything.

    Here is a copy of my comments.php file:
    http://www.lostonpoint.com/blog/wp-content/themes/default/comments.txt

    Here is a link to my gallery:
    http://www.lostonpoint.com/?page_id=4

    Any input you have on what’s stopping me here would help me out a lot. Thank you for your time.

  118. mac Says:

    Korey,

    Plug is really fantastic. However, for my purposes, I would really like to tweak it so I can have a gallery generated within a post. Any quick fix to add specificity to the gallery call tag?

    Also, anyway to skip the individual thumbnail page and go right to the original image from the gallery page?

    Thanks a ton.

  119. Korey Says:

    Mac-

    You should be able to put your gallery in a post just fine by putting that tag in the post instead of a page. Are you asking for a subset of your gallery inside the post?

    Korey

  120. mac Says:

    Sorry, subset.

  121. Vince Says:

    Korey,
    I tried to install the plugin, but when I click activate, my page goes blank as if the PHP isn’t parsing correctly, and I have to go through the ftp and remove the lazy-k-gallery.php file to fix it. Any idea why this is happening?

  122. Grant Laird Jr. Says:

    This is good plugins…

    Plan to add uploader via web interface anytime soon?