=== 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.3 An easy way to turn posts into image galleries. Very customizable. Can read and set IPTC and XMP captions == Description == The galleries are file folders that contain images, a subfolder to store thumbnails (called "thumbs" by default), a subfolder called "template" (optional, it can be used to customize the way individual galleries look like) and an ini file (optional, called "desc.txt". Picasa.ini is also recognized ;)). The current code supports two-level nesting (think of it as a photo album with several pages). Galleries can contain any (reasonable; you'll probably have problems if you put thousands of photos in a gallery :D) number of images. 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 "thumbs" subfolder holds the image thumbnails; their 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). Since version 0.2, with the addition of the template support, you can have another subfolder called "template" if you want to customize the output. Check the included sample gallery to get an idea of this. 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". == 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 * if you do not want to use full urls, uncheck it 5. go to Options → Permalinks to update the permalink structure; it's enough to open the page, no further action is needed if Wordpress has write access to the .htaccess file; if it doesn't, then you probably know what to do anyway ;) 6. that's all == Frequently Asked Questions == = How is it licensed? = GPL = What are the requirements? = * Wordpress 2.0 (it should be easy to adjust to 1.5, though) * `mod_rewrite` permalinks enabled (needed only for the TinyMCE plugin), or the following code in a .htaccess file in the blog root ` RewriteEngine On RewriteBase /wp/ RewriteRule wp-includes/js/tinymce/plugins/inline\_gallery/(.*) wp-content/plugins/inline\_gallery/tinymce/inline\_gallery/$1 [L] ` == Screenshots == nope == 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, publish, view post * if you see an old 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