2005-01-01

WP-Gallery 0.2

Filed under: WP-Plugins — Geoff @ 10:46 am
Update 2005-03-22: There is a new release, version 0.32.

This WordPress plugin allows posting images and links to your Gallery albums and photos.

For more information, see the information posted about release 0.1.

Improvements/fixes in this version:

  • Fixed the typo bug discovered by Cloudsoup for <img> class attributes.
  • Adds support for up2date plugin notification (which checks every 10 days).
  • Allows links to non-jpg photos–just make sure to include the extension in the photo filename, e.g., <WPGallery>molecules/Nanotube.png</WPGallery> — if the extension is not included, it is assumed to be .jpg as was the case for version 0.1.
  • Optionally allows use of <WPGallery> tags in comments and comment excerpts.
  • Adds a <WPGallery> quicktag button to the post editor using the Edit Button Framework.

To insert photos, you use the following tags in your post:
<wpgallery>bigsur04/BigSur7</wpgallery>
<WPGallery>molecules/Nanotube.png</WPGallery>

You can also use a direct PHP function call:
<?php echo wpgallery_link($album, $photo) ?>

The PHP function call also makes other options available, such as attributes in the <img> and <a href=""> tags.

To install, download the plugin, edit the "GALLERY_BASE" and "ALBUM_BASE" definitions in the wp-gallery.php file, upload to your WP plugins directory, and activate. Download as .zip or .tar.gz

If you want to allow images in comments, you’ll also want to uncomment the appropriate lines in the plugin.

Updating from version 0.1 requires basically the same procedure.

19 Responses

Mentioned Elsewhere

  1. Pingback by Barry Price » Blog Archive » I Have — 3 years, 4 months ago.

    [...] ed air conditioning with a log fire Upgraded the blog to Wordpress 1.5, disabling all but one of the plugins Next, I think I might sleep. The final few photos from T [...]

  2. Pingback by Mutant Frog Travelogue » Blog Archive » Wordpress Gallery plugin — 3 years, 4 months ago.

    [...] lugin Now that I’ve installed Gallery on my website, I’m trying out this plugin that lets you integrate Gallery thumbnails into your wordpress blog [...]

  3. Pingback by WP-Gallery Plugin 0.1 » geoff hutchison: blog — 3 years, 2 months ago.

    [...] 0.1 Filed under: WP-Plugins — Geoff @ 10:22 pm Update 2005-01-01: There is a new release, version 0.2. This WordPress plugin allows posting images and lin [...]

  4. Pingback by El Jardín de los Presentes » +bien y política por Google — 3 years, 2 months ago.

    [...] rfecto esa contramedida) WP Gallery y AmazonDos nuevos plugins que instalé. (WP Amazon y WP Gallery), son espectaculares. Con WP Amazon puedo inserta [...]


Comments

  1. Mac — 3 years, 6 months ago.

    thanks for the update :) looking forward to the full-sized image ability.

  2. Carla — 3 years, 6 months ago.

    How would one include the command to make the text wrap around the image (align=left, etc.) as part of the implicit commands of the wpgallery tag? Can alignment and wrap formatting be added to the plugin, and, if so, how?
    Am I even making sense, or just rambling? :D

  3. Geoff — 3 years, 6 months ago.

    Right now, there are no attributes to the <wpgallery> tag. However, if you’re using 0.2, by default the tag should give every <img> tag a CSS class of “galleryimage” and the surrounding <a href=""> a CSS class of “gallerylink” that you can style as you wish for text-wrapping or whatever. Granted, that would change every inserted image identically.

    I intend to add attributes (e.g., control over the CSS class, size of the inserted image, etc.) in the next release, but wanted to get this out sooner rather than later. :-)

    A workaround in the meantime–if you want to style particular inserted images, then wrap a <div class="..."> </div> around the images and then write CSS styles for the div class. Not as elegant, but it would get the job done.

  4. Carlos — 3 years, 6 months ago.

    Geoffrey,
    thank you for your pluging!
    I am not an expert in PHP, I tried to use the code that you give here in your site and with the plugin but didn’t obtain any result.
    For me is not clear how to integrate your plugin in index.php
    Where is defined tag?
    Can you please put a complete example on how can I put the code for the link to the gallery in the sidebar of my index.php?
    I have the blog at http://mysite/blog the gallery at http://mysite/gallery and my albums at http://mysite/albums.
    Sorry for this basic question but I can not go through this obstacle.

  5. iJosh — 3 years, 6 months ago.

    Great plugin, works for the post part. Having a small issue, a user clicked on the category the post with the image was in and it seemed that the plugin did not do its job. It’s like wordpress stripped the plugin tags right out of the post. See here http://www.underland.org/?cat=2 vs. http://www.underland.org
    Thanks for your time and effort, again exellent plugin.

  6. Geoff — 3 years, 6 months ago.

    Carlos,

    First off, make sure that you have edited the lines in wp-gallery.php that say define ('GALLERY_BASE', 'http://mysite/gallery'); and define (' ALBUM_BASE', 'http://mysite/albums '); to point to the URLs for your gallery and album directories. Otherwise the plugin will attempt to load photos from my site. Probably not what you want.

    At that point, edit index.php and find the point in the sidebar you want the photo. Add something like < ?php echo wpgallery_link('ithaca', 'Taughannock') ?> where you have some album named ‘ithaca’ and a photo named ‘Taughannock’ in that album. Is that more clear?

  7. Geoff — 3 years, 6 months ago.

    iJosh,

    It looks to me like you have a more recent version of the WordPress 1.3/1.5 development code than I’ve tried. My guess is that one of the filters is stripping out “unauthorized” HTML tags–which would include the <WPGallery> tag. Try editing wp-gallery.php and find the lines for add_filter('the_content', 'gallery_link'); and
    add_filter('the_excerpt', 'gallery_link'); and edit them to add a priority level, e.g., add_filter('the_content', 'gallery_link' ,0);.

    Please let me know if that solves it–otherwise I’ll eventually try out a development version and see what’s going on.

  8. iJosh — 3 years, 6 months ago.

    Geoff,

    No such luck on the edit. Again your time is appreciated.
    I am using the nightly builds. I usually update the build about every 2-3 days while I am in development.

  9. ktuluz — 3 years, 6 months ago.

    any ideas on using this with gallery2 with data dir outside the webroot? i can get thumbs to display using gallery2/main.php/download as ALBUM_BASE but no link love. as the thumbs/links seem to use a differet dir setup.. i could be wrong i am no php coder

  10. George — 3 years, 6 months ago.

    Note for installation instructions: make sure the paths DO NOT end with a trailing slash. I did this out of force of habit, and got a ‘file not found’ error. Deleted a trailing slash, and everything works okay. Thanks for the plugin.

  11. Erwan — 3 years, 6 months ago.

    Geoff, thanks for the plugin, but I have a problem. Basically, I have EasyPHP on WinXP, and cannot get the mod_rewrite module to work for some reason. I guess that’s why your plugin is not working, and I tried to modify it, by changing the link formatting, but then I get a big error. Is there any formatting issue with the ‘&’ and ‘?’ signs? or am I wrong and does your plugin handle ‘long’ Gallery URLs ?
    Thanks !

  12. Geoff — 3 years, 6 months ago.

    Erwan and ktuluz — right now, it’s designed to handle the mod_rewrite Gallery 1.x URLs like I use on my site. The next release should be much easier to configure, allowing the flexibility to support other URL styles like the “long” Gallery URLs or the G2 URLs. This will also make it much easier to handle the variety of G2 URLs currently being used.

    Examples or trackbacks would be greatly appreciated, so that I can see the URL style on your particular website rather than having to install/reconfigure my website for each format.

  13. Nat — 3 years, 6 months ago.

    Hey great plugin. i love it. but there is one small problem, your plugin does not grab thumbnails for pictures taht are not jpeg’s correctly. For instance, all of my photos in one folder are .png and id love to post about them, but well there is this little bug :)

    just informing you. ill look to see if there is a work around, other than that, great job keep up the great work :)

  14. Geoff — 3 years, 6 months ago.

    Nat,

    No, it definitely works for PNG files — I have a folder like that myself. See the “Nanotube.png” example above. If the photo isn’t a .jpg file, you have to specify the extension explicitly.

  15. David Carrington — 3 years, 6 months ago.

    I’m very interested in a version which works with G2.

Subscribe to comments on this post via RSS or TrackBack

Sorry, the comment form is closed at this time.

Powered by WordPress
Except where noted, all contents Copyright © 2004-2005 Geoffrey R. Hutchison, licensed under a Creative Commons license.