Skip to Content

How to integrate Qdig with WordPress

I’ve been meaning to document the changes I made to allow the Qdig photo gallery and WP-Qdig plugin integrate nicely into the Kubrick WordPress theme. You can see what it looks like by going to the demo site: Qdig integrated with WordPress. It really is nicely integrated, allowing comments for the post and navigation through the images.

First of all I’ll say thanks again to David B. Nagle for the QDIG-WP Plugin and his excellent forums and Hagan Fox for Qdig itself.

Secondly, I want to indulge in a short rant. I love WordPress, but why was this process even necessary? Why aren’t photo galleries part of the basic functionality of WordPress? Searching the official support forums shows that I am not the only one that wanted this functionality. Countless hours have been spent by WordPress users to try to merge different photo gallery scripts into WordPress and usually without much success. I myself have tried over a dozen, and so was overjoyed to find one that did the job with some minor tweaking. Actually there was another candidate, Alex King’s WP Photos which is unfortunately unsupported. I couldn’t get it work, even when using the pre-modified packaged WP available on the site.

Some replies to the call for photo gallery functionality were along the lines of WordPress is not for photo-blogging, use a photo-blogging program instead. To which I feel like blowing a big raspberry. It isn’t as if blogging software never evolves. WordPress didn’t have basic CMS functionality and now it does. I know that there are many people who are like me, who have a blog and also photo galleries on their site. Combining them makes life simpler (one set of comments, one database to back-up, no need for visitors to jump back and forth between two separate parts of the site etc).

Anyway, that’s almost the end of my rant. If you agree with what I said and like the way Qdig integrates with WordPress, leave a comment or better yet blog about or del.icio.us this post

Onto the gritty details. There are some good instructions on David’s site that will get you most of the way there. Go to the site and carry out the installation instructions. You just need to change a few more things in the Qdig index.php file. The extra changes will generate thumbnails and resized versions in batches, let you display photos without having them jut out, will let you have a thumbnail bar and let your users click on the smallish photo to see the original full sized file.

I’ll just list the changes I made to the stock Qdig index.php if the line numbers have changed, just do a search for the variable names. Most of the changes are flipping TRUE to FALSE or vice versa.

line 99: $header['force_disa'] = TRUE; // Force HTML headers to be suppressed.
line 105: $dir_nav['enable'] = FALSE; // Enable Directory Navigation. If disabled,
line 126: $ctrl_bar['enable'] = FALSE; // Enable control bar.
line 149:$thmb_row['maxwidth'] = 550; // Approx. max. width of thumbnails row
line 198: $img_link['full'] = TRUE; // If the image is a resized version, link to the
line 200: $img_link['file'] = TRUE; // Full size link goes directly to the image file.
line 209: $lwr_nav['full_link'] = FALSE; // Show `Full Size' link if image is resized.
line 320: $cnvrt_thmb['size'] = 40; // Thunbnail image height in pixels.
line 328: $cnvrt_thmb['mesg_on'] = FALSE; // Produce a message when a thunbnail image
line 345: $cnvrt_alt['indiv'] = FALSE; // Convert alternates one-at-a-time rather than
line 347:$cnvrt_alt['mesg_on'] = FALSE; // Produce a message when an image is converted.
line 358:$cnvrt_size['1']['maxwid'] = 550;
line 529:$url_base_path = '/your path here (see David's instructions)/'; // Base URL path to the images (not the script)
line 531:$fs_base_path = 'your path here (see David's instructions)/'; // Filesystem path to the root dir of the gallery.
line 541:$keep_params = TRUE; // Keep extra GET parameters in the URLs.

Phew that’s almost it! To display the little thumbnail in your post follow the instructions in this thread on David’s site forums.

And one last tip, if nothing seems to happen or thumbnails aren’t being generated properly you need to add this line to your .htaccess file
php_value memory_limit 16M
This allocates more memory for the Qdig script to use. Some people said change it to 32M but for me 16M works fine and you really should use the lowest figure that works.

I hope this long post helps some people, and at the very least it will help me if I ever forget what I did spacer

PS. Yes I know you can get loads of Flickr plugins, I use one myself, but I want to keep my photos on my site. Call me a control-freak if you want ;P

Posted on January 26, 2006 at 1:40 am

25 comments

Categories: Photos & Photography, Web Dev/IA

Receive new post updates: Entries (RSS)
Receive follow up comments updates: RSS 2.0

Written by Ian

spacer

« Previous post

Next Post »

25 comments

  1. Hey, Ian, great help here, but do you know if the Qdig plug-in works with WordPress 2.0 or higher? I’ve followed David’s instructions and yours to the letter, and all I get on my posts are the “Gallery by Qdig” tag, but no images. Any thoughts?

    Comment by SAm on 19th March, 2006 at 6:11 pm

    spacer

  2. I haven’t tried the above process with WP2 so am not sure if it would work. I’ve been meaning to try it but haven’t found the time.

    The problem you mention could be something to do with generating the thumbnails and resized versions of the photos. I know that if you don’t have the right graphics library on the server or if the memory space for the php is too low, something like you mention will happen even under WP 1.5.2

    If you post a link to the site, I could have a look and see if I can spot any other clues. And I’ll try and test it out under WP2 soon.

    Comment by Ian Cheung on 20th March, 2006 at 1:08 am

    spacer

  3. Hey, Ian, thanks. Here’s a page that I’ve been trying to put the images in. It’s just one post that I’ve set aside to experiment with the plug-in.

    www.sheisallthat.com/?p=87

    Comment by SAm on 20th March, 2006 at 12:37 pm

    spacer

  4. ADDED:

    If you feel like it, you can email me at sam@sheisallthat.com.

    Thanks, man.

    Comment by SAm on 20th March, 2006 at 12:41 pm

    spacer

  5. Hey, Ian, I tried a test run with another site, using WordPress 1.5, and it’s the same problem. All I get is that “Gallery by Qdig” text, and nothing else… spacer

    Comment by SAm on 20th March, 2006 at 5:30 pm

    spacer

  6. Hi Sam,

    Not sure what you did but the link you posted in comment 3 works fine for me. I see some very nice photos spacer

    What did you do to get it working? It’s under WP2 right? Just want to confirm that it works fine for WP2

    Comment by Ian Cheung on 20th March, 2006 at 6:08 pm

    spacer

  7. Yeah, heh heh, I just figured out how to get it working like…um, 10 minutes ago!

    Now my problem is that it’s showing up as a resized, and you need to click on the image to get the full size. Is there a setting I can change for this? I guess I’ll look through the settings again…

    Comment by SAm on 20th March, 2006 at 6:37 pm

    spacer

  8. So what made the difference? It would be great for others that happen on this post to know.

    About your new problem, it is actually a feature spacer It is the way I tweaked the settings. Qdig is actually very configurable so you can have it display full size if you want but it will break most WP themes unless you have a totally fluid layout (which I don’t think is the case with your site).

    Comment by Ian Cheung on 20th March, 2006 at 6:50 pm

    spacer

  9. Is there anyway I can add text like “Click on the picture to enlarge” like directly below the picture, and before the bottom navigational bar? Just to alert visitors that they have the option to get a larger pic of what they’re seeing?

    Comment by SAm on 20th March, 2006 at 6:57 pm

    spacer

  10. I’ll have a look and see, I think I did come across such a setting but never used it.

    In the meantime could you tell us of what made the difference to get it working on your site?

    Comment by Ian Cheung on 20th March, 2006 at 7:52 pm

    spacer

  11. All I did was use the ‘../’ directory as suggested in the index file.

    One final question: is it possible to make the gallery call images from ANOTHER domain name/server, or does it positively absolutely have to be a host? I’m asking because on another site I’ve been using images that I store on another host. Instead of putting the file pathname for the local server, is it possible to make it for a separate server? The WP hosted on one server/domain name, and the pictures hosted/being called from another entirely different server/domain name?

    Comment by SAm on 21st March, 2006 at 3:06 am

    spacer

  12. Just to follow, I’m running out of bandwidth on one of my sites, and need to host the images on another server in order to save bandwidth usage. That’s why I’m hoping what I said above can be done…

    Comment by SAm on 21st March, 2006 at 3:09 am

    spacer

  13. I think the way that the plugin is written it probably isn’t possible. You would have to ask David if there was any way of changing it, and from what I gather he is pretty busy these days to work on the plugin.

    As for the “Click picture to enlarge” you could have a default caption and then display the caption under the image. That should work.

    Comment by Ian Cheung on 21st March, 2006 at 2:58 pm

    spacer

  14. Works pretty nice. Quick and easy once you get over the perception thinking that it will take a long time spacer

    Just tried hooking it into WP2 and it seems ok. The pictures shows up so I’m happy! Haven’t gone into the details yet….

    Comment by Xuan on 27th March, 2006 at 11:22 pm

    spacer

  15. Awesome Work.. thanks for the guidance!! your post here is very helpful .. and Random Frequency post and his page on qdig also excellent..

    Tip: Turn off the rich text editor

    i had a problem with having text along with a picture as a link to the post..

    Got mines all working… spacer

    Comment by Michael on 3rd April, 2006 at 9:11 am

    spacer

  16. >Tip: Turn off the rich text editor
    Yes indeed, this is the one possible banana skin of integrating it with a WordPress 2 blog.

    Comment by Ian Cheung on 3rd April, 2006 at 10:31 pm

    spacer

  17. Ian or SAm – I am having the same issue. Everything there, but no pics showing. I am using WP 2. Can one of you clarify what was done to fix the issue. Thanks!

    Comment by James on 24th April, 2006 at 5:50 am

    spacer

  18. Hi James, unlike Sam I haven’t actually tried it with WP2, though I have helped a few ppl do it.

    One thing I have found with the plugin is that it is sensitive to what other plugins are installed. TextControl trips it up a bit, and I guess other plugins that modify the way WP handles text will too. Do you have any such plugins installed?

    Comment by Ian Cheung on 25th April, 2006 at 10:05 pm

    spacer

  19. Hi.

    I have just followed the description in this post. I got two problems that i cant find a solution for. First, whatever I do I cant se any thumbnails. Second my pictures are so big that they take the whole screen watching. Should not qdig resize my images so they fit in the standard Kubrick WordPress theme? or do I have to resize all my pictures my self? I´m using WP (2.x).
    I have followed this guide and Davids guide on randomfrequency.net/wordpress/qdig/.

    And one last question. Your writing about adding a line to a .htaccess file? where can i find this file?

    Hope you have the time to help me?

    Best regards
    Frode
    Norway

    fmatre at netcom dot no

    Comment by Frode on 31st May, 2006 at 7:19 am

    spacer

  20. Hi Frode,
    Hmm… I think your problems could be related. If qdig is not generating any thumbnails and your images aren’t being resized then it could be that you don’t have the gd graphics library set-up on your server.

    You should be able to find the .htaccess file in your root directory or the root directory of the wp install. If there isn’t one, you can create your own in a text editor.

    Comment by Ian Cheung on 1st June, 2006 at 9:25 am

    spacer

  21. Hi there, thanks for the help up until this point. I’ve managed to get WP2 to display the full sized image, but again, thumbs aren’t being produced. I’ve added the line to the htaccess file and do have gd support on the server.. at least, I think I do; phpinfo() gives me this:
    GD Support enabled
    GD Version bundled (2.0.28 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled

    That looks ok to me, does it look ok to you? I’m a little short on ideas myself as I’m not all too clear on the dark magicks that are web development (if that’s even the right term).
    Thanks again for all your help so far and thanks in advance for any more that you may be able to provide.

    Comment by Stuart on 24th June, 2006 at 5:03 pm

    spacer

  22. Hi Stuart,

    I recently had the same problem with a friend’s site when I added new albums. The cause, in my case, was that the permissions of the directory were not set to be writable. Once I changed the permissions and cleared my browser’s cache it worked.

    Hope it is the same problem and that it helps.

    Comment by Ian Cheung on 26th June, 2006 at 1:32 pm

    spacer

  23. Just wondering how you managed to get the thumbnails on the front page, all i get is Visit Gallery link, muchos gracias

    Comment by DjKaye on 3rd July, 2006 at 4:17 pm

    spacer

  24. hello,

    I’d like to know how to get the thumbnail to display in my post, but the forum you linked to is not available.

    would you be able to share directions for accomplishing that?

    Thanks

    Comment by Brance on 24th November, 2007 at 4:47 am

    spacer

  25. This is fantastic! Thank you. Do you know if this works on WordPress 2.5 RC1?

    Comment by sam on 26th March, 2008 at 3:07 am

    spacer

Trackbacks

  1. randomfrequency.net » Blog Archive » Qdig-WP Kubrick Integration
  2. The Long Journey » QDIG

Allowed HTML tags: <a class="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment you grant The Nine Lives – Ian Cheung, Information Architect in Osaka, Japan a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.