Dec
12
2011

OD Add rel=lightbox Plugin for WordPress

I use lightbox clones all the time to create a visually beautiful presentation for my photos in my photography related blogs. Lightbox clones all require a bit of code to indicate that the image should be opened in a lightbox instead of as an individual webpage. Typically each image must be tagged with something like rel=”lightbox[ID]“, but of course there is no tagging standard between each clone and it’s often not included in the WordPress or Theme code, so it’s very handy to use a WordPress plugin to automatically add the code.

For several of my photography sites I use a lightbox clone called prettyPhoto for which I adapted an existing plugin to add the required rel=prettyPhoto[ID] code. More recently I have been using other lightbox clones more and more and so I had to adapt my plugin once again. Although it was a simple mod, I thought I might as well share it here too in case it’s useful for someone else as well.

Installation

  1. Download the Free OD Add rel=lightbox WordPress Plugin
  2. Unzip the file
  3. Upload it in /wp-content/plugins/ of your WordPress installation
  4. Activate the Plugin
  5. That’s All

Changelog

0.1
Initial release. Adapted from the OD Add rel=prettyPhoto Plugin for WordPress.

Please let me know if you find any issues, bugs, or have ideas for improvements.

Theme Forest - Your choice for Site Templates and Themes

Apr
14
2010

Automatically Update Site Copyright Notice

Copyright 2010I recently realized that I had forgotten to change the copyright notice on some of my websites. I had changed it on all of my still and video cameras and in the metadata fields for Breeze Downloader Pro and Adobe Lightroom; I had even changed it on some of my websites. But somehow I missed a couple.

Instead of just fixing it now for the sites that I missed in January, I wrote some Javascript code to do it automatically based on the year. You can see the resulting text in the Copyright Notice for this site at the bottom of the right sidebar.

Here’s what the code looks like. Note that it automatically updates the year and it links to your email address from your name (in a method very unfriendly to spam harvesters). If you want to use it simply copy and paste into a widget or into your wordpress header or footer and it will start displaying.

NOTE – You must to update the 3 “var” fields to ensure that the code uses your own Name and Email address.

All content on this site:<br>
<script language="Javascript">
var name = "Test User"
var account = "user"
var domain = "testsite.com"
var mydate = new Date()
var year = mydate.getFullYear()
document.write("©" + year + ", <a class=link href='mailto:" + account + "@" + domain + "'>" + name + "</a>")
</script>
<br>All Rights Reserved

If you want to use this code in a post or a page then it will be much more difficult to make it work. You will have to refer to the WordPress Codex for information on how to use Javascript in a post or a page.

Theme Forest - Your choice for Site Templates and Themes

Apr
13
2010

Add rel=prettyPhoto Plugin for WordPress

Modern Business 3 Dark for WordPressI recently started using a WordPress theme for one of my sites called (Modern Business 3 Dark for WordPress) that has built in code for a jQuery based lightbox clone called prettyPhoto. This is a beautiful theme, and a very nice implementation of a lightbox. In fact prettyPhoto is very similar to Lightview, which is the lightbox clone I normally use.

Unfortunately prettyPhoto requires some different code to indicate that images or video should be opened in the lightbox than most of the other clones I’ve used. Typically each image must be tagged with something like rel=”lightbox[ID]“, but for prettyPhoto the required tag is rel=”prettyPhoto[ID]“.

I use lightbox clones all the time, and of course there is no tagging standard between each clone, so for a long time I’ve been using a WordPress plugin called Add Lightbox that automatically adds this code. I modified that plugin to work with prettyPhoto, and I thought I would share my mod here. This really was a very simple mod, but I’m sure that there are thousands of other people using the same theme that I am that have the same problem that I did.

Note that this plugin does not add the the files required for prettyPhoto (it only adds the rel=prettyPhoto[ID] tag)! You have to insert the required files for prettyPhoto into your theme yourself, or use a theme such as Modern Business 3 Dark for WordPress that already includes the code.

Installation

  1. Download the Free OD Add rel=prettyPhoto WordPress Plugin
  2. Unzip the file
  3. Upload it in /wp-content/plugins/ of your WordPress installation
  4. Activate the Plugin
  5. That’s All

Changelog

0.2
Minor update to change the name and update the documentation.
0.1
Initial release. Adapted from the Add Lightbox Plugin for WordPress.

Please let me know if you find any issues, bugs, or have ideas for improvements.

Theme Forest - Your choice for Site Templates and Themes

PhotoShelter Member Since 2008 - Join & Save!

TheBuckmaker.com Wordpress Themes | Kreditzinsen, Streaming Audio