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

How to SCP (Secure Copy) with FileZilla on Windows XP

You can easily transfer files from a server that has SSH (Secure Shell) running but not FTP (File Transfer Protocol) using Filezilla on Windows. When using Filezilla it will be called SFTP (Secure File Transfer Protocol) and will allow you to copy files from a server to your local Windows computer with ease. Follow the simple steps below to securely copy files from a server that is running SSH.

  1. Open Filezilla: First you will need to launch Filezilla. If you do not have Filezilla you can obtain it for free from this link.
  2. Open Site Manager: Click on File in the top navigation menu and then select “Site Manager” from the drop down. This will open Filezilla’s Site Manager, as shown below, where you can add, delete, and modify sites that you visit often.

Technology Insights

How to Add and Remove Internet Explorer Toolbar Buttons

Customizing the buttons located in the top left corner of your Internet Explorer browser window is easy though it might not be obvious to everyone. Below are details on how to add or remove various Microsoft IE toolbar buttons such as the Home Button, the Page Drop Down, the Safety Drop Down, the Tools Drop Down, the Feeds Button, the Bonjour Button, the Print Button/Drop Down, the Read Mail Button, and the Help Button just to name a few. A lot of third party applications that you install will add buttons to the Internet Explorer Toolbar which will eventually clutter up the toolbar which also includes your IE tabs. Below are the simple steps to add, modify, or remove these toolbar buttons and drop downs.

Example Picture of Internet Explorer Buttons:
This is typically located near the top right of the browser underneath the search box in IE (located on the right side of the address bar by default) and then below the Google Toolbar if you have that installed.

Internet Explorer Toolbar Buttons To Customize

Technology Insights

Setup Log Rotation for Multiple Ruby on Rails Projects Using Linux logrotate

Setting up log rotation for multiple Ruby on Rails projects on the same Linux server is easy using logrotate. If all of your projects are in the same directory structure it is even easier by using variables to work for each different project as explained below in detail.

First you will need to install logrotate which can be installed on CentOS Linux via yum as shown in the below command.

bash

  1. yum install logrotate