Plugin Directory

Dynamic Content Gallery

Instructions for use

Using the plugin

To display the dynamic gallery in your theme, add this code to your theme file wherever you want to display the gallery:

<?php include (ABSPATH . '/wp-content/plugins/dynamic-content-gallery-plugin/dynamic-gallery.php'); ?>

NOTE: From version 2.0 onwards the plugin folder name has changed to dynamic-content-gallery-plugin (it was dynamic-gallery in prior versions). If you get PHP errors after upgrading from version 1.0.0 check this path in your theme template file.

Assigning Images to Posts

WORDPRESS ONLY:

In order to display a unique image and description for each post, create two Post Custom Fields when writing a post:

* Key = dfcg-image with a Value = Image filename including extension eg. myImage.jpg
* Key = dfcg-desc with a Value = Description text eg. Here's our latest news!

You must upload all such custom field images to the folder you specify in the plugin's Settings page.

WPMU ONLY:

In order to display a unique image and description for each post, create two Post Custom Fields when writing a post:

* Key = dfcg-image with a Value = Full URL to the image including filename and extension eg. http://myblog.blogs.com/files/2008/11/myImage.jpg
* Key = dfcg-desc with a Value = Description text eg. Here's our latest news!

Use the Media Uploader (accessed via the Add Media button in Admin > Write Post) to upload your images and to find the full URL to be used in the Post Custom field. See the Settings page for further information on how to do this.

Configuration and set-up

Further information can be found at http://www.studiograsshopper.ch/dynamic-content-gallery-configuration/

The plugin is now loaded and activated, but needs to have its configuration and set-up completed before it is fully ready to go. This takes a little work, but once done you can forget about it and get on with more important things!

  1. Configuring the Settings page
  2. Create and name the default images (not applicable when used in WPMU)
  3. Create default descriptions
  • If you are installing this plugin in a Wordpress installation, follow the instructions marked WORDPRESS.
  • If you are installing this plugin in a Wordpress Mu installation, follow the instructions marked WPMU.
Configuring the Options page
  1. In the Dashboard, go to Settings and open the Dynamic Content Gallery Settings page. This contains a number of options, some of which are required and some of which are optional and may be left blank.

  2. WORDPRESS and WPMU: Assign Categories to each of the 5 image "slots" that will be shown in the gallery. By using a combination of the Category ID and The Post Select field, you specify which post will be assigned to each of the 5 image "slots". Post Select works like this: enter 1 to display the latest post, 2 to display the previous post, 3 to display the post before that, and so on. For example, two possible schemes are:

  • Display latest post from 5 categories: Enter a different ID in each "Category ID" field and enter "1" in each Post Select box.
  • Display latest 5 posts from one category: Enter the same ID in each "Category ID" field and enter "1", "2", "3", "4", "5" in the "Post Select" boxes.
  • Display latest 5 posts regardless of category: Blank out the ID numbers in each "Category ID" field and enter "1", "2", "3", "4", "5" in the "Post Select" boxes.
  • Or you can specify any combination of Category ID and Post Select depending on your requirements and imagination.
  1. WORDPRESS ONLY: Enter the relative path to the folder which contains the images that are referenced in the post custom field Key "dfcg-image". This path should be relative to the root of your Wordpress blog. For example, if your images are stored in your Uploads folder, the relative path will be: /wp-content/uploads/. This is a required field.

  2. WORDPRESS ONLY: Enter the relative path to the folder which contains the default images which will be pulled into the gallery. These default images are only used by the plugin in the event that the post does not have an image specified in the post custom field Key "dfcg-image". This path should be relative to the root of your Wordpress blog. For example, if your default images are stored in your Uploads folder, the relative path will be: /wp-content/uploads/. This is a required field.

  3. WORDPRESS and WPMU: Default description. By default the Dynamic Content Gallery plugin displays a description for each image displayed. The plugin looks for the image description in this sequence:

    1. Checks the post for a custom field with the Key of "dfcg-desc" and if this doesn't exist =>
    2. Pulls in the Category Description set up in WP Admin>Manage>Categories and if this doesn't exist =>
    3. Shows the Default Description entered in this field. Be aware that the gallery has relatively little space in which to display this text and therefore it is recommended to keep this description short, probably less than 20 words. This field is optional and may be left blank.
  4. WORDPRESS and WPMU: Gallery size and CSS options. You may configure various CSS options here including the width and height of the gallery, the size of the slider, font sizes etc.

That's it! The Settings Page is now configured. Time to create some default images (WORDPRESS only, not WPMU) and the default descriptions (WORDPRESS and WPMU).

Create and name the default images (WORDPRESS ONLY, not applicable to WPMU)
  1. Find or create a default image for each category. These should be the same size as the size of the gallery specified in jd.gallery.css in accordance with the layout requirements of your page.
  2. Each image should be named as follows: XX.jpg where XX is the ID of the Category that you wish this image to be associated with. The plugin only recognises jpeg format with a filename extension of .jpg.
  3. Upload these default images to the folder specified in the Settings page.
Create default descriptions (WORDPRESS and WPMU)
  1. Go to the Manage>Categories menu in the Dashboard.
  2. Enter a short Category Description for the categories whose posts will be featured in the dynamic gallery. It is recommended that this be kept to under 20 words or so.
  3. If you do not wish to use the Category descriptions, for example, they are too long or are used in a different context elsewhere in your theme, you may create a "catch-all" default description in the Settings Page. If you do this please note that this default description is not Category specific and will be displayed whenever the post custom field does not exist.

Technical Notes

  • The plugin automatically detects whether it has been installed on a Wordpress or Wordpress Mu system.
  • Language Support: This is not yet fully implemented in version 2.2 but is scheduled for a future release. (Sorry, ran out of time for this release!)

Acknowledgements

I gratefully acknowledge and thank Jonathan Shemoul of JonDesigns.net, for the versatile and excellent SmoothGallery script which this plugin uses. The Dynamic Content Gallery is inspired by the Featured Content Gallery plugin by Jason Schuller. Particular kudos to Jason for his plugin, and from whose initial work I have borrowed heavily.

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus (1 reporting)

100%
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(10 ratings)