=== Image Archives ===
Contributors: coppola00
Donate link:
Tags: image, archive, post list, list, thumbnail, jQuery, jQuery UI, Accordion, Tabs
Requires at least: 2.0
Tested up to: 3.5
Stable tag: trunk
Image Archives is a wordpress plugin that displays images from your published posts with a permalink back to the post that the image is connected to. This plugin aims to show your recent posts with images for visitors on your site.
== Description ==
(First of all, sorry for my bad English.)
Image Archives is a wordpress plugin that displays images from your published posts with a permalink back to the post that the image is connected to.
This plugin create a image list that is based on images you uploaded, not based on posts.
**This plugin aims to show your recent posts with images for visitors on your site.**
See how this plugin works on [Sample Page(My site)](http://nomeu.net/image-archives/).
If you found any problems with this plugin, please tell me. "nomeu[-at-]nomeu.net".
= NOTICE =
* The images you want to show are needed to be attached to posts they were published in (Attaching with post is automatically done by Wordpress when you upload images on creating/editing a post).
* In order to link to the permalink of a post, the post must be "published".
* If a post doesn't contain a image(external images was not searched), this post is not listed.
= HOW TO USE =
It is simple. Write a shortcode **\[image\_archives\]** on the place where you want to show a list of your images linked to their host posts.
But at first, I recommend you to write a shortcode "**\[image\_archives first_image_mode=on\]**" on a unpublished post.
This "first_image_mode" is a easy way(mode) to show a list. Without configuring a search strings, you can show a list which contains A image per A post.
(If you want to change the number of images per a post, set this attribute "off".)
(And please note that the 'first' image means your 'first' uploaded image in a post. If you want to show a first image that is sorted by filename, use "image\_order\_by=title". You can also use "image\_order=DESC" at the same time. This means a latest image in a post is showed.)
Then you can see the output and how attributes works. After this, set some attributes for this plugin as you want.
Attributes are written like the following.
[image_archives term_id=? ordered_by=? order=? str=? limit=? size=? design=? item=? column=? date_format=? date_show=? cache=?]Write only your necessary attributes. Default settings are below. Probably you should change "str" and "term_id" at least. You can also use the php function of this plugin. In order to use the function, write "wp\_image\_archives\(\);" within php code. As for the attributes, write like below.
wp_image_archives ('term_id=9&order=DESC&design=1');= Default values = * first_image_mode = off * image_order_by = date * image_order = ASC * term\_id = 1 * order\_by = title * order = ASC * str = % * limit = 0,50 * size = medium * design = 2 * item = 9 * column = 3 * date\_format = Y-m-d * date\_show = off * title\_show = on * cache = on * section_name = Section * section_sort = number * section_result_number_show = on = Explanation = * **first\_image\_mode** is the feature you can show a image per a post without configuring the search strings. Default of this attribute is "off". If you set first\_image\_mode=on, you can use the following two settings. * **image\_order\_by** is the method of ordering the searched images within a post. You can use "title" or "date". This attribute is enabled only when first\_image\_mode is on. * **image\_order** requires the sort type within a post. You can use "ASC" or "DESC". Uppercase only. This attribute is enabled only when first\_image\_mode is on. * **term\_id** requires unique ID(s) of tags or categories(You can check Term IDs on 'Post -> Category' on Dashboard.). You can use several IDs like 'term\_id=1,3,10'. Numbers only. Or you can search all of your categories with 'term\_id=ALL' (Uppercase only). * **order\_by** is the method of ordering a list of the images(posts) in the output. You can use "title" or "date". * **order** requires the sort type in the output. You can use "ASC" or "DESC". Uppercase only. * **str** is a search string. The search string must be a part of the file name of images you uploaded. This plugin searches "post\_title"(these are seen in "MEDIA LIBRARY" -> "FILE" or "TITLE") in your wordpress database for the string. This string is required to be SQL LIKE condition string. Please refer to [SQL LIKE condition](http://www.techonthenet.com/sql/like.php). * **lmit** is a limit of the images that is shown. Write this attribute like '*start number*,*the number of posts*' . example, 'limit=0,30' . You can also use this like 'limit=20,30'. * **size** is the size of the images. "thumbnail" or "medium" or "large" or "full". These actual sizes are based on your Wordpress settings. * **design** is the type of the output design. "1" to "5" at present. "design=4" and "5" uses jQuery and jQuery UI. "design=4" uses [Accordion](http://jqueryui.com/demos/accordion/). "design=5" uses [Tabs](http://jqueryui.com/demos/tabs/). * **item** is the number of images per a section on "design=4,5". This attribute is enabled only when "design=4,5". * **column** is the number of columns. This attribute is enabled only when "design=2,4,5". * **date\_format** is the date format. Please refer to [PHP.net date format](http://php.net/manual/en/function.date.php). * **date\_show** is a switch to show posts' date or not. You can use "on" or "off". * **title\_show** is a switch to show posts' title or not. You can use "on" or "off". * **cache** is a switch to cache the output. You can use "on" or "off". If you set "*cache=on*", the output cache will be created in the plugin directory. This cache file will be renewed when you publish a article or edit a article. * **section_name** is the section name in "design=4,5". You can change the section name as you like. * **section_sort** is the method of sorting section in "design=4,5". You can set "number" or "category" to this attribute. If you set "category" to this attribute, "limit" will be the limit number of images per a category. And please be careful, using "section_sort=category" takes a little long time, so I recommend you to use "cache=on" at the same time. As for the order of categories, those are ordered by "term_id" you set. If you set "term_id=2,4,6", the order of the categories is "2,4,6". So if you want to change the order, you should set it like "term_id=6,2,4". * **section_result_number_show** is a switch to show the number of your search result. You can set "on" or "off". But this attribute is effective in "design=4,5" and "section_sort=number". You can also change design of the output with CSS. output HTML tags, *table*, *div* have a class="img\_arc". *div* before a image have a class="img\_arc\_img", *div* before text have a class="img\_arc\_text". = CSS example =
table.img_arc {When you use jQuery UI designs, please refer to [Accordion](http://jqueryui.com/demos/accordion/), [Tabs](http://jqueryui.com/demos/tabs/). jQuery automatically will add classes with outputted elements. As for the color themes of Accordion(design=4) and Tabs(design=5), these themes are changeable. If you want to change themes, visit jQuery UI(http://jqueryui.com/themeroller) and download a theme file. Then, extract it, and overwrite the files of this plugin(/css/) with the downloaded files(/css/THEME_NAME/). In order to overwrite the files, you need to use FTP or else. The files is located under your wordpress folder(/wp-content/plugins/image-archives/css/). = Frequently Asked Questions = * **I want to show a chosen image in a post!**
border: 0 none;
}
div.img_arc_img, div.img_arc_text {
text-align: center;
line-height: 1;
}
div.img_arc_text a {
text-decoration: none;
}
to