=== Gallery Widget === Contributors: Oliver Schaal Website link: http://blog.splash.de/ Author URI: http://blog.splash.de/ Plugin URI: http://blog.splash.de/plugins/gallery-widget/ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=C2RBCTVPU9QKJ&lc=DE&item_name=splash%2ede&item_number=WordPress%20Plugin%3a%20Gallery%20Widget&cn=Mitteilung%20an%20den%20Entwickler&no_shipping=1¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest Tags: gallery, widget, image, attachment, media, sidebar, picture, random, latest License: GPL v3, see LICENSE Requires at least: 2.5 Tested up to: 2.7.1 Stable tag: 0.7.2 Simple widget to show the latest/random images of the WordPress media gallery as a Widget, using a shortcode or directly with a php-function. == Description == Gallery Widget is a simple plugin that let you show the latest/random images of the wordpress media gallery inside a widget or directly in your templates (it is possible to choose some categories to be included/excluded). Since version 0.7.0 you could show the images in articles/pages with a shortcode (see faq). For more information on how to use this plugin see [splash ;)](http://blog.splash.de/plugins/) Please report bugs and/or feature-request to our ticket-system: [TicketSystem/Wiki](http://trac.splash.de/gallerywidget). For Support, please use the [forum](http://board.splash.de/forumdisplay.php?f=102). == Installation == 1. Upload the 'gallery_widget' folder to the '/wp-content/plugins/' directory 2. Activate the plugin through the 'Plugins' menu in the WordPress admin 3. Go to Design->Widgets, activate the "Gallery Widget", adjust the title and max number of images to your needs or 3. use the php-functions ` getAttachedImages(maximages, [latest|random], [old|direct], css-class, relation); ?> ` or ` getAttachedImagesByCategories(maximages, [latest|random], categories commaseparated, [include|exclude], [old|direct|article], css-class, relation, singleimage[yes|no]); ?> ` in your template. Warning: Cause of the way the attachments are fetched using the standard option (all), even images of not yet published posts are shown. If this is a problem for you, you should use the option (include or exclude), although it is less optimized. == Frequently Asked Questions == = How can i adjust the look of the Widget? = Just use the CSS-Class "wGallery" to alter the ul- or li-tags. = How can i get only the images of one/some categories? = Use the category-option include or exclude and enter the id's separated by comma in the options of the widget. Using include or exlcude causes more sql-queries and is slower than the base function. You should only use it if you're blog doesn't have to much traffic and/or your host can handle it :) = Why doesn't the images link to the parent article? = This option actually only works with "category-option" set to include or exclude. = How do i use the shortcodes? = Latest 5 images linking to the attachment page (default option): `[getGWImages]` You could use the following parameters: `- max=int - order='latest|random' - linktype='direct|page' - linkclass='css class' - linkrel='relation for the link'` i.e. 3 random images with a link to the images: `[getGWImages max=3 order=random]` If you would like to use the category include/exclude options you have to use this shortcode: `[getGWImages2]` The following parameters are possible: `- max=int - order='latest|random' - categories='comma separated list of category id's' - option='include|exclude' - linktype='direct|page' - linkclass='css class' - linkrel='relation for the link' - singleimage='yes|no'` = Is it possible to show the images at any position in the theme (not only as widget)? = Yes, you can use the following code to include the images: ` getAttachedImages(maximages, [latest|random], [old|direct], css-class, link-relation); ?> ` for instance, 5 random images: ` getAttachedImages(5, 'random'); ?> ` latest 7 images of the categories 1, 2 and 5, only 1 image per post/link to article (css: wGallery, relation: lightbox): ` getAttachedImagesByCategories(7, 'latest', '1,2,5', 'include', 'article', 'wGallery', 'lightbox', 'yes'); ?> ` Attention: If you wan't to use the galleryWidget-object in a function (like the sidebar), you have to include the global variable $galleryWidget (add `global $galleryWidget;` before if()) = Shortcode-Example using CSS = To show 9 random images: - In your article just post the following (in html, not wysiwyg-mode) `