You Are Here: JARinteractive + Code + PhotoJAR + PhotoJAR: Base

PhotoJAR: Base – Download
Version: 1.1

PhotoJAR: Base provides the groundwork and shared code for other PhotoJAR plugins. Additionally, PhotoJAR: Base provides a number of enhancements to Wordpress gallery functionality:

  • Dynamic resizing and caching of thumbnails – changes to image sizes apply retroactively
  • Support for LightBox, ShadowBox, ThickBox, Lightview, etc.
  • Custom image sizes (beyond “thumbnail” and “medium”) – [gallery size="150x200"]
  • Displays gallery of galleries (thumbnails of child galleries) – [gallery showchildren=true]
  • A “linkto” parameter for galleries and images (”viewer”, “default”, “full”, or “none”) – [gallery linkto="viewer"]
  • A JPEG quality setting
  • A maximum size setting for full-size images
  • A default gallery columns setting
  • An [image] shortcode.
  • NEW! Limit number of images displayed in a gallery – [gallery offset="3" limit="20"]
  • NEW! Exclude images from a gallery – [gallery exclude="14,65,21"]

Settings

Javascript Viewer - This will set the viewer used when "viewer" is selected in other settings (such as "Link Gallery Images To").

Link Single Images To - This setting will apply to all images inserted via an [image] shortcode that do not have a link specified.

Link Gallery Images To - This setting will apply to all gallery images that do not have a "linkto" specified.

Image Shortcode (recommended) - If this is enabled, the add media dialog will place an [image] shortcode in the editor in place of HTML. This provides a simple way to adjust settings and allows the image to be resized automatically if settings change.

Gallery Columns - This sets the default number of columns for a gallery.

Gallery Image Size - This sets the default size for images in the gallery. "thumbnail" and "medium" correspond to the settings in the "Miscellaneous" Wordpress settings.

Constrain Full Size Images - Sets the maximum size for "full" size images.

Shortcodes

See "Using the gallery shortcode" for an introduction to shortcodes.

Size - PhotoJAR adds the ability to specify a custom size in both [image] and [gallery] shortcodes in the format "widthxheight" - add "xcrop" if you want the image to be cropped to the exact dimensions. Examples: [image id=23 size="125x150"] or [gallery size="175x175xcrop"].

[gallery] attributes:
Note: I recommend that you upgrade to Wordpress 2.6. Do to a difference between Wordpress 2.5.1 and 2.6 the orderby attribute must be set for all galleries when using PhotoJAR with Wordpress 2.5.1. Most likely you will want to use orderby="menu_order, ID".

  • showchildren - set to "true" to display a thumbnail for each child page's gallery.
  • size - "thumbnail" (default), "medium", "full" or see description above for advanced usage.
  • linkto - Specifies what the images should link to: full size image ("full"), Javascript Viewer ("viewer"), or Wordpress' default image page ("default"). If not present, the "Link Gallery Images To" setting will be used.
  • See "Using the gallery shortcode" for info on the standard attributes for the gallery shortcode.

[image] attributes:

  • id - The id of the image attachment.
  • size - "thumbnail" (default), "medium", "full" or see description above for advanced usage.
  • title - The image title.
  • align - This corresponds to the setting in the "Add Media" dialog. "none", "left" (default), "center", or "right"
  • alt - sets the alt attribute of the [img] tag.
  • linkto - Specifies what the images should link to: full size image ("full"), Javascript Viewer ("viewer"), or Wordpress' default image page ("default"). If not present, the "Link Gallery Images To" setting will be used.

Installation

Requires Wordpress 2.5.1 (2.6 or better recommended) and PHP 5 or greater.

  1. Download PhotoJAR: Base.
  2. Upload the `pj-base` folder to the `/wp-content/plugins/` directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Adjust settings under the 'Settings -] PhotoJAR' menu in Wordpress.
  5. Optional: Install a javascript viewer plugin (LightBox, ShadowBox JS, etc.).

Tom Johnson has written a nice guide to creating a gallery with PhotoJAR and LightBox.