=== Inline Gallery === Contributors: m0n5t3r, others needed Tags: images, gallery, post, IPTC, XMP Requires at least: 2.0.0 Tested up to: 2.1 Stable tag: 0.3.4 An easy way to turn posts into image galleries. Very customizable. Can read and set IPTC and XMP captions == Description == This plugin offers a way of including arbitrary amounts of images in posts; the basic ideas came from [AutoGallery](http://kyrres.net/2005/02/04/autogallery/). Here is a [little demo](http://m0n5t3r.info/work/wordpress-plugins/inline-gallery/inline-gallery-demo/) of what it can do; also see [my photos](http://m0n5t3r.info/photo-galleries/) for another flavour :-) **Features**: * plug and play, just like any other Wordpress plug-in * easy to configure * does no processing on the images (except for getting the image metadata), so it's lightning fast * you can have multiple galleries per post * integrated with Wordpress 2.0's wysiwyg editor (the way QuickTags is implemented doesn't allow easy placing of buttons in the toolbar, but that's not a big problem, since you are editing code, anyway) * (since 0.2) output is customizable with templates * (since 0.3.0) supports XMP, IPTC and EXIF captions; The order of preference is: - XMP Dublin Core title and description - XMP Photoshop Headline text - IPTC caption - EXIF comment This means you can also set captions for your files using Photoshop or Picasa, if you don't particularly enjoy editing ini files. * (since 0.3.0) Picasa.ini support (Picasa writes captions there for files that do not support IPTC) * (since 0.3.1) Admin page AJAX-ish gallery browser and caption editor using mootools (needs write access to your image files). == Installation == 1. download 2. unzip and copy the `inline_gallery` folder into `wp-content/plugins` 3. activate the plugin 4. go to Options → Inline Gallery to set it up. Here is an explanation of the settings: * the root folder is the path relative to your site URL, so if you access your wordpress at `http://example.com/blog/` and the images are under `http://example.com/blog/wp-content/galleries`, you should set the gallery root to `wp-content/galleries` * the image types list is simply a comma separated list of file extensions 5. you're done == Frequently Asked Questions == = How is it licensed? = GPL = Does it require PHP safe mode to be off? = No = What are the requirements? = * Wordpress 2.0 or later * the gd library enabled in PHP = I installed it and it shows images. How come I don't have fancy Javascript effects like you? = that's because I didn't bundle any lightbox-type wizardry with the plugin; why? because: * I am using a modified version of Slimbox, which is a Lightbox clone that uses Mootools; Since there are themes that rely in Prototype for ajax magic, loading Mootools would break them (Mootools is slightly incompatible with Prototype) * Bundling the original (Prototype-based) Lightbox would wreak havoc for people that use other libraries like Mootools, jQuery, Mochikit... you get the idea However, the (X)HTML generated by the default theme is Lightbox compatible and groups the images on a folder basis. == Screenshots == nope == Usage == The galleries are file folders that contain images, thumbnails, optionally a subfolder called "template" (can be used to customize the way individual galleries look like) and an optional ini file (called "desc.txt", but Picasa.ini is also recognized ;)). The default template expects a thumbnail for `imagename` to be called `thumbs/thumb-imagename`. The current code supports two-level nesting (think of it as a photo album with several pages). Galleries can contain any (reasonable) number of images. Reasonable means that you'll run into problems if you put hundreds of images in a folder, due to the sheer size of the generated HTML. A sample gallery is included (more about this later). "desc.txt" is a classic ini file, looking like: ` #comment ;another comment [keyword] ;comments can stay here, too variable=value ` If the variable name is missing, "caption" is assumed; actually "caption" is the only variable that is taken into account for now. The keyword can be: * "tag"; the following caption is a description of the gallery * a file name; the following caption is the alt text and the title of the image (if there is metadata included in the image, the value from the ini file is ignored) So, a desc.txt file could look like this: ` [tag] This is a short description of the gallery [image1.jpg] this is an alt text ... ` It's easy to generate a listing of the image files in a folder, especially if you are using Linux ;). It took me about 10 minutes to produce a desc.txt file for about 70 photos, so it's fast enough, all you need is a text editor and some way of previewing the images (decent graphical file managers can show thumbnails). Also, you can use Picasa or some other photo manager that embeds metadata in images to set captions, or the admin management page (more about it later) The thumbnail dimensions are your choice. The thumbnails can be easily generated using Photoshop's batch mode or ImageMagick's convert in a shell one-liner (a bash script for setting up a gallery is included, it's in batch/make-gallery.sh). The galleries lie in the gallery root folder you have configured. The top folder for a post/page gallery must have the same name as the post or page slug, i.e. if the post URL is `http://columbus.com/blog/1492/10/12/just-found-america`, then the top folder should be called "just-found-america". == Installing the sample gallery == * Copy the "sample" folder under the gallery root you chose * create a post or a page called "sample", enter `` as the contents or press the "insert gallery" button and then OK without entering anything, publish, view post * if you see a black cat, then you have everything working correctly :D == Inserting a gallery in a post == * in code edit mode: - enter `` where you want your main gallery to appear, or - enter `` if you want to insert a nested gallery * in visual editing mode, click the "insert gallery" button (it kind of looks like the "insert image" button), and enter `/subfolder/` in the input box for a 2nd level gallery, leave it blank or press cancel for the top gallery Note that the top folder doesn't need to contain images, it can be just a place to store sub-galleries. == The gallery browser == * Is located under Manage → Galleries * Uses a folder icon from the Etiquette icon theme * Is tested in Firefox 2.0, Opera 9 and Internet Exploder 6, so far, both with the default theme and wp-admin-tiger; pixel-perfect in Firefox and Opera, there are still some CSS glitches in MSIE, but the JS works and it doesn't break the layout (too much :P) * Is designed for lazy people: - click a gallery, the first image is loaded - click the caption field, edit, press enter, it is saved - the next image is loaded and the caption field is already active - allows quick navigation among the images in the loaded gallery by using the left and right arrow keys or **n** and **p** when the caption editing field is not active * Needs write access to the gallery folder and files to update the captions and will reset file ownership to the uid of the web server process; on shared hosts that run the web server process under the same uid as the one you use to connect via (s)ftp it is not an issue * Is in the "works for me" phase, needs testing and may also kill your pet :P