Technology Insights

How To Remove The NextGen Gallery Plugin From Your WordPress Blog

I have used the NextGen Gallery WordPress plugin on a bunch of different projects and have always been satisfied with the functionality. On a recent WordPress project I was working on I installed NextGen Gallery assuming I would use it however after I got a bit further on the project I decided it wasn’t necessary and that it would be easier to simply use the default WordPress media uploading capabilities along with the “Lightbox 2” and the “Flexible Upload D3Z Edition” WordPress plugins instead. While NextGen gallery has tons of functionality and typically is easy to use for this project there would be many authors and I needed the path of least resistance to allow authors to write articles.

Code Snippets

WordPress NextGen Gallery – Add Date Print Out to Compact Album Listings

I was working on my personal blog and wanted to add the date or a date range to the top of each gallery when they are listed out. The blog I am speaking of uses WordPress, WP version 2.7, with the NextGen Gallery plugin, NGG version 1.2.1, for pictures. I list the all of the galleries by using the album compact function so the below howto relates to that function only. What it will do is simply print out anything in the description field right above the image you have highlighted for each gallery. Since I was not using the description for anything else I just add the date or a date range into that field such as 01-01-2009 or 04-16-2009 to 08-10-2009.  Follow the directions below and you can print out anything you like above each gallery listing.

The NextGen Gallery shortcode used to display the galleries:

php

  1. [album=3,compact]

Technology Insights

Modify The WordPress Pages Widget to Include Pages Instead of Exclude Pages

Recently I was setting up a WordPress blog and needed to use the default pages widget to list a certain set amount of pages. On this blog I used the NextGEN Gallery for dozens of different galleries. The issue was that I wanted to only list a couple of pages using the default Pages widget and when using NGG I would have dozens if not hundreds of pages that I would need to exclude with the default Pages widget. So what I needed to do was include a couple of page ID’s instead of excluding hundreds of page ID’s.

The problem above can be accomplished by making one minor adjustment to one WordPress file. We will need to modify the wp_pages_widget PHP function to include the pages specified in the admin versus excluding them.

File to Modify: <wp-root-directory>/wp-includes/widgets.php
Line: 682

Technology Errors

NextGen Gallery with Tiltview Pictures Look Distorted and Causing Resource Issues

I have been playing around with Tiltview for the past couple of days which is an addition to a WordPress plugin called NextGen FlashViewer. Let me start by saying that even though I had a couple problems when starting out the combination of NextGen Gallery, NextGen Flashviewer, and Tiltview is one of the coolest combinations I have seen. It actually is fairly easy to get going and surprisingly when configured properly is not a huge CPU and memory hog. If you have configuration errors as mentioned below it can clearly be a PC resource monster. You definitely can see it taking up some memory but most client PC’s have plenty to handle Tiltview style applications these days. If you have something configured incorrectly as I mention below it wil easily crash browsers and possibly lock up the entire PC. My 1.8 GHz Windows XP laptop with 2GB of RAM was on its knees begging for mercy during troubleshooting the issues I explain below.

Technology Insights

WordPress NextGen Gallery Watermarking With Images Not Working

When I first installed NextGen Gallery plugin for WordPress I could not get the watermarking working. I read of all sorts of problems with it including FreeType not being installed, permission problems, etc. but everything that I was trying was not resolving my issue. During upload I was not getting any errors so at the time I felt I had little to go on. To make a long story short I finally read a post on WordPress.org that said the watermark image has to be a PNG for it to work. I saved my watermark file as a .png file and sure enough it worked without issue.