=== 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, upload, sidebar, picture, random, latest License: GPL v3, see LICENSE Requires at least: 2.5 Tested up to: 2.7.1 Stable tag: 0.7.0 Simple widget to show the latest/random images of the wordpress media gallery (Wordpress 2.5++) == 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()) For more examples and other questions, take a look at the [support forum](http://board.splash.de/forumdisplay.php?f=102). == Changelog == `0.7.0 - [NEW] shortcodes to use the php-functions in articles/pages 0.6.1 - [FIX] don't print debug message as html comment 0.6.0 - [NEW] OOP rewrite (with wrapper functions for the old function calls) 0.5.17 - [BUGFIX] include option will work now again... 0.5.16 - [FIX] use the table prefix 0.5.15 - [FIX] supress the error message, if no posts found for include/exclude... 0.5.14 - [NEW] New option: show only 1 image per post 0.5.13 - [FIX] SQL-performance improvement on include/exclude-option 0.5.12 - [FIX] Can add CSS-class @widget control menu - [FIX] Include/exclude categories - [NEW] Option: add a link relation 0.5.11 - [FIX] Missing mime_type added (for the custom sql query used by "category-option" include/exclude) 0.5.10 - [NEW] Option to link to the (parent) articles instead of the images (actually only works with "category-option" set to include or exclude) 0.5.9 - [NEW] Option: Link to images directly or to the summary page (with the ability to comment on images) - [NEW] Option: Add a CSS-class to the link 0.5.8 - [FIX] MySQL 5.0.51/GROUP BY-Problem - take a look at the warning 0.5.7 - [FIX] On option "all categories" a debuginfo was shown 0.5.6 - [NEW] New Option, now you can decide if the Widget is shown on all pages or the frontpage only 0.5.5 - [NEW] Option to include or exclude categories of posts (see FAQ) 0.5.4 - [NEW] "selecting" post-categories to be used to get attachments 0.5.3 - [NEW] It is now possible to get "latest" or "random" Images`