Dynamic Content Gallery
Welcome to the home page for version 3.x of the Dynamic Content Gallery plugin for Wordpress and WPMU.
A demo, download link, and key information relating to the plugin can be found here.
Plugin version: 3.x and up
Additional Resources:
DCG Home Page | Docs | Configuration Guide | FAQ | Error messages | Support
Genesis and the Dynamic Content Gallery
If you haven't yet heard of the fabulous new Genesis theme framework for Wordpress by those wonderful people at Studiopress, get yourself over to their site and check out the demos! At last a "real" framework,… [more]
Studiograsshopper 2010 theme makeover
New Year, new theme! Having got a little bored with my existing theme, the excellent Shades of Blue free theme from Studiopress, I've just finished a couple of days of extensive re-theming of Studiograsshopper.… [more]
6 essential checks before buying a premium Wordpress theme
If you are looking to buy a premium Wordpress theme, unlike with something you might buy in a high street store, you don't get a chance to try before you buy. Although premium wordpress themes are not… [more]
Wordpress 3.0 action hook contextual_help
Development of Wordpress 3.0 is in full swing and, knowing that there will be quite a few significant changes to the code base with the merge of WP and WPMU, I'm keeping a close eye on the nightly builds… [more]
Borrowing layout ideas from CSS frameworks
If you are interested in web design it is likely that you have come across CSS frameworks such as 960 and Blueprint. Put very simply, CSS frameworks establish baseline CSS styles and a grid-based approach… [more]
Additional Resources
Quick Start | Documentation | Configuration Guide | FAQ | Error Messages | SupportDownload
Compatibility
- Requires at least: 2.8
- Compatible up to: 2.9.2 (WP) and 2.9.1.1 (WPMU)
Description
This plugin creates a dynamic gallery of images for latest and/or featured Posts or Pages using either the JonDesign SmoothGallery script for mootools, or the Galleryview script for jQuery. By associating your gallery images with individual Posts or Pages, using custom fields, the plugin dynamically creates the gallery from your latest and/or featured content. Additionally, default images can be displayed in the event that the necessary custom fields have not been created. A Dashboard Settings page gives access to a comprehensive range of options for populating the gallery and configuring its look and behaviour.
Compatible with Wordpress Mu but with some differences in features compared with the Wordpress version. Requires WP/WPMU version 2.8+.
Key FeaturesVersion 3.0+ introduces many new features: streamlined code, expanded Settings page to handle javascript options, and new options for image file management and populating the gallery.
- NEW in 3.2.2 - DCG in a Widget!
- Metabox panel in Write Post/Page screens for easy editing of custom fields used by the plugin.
- Auto custom excerpt option for the Slide Pane Description - automatically pulls text from your Post/Page content
- SmoothGallery javascript image gallery using mootools framework, or an alternative jQuery script.
- A choice of 3 different methods for populating the gallery - Multi Option, One Category or Pages.
- Up to 15 gallery images (One Category method), 9 gallery images (Multi Option), or unlimited for Pages (with custom page Sort Order).
- Provides for a system of default images which will be displayed in the event a custom field image has not been defined.
- Displays the Post/Page title and a user-definable description in the Slide Pane.
- Images can be linked to external URLs.
- User settings for image file management, CSS and javascript options.
- Built-in configuration validation checks and error message reporting.
- Valid xhtml output.
- WPMU compatible (with some differences in the Settings available to the user).
Comprehensive information on installing, configuring and using the plugin can be found here
All support is handled at the Studiograsshopper Forum. I do not have time to monitor the wordpress.org forums, therefore please post any questions on my site's forum.
Installation
Installing for the first time
- Download the latest version of the plugin to your computer.
- Extract and upload the folder dynamic-content-gallery-plugin to your /wp-content/plugins/ directory. Please ensure that you do not rename any folder or filenames in the process.
- Activate the plugin in your Dashboard via the “Plugins” menu item.
- Go to the plugin’s Settings page, and configure your settings.
Note for Wordpress Mu users
- Install the plugin in your /plugins/ directory (do not install in the /mu-plugins/ directory).
- In order for this plugin to be visible to blog owners, the plugin has to be activated for each blog by the Site Administrator. Each blog owner can then configure the plugin’s Settings page in their Admin Settings.
Quick Start Guide
Assuming you have just installed the plugin for the first time, the basic steps you need to take to get the gallery up and running are quite straightforward. It is suggested that you start with the default Settings and follow the below instructions to get the gallery working, then, once the gallery is working, go back and customise the Settings to fit your particular requirements.
Add the gallery code to your theme template file
Add this template tag to your homepage template file, eg home.php:
<?php dynamic_content_gallery(); ?>
Make sure that you do not place this code within the main Loop or within a WP_Query loop. This code must be outside of the Loop.
If you want to display the gallery using a template file other than home.php, see:
Configuration Guide – How to choose the correct theme template when adding the plugin code.
Image file management settings
In the Settings page, leave the Image file management settings on Full URL.
Selecting Full means that you must use the full URL in the Write Post/Page DCG Metabox Image URL field.
Choose the Gallery Method
To keep things simple, start off by selecting the One Category Gallery Method option in the Settings page, as this is the easiest to set up.

Settings: Gallery Method
In the One Category Settings, select the category from the dropdown list and the number of posts which you want to feature in your gallery.

Settings: One Category
Note that for performance reasons, the maximum number of posts is restricted to 15.
Add images and descriptions to your Posts

Dynamic Content Gallery Metabox
Version 3.2 introduces a dedicated Metabox for handling the custom fields that are used for adding images, a description and an external link (if required). In fact, you don’t even need to know the names of these custom fields, which makes life much easier when adding content to the gallery.
Go to each Post (Posts>Edit>post) and add the Image and Description as follows:
Enter the full URL to the image you want to associate with the Post in the Image URL metabox field. See Configuration Guide – How to use the Media Uploader to get the custom field image URLs for an easy way of uploading and finding the images’ full URL.
You can also enter a Description (which is displayed in the gallery’s Slide Pane) here, add an External link (if you want the image to link to somewhere else other than the Post/Page it is associated with, and even Exclude this Post from the gallery (useful if you use the One Category Gallery Method and don’t want a particular recent post to show in the gallery.
The metabox also allows you to set a Sort Order for the images when using the Pages Gallery Method. (This needs to be enabled in the plugin’s Settings page first, before the option will be visible in the metabox.)
Auto Slide Pane Descriptions
Since version 3.1, Slide Pane Descriptions can be configured in three ways – Manual, Auto or None. Select the one that suits you best:
- Manual: Enter your own text in the Write Post/Page DCG Metabox Slide Pane Description field.
- Auto: Automatically pulls the description from your Post/Page content. The length of the description and the text for the “More” link can be configured in the Settings page.
- None: No text, apart from the Post/Page title, will be displayed in the gallery’s Slide Pane.
Configure the Restrict Scripts loading options
Go to the Settings page and configure the Restrict Scripts loading option. Your selection here depends on the template file which contains the plugin’s template tag.
Settings: Restrict Scripts loading
See Configuration Guide – How to configure the Restrict Script loading options for more info.
Next steps
Assuming you have followed these steps, the gallery should now have a basic configuration and be fully functional. If it isn’t, re-visit the above steps or start again, this time using the Configuration Guide (which contains a much more detailed explanation and description of the various plugin options).
Finally, style the gallery to suit the look and feel of your site using the Gallery Size and CSS options and Javascript configuration options in the Settings page.
Notes for Wordpress Mu users
Troubleshooting
If you have problems getting the gallery to display properly, start off by re-reading the Quick Start guide and checking that you’ve followed the basic steps described there.
If you still experience problems, follow these tips:
- Check that you don’t have any red validation error messages shown at the top of the plugin’s Settings page. If you do, follow the instructions in the error message to fix the problem. Yellow warning messages are not critical and won’t prevent the gallery from working.
- Turn on Error Messages in the Settings page and look at the Page Source of your gallery page. If the plugin has detected any configuration errors you should see one or more Error Messages (shown as HTML comments) in the Page Source. They are fairly self-explanatory, but more information on what they mean, and how to fix them, can be found on the Error Messages page.
- Look at your Page Source and check that your image URLs are correct, ie check that you haven’t made a mistake when entering the Image URL in the DCG Metabox, and that the image really does exist at that URL. The vast majority of problems reported on the Support Forum relate to errors with image URLs. This is especially true if you can see a black box and loading bar, but no images.
- If you can’t see any code in your Page Source related to the Dynamic Content Gallery, the chances are you have either added the plugin’s template tag to the wrong template file, or forgotten to add it altogether. Refer to the Configuration Guide for detailed instructions on the use of the plugin’s template tag in different template files. Check the Restrict Scripts loading Settings too.
- Refer to the FAQ for other troubleshooting tips.
- Disable other plugins – particularly those which also use javascript – in case there are any conflicts. Alternatively, switch the Javascript Framework option in the Settings page from the default mootools to jquery. Generally speaking, using the JQuery option gets around conflicts between the Mootools script and other plugins.
- If all else fails, and you have checked the FAQ for a possible solution, post a question on the Support Forum. Please note that I don’t monitor the wordpress.org forums, so post your question on my site if you want a speedy response!
Changelog – changes since previous version
3.2.2
- Released 08 February 2010
- Feature: DCG Widget added
- Enhance: Updated dfcg_ui_1_image_wp() info re DCG Metabox
- Enhance: Updated dfcg_ui_multi_wp() info re DCG Metabox
- Enhance: Updated dfcg_ui_onecat_wp() info re DCG Metabox
- Enhance: Updated dfcg_ui_pages_wp() info re DCG Metabox
- Enhance: Updated dfcg_ui_defdesc() info re DCG Metabox
- Enhance: Updated dfcg_ui_columns() info re DCG Metabox
- Enhance: Updated dfcg_ui_create_wpmu() info re DCG Metabox
- Enhance: Updated contextual help text in dfcg_admin_help_content() re DCG Metabox
- Enhance: Updated Error Message text in dfcg_errors() re DCG Metabox
- Bug fix: Added conditional tags to add_action, add_filter hooks in main plugin file
3.2.1
- Released 03 February 2010
- Bug fix: Fixed PHP warning on undefined index when _dfcg-exclude is unchecked
- Bug fix: Fixed missing arg error in dfcg_add_metabox() (in dfcg-admin-metaboxes.php)
- Bug fix: Fixed metabox error of adding extra http:// when using Partial URL settings (dfcg-admin-metaboxes.php)
- Bug fix: Added sanitisation routine to dfcg_save_metabox_data() to remove leading slash when using Partial URL setting
- Bug fix: Increased sanitisation cat01 etc char limit to 6 chars to avoid problems with large cat IDs
3.2
- Released 31 January 2010
- Feature: Added custom sort order option for Pages Method using _dfcg-sort custom field
- Feature: Added "no description" option for the Slide Pane
- Feature: Manual description now displays Auto description if _dfcg-desc, category description and default description don't exist
- Feature: Added Metabox to Post/Page Editor screen to handle custom fields
- Feature: Added _dfcg-exclude postmeta to allow specific exclusion of a post from multi-option or one-category output
- Feature: Added postmeta upgrade routine to convert dfcg- custom fields to _dfcg-
- Enhance: Added text-align left to h2 in jd.gallery.css for wider theme compatibility
- Enhance: Updated inline docs
- Enhance: $dfcg_load_textdomain() moved to dfcg-admin-core.php
- Enhance: $dfcg_errorimgurl variable deprecated in favour of DFCG_ERRORIMGURL constant
- Enhance: New function dfcg_query_list() for handling multi-option cat/off pairs, in dfcg-gallery-core.php
- Enhance: Function dfcg_admin_notices() renamed to dfcg_admin_notice_reset()
- Enhance: Tidied up Error Message markup and reorganised dfcg-gallery-errors.php, with new functions
- Enhance: Renamed function dfcg_add_page() now dfcg_add_to_options_menu()
- Enhance: jd.gallery.css modified to remove open.gif (looked rubbish in IE and not much better in FF)
- Enhance: Moved Admin CSS to external stylesheet and added dfcg_loadjs_admin_head() function hooked to admin_print_scripts_$plugin
- Bug fix: Fixed non-fatal wp_errors in dfcg-gallery-errors.php
- Bug fix: Corrected path error for .mo files in load_textdomain() in plugin main file
- Bug fix: Fixed Settings Page Donate broken link
- Bug fix: Increased sanitisation cat-display limit to 4 characters
- Bug fix: Increased sanitisation Carousel text limit to 50 characters
- Bug fix: Removed unneeded call to dfcg_load_textdomain() in dfcg_add_to_options_menu()
- Bug fix: Mootools jd.gallery.js - increased thumbIdleOpacity to 0.4 for improved carousel visuals in IE
3.1
- Released 28 December 2009
- Feature: Added auto Description using custom $content excerpt + 7 options
- Enhance: dfcg_baseimgurl() moved to dfcg-gallery-core.php, and added conditional check on loading jq or mootools constructors
- Enhance: Tidied up Settings text for easier gettext translation
- Enhance: Tidied up Settings page CSS
- Bug fix: Fixed "Key Settings" display error when Restrict Scripts is set to Home page only ("home" was used incorrectly instead of "homepage").
- Bug fix: Fixed whitelist option error for WPMU in dfcg-admin-ui-sanitise.php
- Bug fix: Category default images folder can now be outside wp-content folder
3.0
- Released 7 December 2009
- Feature: Added alternative jQuery gallery script and new associated options
- Feature: Added WP version check to Plugins screen. DCG now requires WP 2.8+
- Feature: Added contextual help to Settings Page
- Feature: Added plugin meta links to Plugins main admin page
- Feature: Added external link capability using dfcg-link custom field
- Feature: Added form validation + reminder messages to Settings page
- Feature: Added Error messages to help users troubleshoot setup problems
- Feature: Re-designed layout of Settings page, added Category selection dropdowns etc
- Feature: New Javascript gallery options added to Settings page
- Feature: Added "populate-method" Settings. User can now pick between 3: old way (called Multi Option), One category, or Pages.
- Feature: Added Settings for limiting loading of scripts into head. New functions to handle this.
- Feature: Added Full and Partial URL Settings to simplify location of images and be more suitable for "unusual" WP setups.
- Feature: Added Padding Settings for Slide Pane Heading and Description
- Bug fix: Complete re-write of code and file organisation for more efficient coding
- Bug fix: Changed $options variable name to $dfcg_options to avoid conflicts with other plugins.
- Bug fix: Improved data sanitisation
2.2
- Released 5 December 2008
- Feature: Added template tag function for theme files
- Feature: Added "disable mootools" checkbox in Settings to avoid js framework being loaded twice if another plugin uses mootools.
- Feature: Changed options page CSS to better match with 2.7 look
- Bug fix: Changed handling of WP constants - now works as intended
- Bug fix: Removed activation_hook, not needed
- Bug fix: Fixed loading flicker with CSS change => dynamic-gallery.php
- Bug fix: Fixed error if selected post doesn't exist => dynamic-gallery.php
- Bug fix: Fixed XHTML validation error with user-defined styles/CSS moved to head with new file dfcg-user-styles.php for the output of user definable CSS
2.1
- Released 7 November 2008
- Bug fix: Issue with path to scripts due to WP.org zip file naming convention.
2.0 beta
- Released 5 November 2008
- Feature: Major code rewrite and reorganisation of functions
- Feature: Added WPMU support
- Feature: Added RESET checkbox to reset options to defaults
- Feature: Added Gallery CSS options in the Settings page
1.0.0
- Public release 1 September 2008
0.9.1
- Released 26 August 2008
- Activation and reactivation hooks added to code to setup some default Options on Activation and to remove Options from the WP database on deactivation.
0.9.0
- Beta testing release 25 August 2008
Development version
Updated: 31 January 2010
A development version isn’t currently available.
Screenshots – current version
-
Dynamic Content Gallery
-
Settings Page (part only)
-
Settings - At a glance settings info
-
Settings - Image File Management
-
Settings - Gallery Method
-
Settings - Gallery CSS
-
Settings - Mootools or jQuery scripts
-
Settings - Gallery javascript options
-
Settings - Restrict scripts loading
-
Settings - dfcg-image and dfcg-desc custom columns



