Shashin 2.3.5 Now Available

I had hoped to finish version 2.4 by now, but I’ve been busy with other projects and haven’t had enough time for it. So I’m releasing 2.3.5, which will be the final patch for version 2.3. There were a few bugs that people discovered since the last patch, and I don’t want to delay getting the fixes out. You can download it from wordpress.org, or if you already have a previous version installed, your plugin menu should give you a link within the next 24 hours to automatically upgrade.

Patches aren’t supposed to have new features, but this has a couple small ones, since I had already finished working on them.

  1. In addition to floating left or right, you can use “center” as an option for positioning your shashin tags and widgets. For example:
    [simage=600,576,y,center]

    This gives the picture with key 600 a width of 576, shows the caption, and centers the picture. Shashin uses the CSS “margin-left: auto; margin-right: auto;” technique to center the picture. This means you can leave out the “clear” argument if you’re centering, as the subsequent content will be automatically pushed below the picture.

  2. The simage tag has a new, optional 6th argument, which lets you specify an alternate thumbnail image. This is particularly useful for videos, as sometimes Picasa is unable to generate a thumbnail (I’ve run into this with a couple of mp4 videos, where the Picasa-generated thumbnail is just a solid black image). You can see it in Post to Post Links II error: No post found with slug "takanawa-yochien-kindergarten-video". The thumbnail is a still frame from the middle of the video. The syntax looks like this:
    [simage=432,288,y,left,none,433]

    The number at the end is the photo key for the thumbnail image to use. Note this option is available only for the simage tag.

These are the bug fixes:

  • Fixed incomplete localization code for widget menus
  • In the album photo admin menu, now correctly saves whether photos should be included in random display
  • The salbumphotos tag can now handle sort order options with spaces (e.g. “pub_date desc”)
  • The salbumphotos tag no longer shows a “go back” link, as there’s nothing to go back to

63 Comments

  1. kelvin March 20, 2009

    My picasa url is picasaweb.google.com/ntumsa08 but when I input picasaweb.google.com as my picasa server, I reached an error. Shashin displayed a message that said ‘failed to parse album feed’. What should I do to solve the problem? Thank you.

  2. Mike March 20, 2009

    I just added your albums on my test installation and worked fine. It took a while to run though, since you have a good number of albums. Try adding just one of your albums and see if that works. If it does, then try adding all your albums again.

  3. Jesper March 21, 2009

    Hi.

    I think I have a feature request.

    I would love to use the SIMAGE tag to place pictures in my posts. Like I have done on http://thusgaard.eu. But instead of opening the picture in large I would love it to open the album.

    Also I saw a neat feature in a album elsewere on the web. Instead of 2 small arrows at the top of the picture. Each picture had an invisible line down the middle. If you clicked to the left of the middle you would get the previous picture and to the right of the middle you would get the next picture.

    Also do you know how I can get rid of the scroll bars?

    J;-)

  4. Patrick March 21, 2009

    Hi there. Can Shashin only be used on one page in a WordPress blog? I am trying to use it on two separate pages. I have it implemented exactly the same on the second as I have on the first, but the second won’t come up. I am using the exact same tag.

  5. Brent Rasmussen March 21, 2009

    Hi Mike,

    I was happily using the 2.2 plug-in, then I upgraded to 2.3.5. I successfully changed to the new tag to display all my albums, but now the “Newest Photos” widget, and the “Random Photos” widget do not work. Instead they show:

    “Shashin Error: unable to retrieve random photos.”

    …and:

    “Shashin Error: unable to retrieve newest photos.”

    Please note that all the other Shashin widgets work fine.

    Any thoughts? I’d really like to be able to use the Random Photos widget.

    I have already deactivated, then re-activated the plugin, but this didn’t help.

    Thanks in advance for your time,

    -Brent Rasmussen

  6. Brent Rasmussen March 21, 2009

    Hi Mike,

    Nevermind – I figured it out. I just didn’t set the widget up like it was supposed to be. 🙂

    For those of you who may be having the same problem, please note that the default Random Image widget in 2.3.5 comes *blank* (for lack of a better word.) In other words, you can’t just add it, then Save, and have it start showing random images from your albums.

    Instead, it *requires* that you manually re-set the image size, the number of images, the max number of rows, and optionally the new CSS attributes in the widget’s “Edit” area. After clicking “Done”, remember to also click the “Save” button in WP to save your changes permanently.

    If you add the widget, but do not set these options, the Random Images widget will throw the error I mentioned above.

    Thanks, Mike, for one of the best WordPress plugins out there! I love Shashin! 🙂

  7. BB March 23, 2009

    How can I display images in a post without displaying the album title above them?

  8. Milan Stosic March 23, 2009

    Hi Mike,

    I’ve just found out that Shashin highslide effect is not working if “Google Analytics for WordPress” is enabled, because this plugin adds some extra js code to “<a href=..” tag that messes up with highslide script.

    It’s not a bug, just some missmatch with plugins 😀

    Regards, Milan

  9. Mike March 23, 2009

    Hi Jesper – that’s an interesting idea. To do it, I could add another argument to salbumthumbs that would let you specify an alternate image to use as the album thumbnail. I’ll add it to the wish list.

    Highslide can’t display images the way you describe, and it would be a huge undertaking to integrate a different photo viewer.

    Those scrollbars are not coming from Shashin. You have your shashin tag inside of a “pre” tag for some reason, which is causing that effect.

  10. Mike March 23, 2009

    Hi Patrick – you should be able to use Shashin on as many pages as you like. Let me know the tags you’re using, give me a link, and I’ll take a look.

  11. Mike March 23, 2009

    Hi BB – it sounds like you’re using the salbumthumbs tag. If that’s right, then in shashin.css, look for .shashin_album_title, and change the display value to “none”. Save your edited copy of shashin.css to your active theme’s folder, and Shashin will find it there (that way you won’t lose your customizations the next time you upgrade Shashin).

  12. Mike March 23, 2009

    Hi Milan – This plugin conflict is the issue I’m contacted about the most. I wrote up a solution on the Shashin page:

    http://www.toppa.com/shashin-wordpress-plugin/#shashin13

  13. Anthony March 23, 2009

    Hi Mike,

    As described in the release notes for 2.3, I no longer need my second page which only contained the [salbumphotos] tag. However, I was using different WordPress page templates for the two pages.

    Is there an easy way to mimmick the old behavior?

    Oh, and thanks for creating the best WordPress photo plugin (by far).

    Anthony

  14. Kartikey March 25, 2009

    Mike,
    Installed your creation recently and I get this message.

    “Shashin Error: unable to retrieve newest photos.”

    It maybe a common error. I am unable to get past it.
    The code I use:

  15. Kartikey March 25, 2009

    php echo Shashin::getNewest(any,200,1,5,’y’,’left’);

    (with the appropriate tags)

  16. Mike March 26, 2009

    Hi Anthony – you can get the old behavior back with a couple of minor code edits, if you’re up for hacking your copy of Shashin 🙂 . On line 490 of ShashinAlbum.php, you should see this:

    $permalink = get_permalink();

    Change it to the url of your page with the salbumphotos tag – something like this:

    $permalink = "/my_photos";

    That will get the album thumbnail links pointing to the right place. For the salbumphotos tag, it sounds like you already know the syntax has changed. You need to give it an album key now, so put one in. But it actually doesn’t matter what it is – it will be overridden by the album key that comes in on the link, so you can still have one page that will serve photos for more than one album (actually, all of the settings you make in the tag will be overridden by the settings you put in the Shashin admin settings form).

    On line 350 of ShashinPhoto.php, you’ll see it’s constructing the “go back” link that appears on the photos page. Replace the call to “get_permalink()” with the url of the page that has the salbumthumbs tag.

    Having the 2nd page for displaying photos allowed for design flexibility, but I switched to a simpler 1 page approach for two reasons:

    1. It involved a somewhat complicated setup that a lot of people found confusing.

    2. Many themes automatically generate links to every page in their navbars, and the 2nd page would break if linked to like this, without an album key argument.

    Just keep in mind that if you make this change, you’ll need to make the same edits in future Shashin upgrades.

  17. Mike March 26, 2009

    Hi Kartikey – Try putting ‘any’ in quotes since it’s a string. If that doesn’t fix it, let me know.

  18. Kartikey March 26, 2009

    Hi Mike,
    I tried both ” and “” but to no avail.
    I get the same error. Am I missing something?

  19. Mike March 26, 2009

    Hi Kartikey – I copied the tag you provided onto my site to test it, and it worked fine, so your syntax is ok. So let’s make sure your data is ok: did you successfully add at least one of your Picasa albums to Shashin in its admin menu, and do you have a total of at least 5 pictures in the albums you’ve added (since you’re asking for 5 in the tag)?

  20. Kartikey March 26, 2009

    Just to inform the next visitor that I got my issue solved.
    Cheers.

  21. Piet March 28, 2009

    Hi Mike,

    Thanks for your great plugin! I have just recently begun to use Picasa and your plugin and I like it a lot.

    One thing though that can be improved in my opinion is not to use a table when showing the thumbnails of an album.
    I do not really like the use of tables unless really necessary and I think by coding a table-like structure in CSS, it’s easier to customise the entire thumbnail view.
    Also the NextGen plugin I normally use for self-hosted photos does use 100% CSS instead of the table structure to show the thumbnails contained in an album.

    I have been looking into the code of the plugin and the only place where I see the table is created is in ShashinAlbum.php on line 871 (closing tag on line 919).
    I have tried to replace table for div, but that does not have the desired effect as in the html there is still a table created.

    Would it be possible for you to let me know where to look, so I can make the necessary changes?

    I look forward to hear from you.

    Thanks,
    Piet

  22. Mike March 31, 2009

    Hi Piet – Sorry for the delay getting back to you. The method you found in ShashinAlbum.php is _getTableMarkup – it creates the table, and the rows and cells in it. The contents of each cell (the album thumbnails) are generated by _getDivMarkup. ShashinAlbum controls the display of the album thumbnails. ShashinPhoto.php uses similar logic (with the same method names) for displaying photos. You could make an alternative version of _getTableMarkup (maybe call it _getListMarkup) – substitute ul tags for the table tags, remove the tr tags, and replace the td tags with li tags.

    I think you will run into problems though. I initially tried using lists instead of tables, but couldn’t find a way to do so with sufficient flexibility. The Shashin tags allow you to specify any number of columns, with a range of possible sizes for the images. To use lists, I think you would need to put all the CSS inline and calculate widths, etc. dynamically in order to make it work. And I think you’ll have to deal with cross-browser compatibility issues for the CSS as well.

    My use of tables for Shashin is probably not semantically correct in the strictest sense. The pictures are not tabular data, in the sense of a spreadsheet, but they are intended to be presented in a grid. Tables inherently make nice grids, and there are no cross browser compatibility issues. There are cross browser compatibility issues when trying to use CSS to style lists in a grid layout, especially when the number of columns and the size of the cell contents are completely arbitrary.

  23. Lance April 1, 2009

    Something I thought would be nice is if the [salbumlist] could display a random photo. Right now it seems to be picking the latest one.

    Nothing major… just a thought……

    Thanks for the great plugin!

  24. Mike April 2, 2009

    Hi Lance – it’s actually displaying the thumbnail assigned from Picasa for the album. If you haven’t picked a photo to use as thumbnail for it in Picasa, then Picasa will use the newest photo in the album.

  25. Krissi April 5, 2009

    Mike, I can’t find the page with all the instructions on how to use Sashin anymore. Did you remove it?

  26. Mike April 5, 2009

    Sorry about that – I accidentally changed its URL. It’s fixed now.

  27. Krissi April 5, 2009

    Thanks! 🙂

  28. Neil April 14, 2009

    Great plugin! I’ve been wanting something like this forever and I’m glad I found it. I use google for a lot of things and I never wanted to have to upload photos all over the place to get them into my blog. Being able to use Picasa is great. Thanks!

    But I am having one issue that I can’t seem to track down. My thumbnails and album covers are handing outside the image holder instead of being nicely centered in them. Can you point me to where I need to adjust this?

    My site is at http://www.neiltolbert.com – in the footer there are random images and I also have the photo page up and running.

    Thanks!

  29. Mike April 15, 2009

    Hi Neil – Thanks for using Shashin. I think you may have set the image div padding to 0 in the Shashin settings menu. Check that and change it back to the default value of 10. The dimensions of the box with the black border around the image are determined by this number. On your site the box is the same size as the image, but still has an internal margin applied from the shashin stylesheet, so the margin is pushing the image outside the box.

  30. Neil April 15, 2009

    That was it! Thanks for your help. I’ve never been happier with my blog. Love the plugin please do continue to support it.

    Thanks

  31. John April 18, 2009

    Hi Mike,

    I think it would be great if you could add and automatic watermarking feature to Shashin. This would be really useful for protecting photos.

    Cheers
    J

  32. Mike April 18, 2009

    Shashin displays Picasa images, but it does not alter them. Picasa has a good watermarking tool already.

  33. JimB April 20, 2009

    I installed the plugin and have it working, but I have two albums that when I click on the album thumbnail the album is blank. However, when I go to the ToolsShashin page, then go to the album to change the “include in random” settings all the photos show up.

    This was happening on one album. I deleted that album and I imported that album from Picasa again it, and now I have two albums that are blank, the original one and another one.

    I can’t see what i have done wrong. Hope you can help.

    –JimB

  34. Mike April 20, 2009

    Hi Jim – sorry for the trouble. I haven’t heard of a problem like this before. If you still have the problematic albums on line, can you give me links to them, and I’ll take a look?

  35. JimB April 20, 2009

    The page is http://www.betsinger.com/photos. The specific pages are Adia and Noah. All the other albums work fine. The Adia page was working until I deleted the Noah album and re-synced it.

    Any help would be great.

    –JimB

  36. Tom April 21, 2009

    Hello Mike, congratulations for Shashin, it’s a great plugin. Thanks for your work! I have a few questions :

    – is there a specific reason why Shashin does not offer the 1600px max size instead of just 800 ? I have a 23″ screen and I’d love to take full advantage of it when enlarging the pics.
    – the highslide configuration is quite restrictive, and as I was already using the plugin with my own settings, I had to manually remove the declaration of the js files for Highslide from your php code, which I’d rather have avoided.
    – do you think we could pull the EXIF data of the pictures from picasa (and add it to the caption for example)?

    Cheers,
    Tom

  37. Mike April 21, 2009

    Hi Jim – those are the two albums in your collection that have the most photos. So one possibility is that Shashin is timing out trying to get all their photo data from Picasa. (Although it’s odd you say you see the photos on the admin screen – does it look like they’re all there, or just some of them?)

    On the Shashin admin page, try to sync those two albums individually instead of using “sync all”. That is, click the green double-arrow icon that’s next to their titles on the admin page.

    If that doesn’t work, open up Shashin.php and put this on its own line, right after the opening <?php tag:

    set_time_limit(60);

    This will ask your web server to allow Shashin more time to run. Your server may or may not honor the request depending on how it’s configured.

    Let me know how it goes, and let me know if Shashin gives you any error messages when syncing.

  38. Mike April 21, 2009

    Hi Tom – 800 is the largest size Picasa allows for embedding in a web page. See here: http://code.google.com/apis/picasaweb/reference.html#Parameters

    Shashin needs Highslide configured with a specific set of extensions. You’re lucky that it works with the version you already had. In the next version I’m going to use the new wordpress functions for including external js and css, so commenting them out will be an easier task next time. If others raise this issue I’ll go it a closer look.

    Shashin currently doesn’t download the EXIF data. I could add that, but I’m not sure about the best way to display it. I think it’s most readable in a tabular form, but that’s not suitable to display in a caption. If you can point me to some examples where you’ve seen this done well, I’ll take a look.

  39. JimB April 21, 2009

    Hey Mike,

    I set the timeout to 60, with no apparent change. I also sync’ed the two albums individually. That didn’t work either.

    Is there a way to paginate a long album?

    Thanks again for your help.

    –Jim

  40. Tom April 21, 2009

    Hello Mike,

    thanks for your answers. I’m glad to read that in the future it’ll be easier to modify the highslide scripts declaration.

    Regarding EXIF data, here’s a sample of what I meant: http://test.t0m.fr/2008/photos/bonjour-tout-le-monde.html
    This is done with NextGEN gallery and a customized display style.

    Cheers !

  41. Mike April 22, 2009

    Hi Jim – I’m going to email you so we can keep working on this. I think you Shashin data may have been corrupted somehow.

  42. Mike April 22, 2009

    Hi Tom – thanks for the link showing the EXIF data in the caption. I like it. I’ll plan on adding it to Shashin.

  43. Tom April 23, 2009

    Awesome, thanks !

  44. Bovoy April 24, 2009

    Hi Mike,
    How are you?
    Remember me?
    I have updated my Shashin to version 2.4
    I seted Full-size image display as highslide, but when I open my albums, I can not see the highslide effect.
    please see to this.
    Thanks for your efforts for Shashin.

  45. Mike April 25, 2009

    That was an accidental release at wordpress.org. Version 2.4 is not finished yet. Please download version 2.3.5 again. Sorry for the confusion.

  46. tianyi May 5, 2009

    How can I display a singe image with its own with?

  47. faruk May 6, 2009

    I have WP 2.7.1 and Shashin 2.3.5

    Alnum location in Picasso :http://picasaweb.google.com/jamiebakewell34/Dad?authkey=Gv1sRgCOzpiqiD6Z3yCg

    Installed the plugin and pasted the above URL in the Tools> Shashin. looks like there isn’t too much I need to do except to add the widgets. I also did that.

    I have selected ‘no random’ photo option

    I have some problems.
    1. Homepage left column lists
    # Shashin error: Photo not found.
    Shashin Error: unable to retrieve photo thumbnails.
    Shashin Error: unable to retrieve albums.
    Shashin Error: unable to retrieve random photos.

    Interestingly, if I select Sync button I get an warning on the top of the admin page and then it clears out my URL for the picasso.

    I really need help as this dear friend passed away and I need to put his photos as soon as possible and I can not figure out what is the problem. Help please.

  48. Mike May 6, 2009

    Hi Faruk – Shashin can’t download photos from unlisted albums. But there is a way to make it work. See here:

    http://www.toppa.com/2009/workaround-for-using-unlisted-picasa-albums-in-shashin/

    Mike T

  49. Mike May 6, 2009

    Hi tianyi – I’m sorry, I don’t understand your question – please explain in more detail.

  50. tianyi May 10, 2009

    I am wondering if there is a method that I can show a single image with its original width?

  51. Mike May 11, 2009

    Hi Tianyi – you are limited to the sizes supported by Picasa:

    http://www.toppa.com/shashin-wordpress-plugin/#shashin5

  52. Jesper Thusgaard May 13, 2009

    Hi again…

    I’m still using your brilliant plugin. And now I have had the time to do some tinkering om amalie.gjesager.dk. Please have a look at the page. I’m using [simage=268,200,n,left] to display the image. But can I get rid of the frames around the picture?

  53. Mike May 13, 2009

    Hi Jesper – in the shashin plugin folder, you’ll need to edit display/shashin.css. Under “shashin_image” remove the line for “border”. If you then save shashin.css to your active theme folder, Shashin will find it there. That way you won’t lose your changes the next time there’s a Shashin upgrade.

    Your theme is adding a border to the image too. In classic.css, you may want to remove this:

    body.classic a img {
    border:1px solid #0F6B99;
    }

  54. Michael Knott May 17, 2009

    I was about to post a query asking about changing the background of the table to match the webpage background. After much fiddling with shashin.css I just couldn’t get the background to change (http://conspiracyphotographic.com).
    I am using Atahualpa for my styling, and eventually found that it was over-riding the shashin.css – it stores all it’s formatting information in the header.
    So if you want to change your Shashin table colours and are using the Atahualpa theme, go and change the settings on the “Tables” tab.
    Excellent plugin, by the way, thank you so much!

  55. Jeanette May 19, 2009

    Hi…
    I LOVE your plugin…

    I can’t figure something out.
    I want to display thumbnails of all photos from one album. So far I can only have it display the actual photos and scale it down and this makes it load slow.

    What’s the code for it?

    Thanks!

  56. Mike May 19, 2009

    Hi Jeanette – you’re looking for the salbumphotos tag:

    http://www.toppa.com/shashin-wordpress-plugin/#shashin8

    Note that all the Shashin tags will fetch your images at the requested size. Shashin never uses browser scaling to resize images.

  57. Jeanette May 19, 2009

    Hi Mike,
    Thanks! But I tried that… it doesn’t give me nice square thumbnails…

  58. Mike May 20, 2009

    Hi Jeanette – only sizes 32, 48, 64, and 160 will give you square thumbnails. If you’re still having any difficulty, please show me how you’re using the tag, and give me a link so I can take a look.

  59. Stephan May 24, 2009

    Hi Mike,

    I get the message ShashinAlbum::setUserAlbums – Kan album feed niet parsen. It’s the first install, I tried different settings but i get always that message. My picasa url is http://picasaweb.google.com/stephan80 I hope you can help me.

  60. Stephan May 24, 2009

    sorry english message is:
    “ShashinAlbum::setAlbum – Failed to parse album feed.”

  61. Mike May 26, 2009

    Hi Stephan – I added your album successfully on my testing site, so there’s nothing wrong with the feed. To retrieve the Picasa album feed, I’m using a reader that comes with WordPress (it’s called Snoopy). It’s possible your web server doesn’t support it. In the shashin folder, please open ToppaWPFunctions.php, and on line 419 you will see:

    return $parser->parse($feed_url);

    Please change that to:

    var_dump($parser->parse($feed_url));
    exit;

    Then try to add the album again, and let me know what appears on your screen.

  62. Stephan May 26, 2009

    Hi Mike,

    When i change lin 419 and I try again I get a big error message. I contact my hosting provider because I had also a problem with the Flickr plugin. The fixed the problem for me, they changed the rule allow_url_fopen in the php.ini.

    Thanx for you help for this great plugin.

  63. Mike May 27, 2009

    Hi Stephan – the code change I gave you was to see if it would print the raw Picasa RSS feed to your screen. That would let me know if Shashin was able to read the feed or not. Could you let me know exactly what you saw on the screen? (if it was really long, just a snippet is sufficient).

Comments are Disabled