…And …And …Shashin 2.0.4

This is a very minor release in terms of code changes. It’s not critical if you have a previous version of Shashin installed, but it is critical if you’ve upgraded to WordPress 2.5 and you’re installing Shashin for the first time. It has to do with WordPress 2.5’s new handling of variable scope when activating plugins (if you were curious).

The only other change I made was to add mp4 as a video type that Shashin will recognize (it’s not documented as a supported video type for Picasa, but it does in fact accept them).

Download Shashin 2.0.4.

Update: I’ve received a few reports from first-time Shashin users who are having trouble activating Shashin properly, despite this fix. This seems to be happening to only a small number of people, and I haven’t been able to track down the cause yet. If you are having trouble with Shashin under WordPress 2.5, please leave a comment on this post and let me know exactly what’s going wrong.


  1. Alex April 2, 2008

    Hey Mike,

    this is an awesome plugin, very flexible and neat. Unfortunately I need some additional features and I hope you can help.

    I would like to display all photos of an album in a post but not in thumbnail size. I would like to have them in normal size to display.

    The closest option what I found for me was:

    is there an option to have this but instead photo_key1 just album_key1 so I don’t have to list each photo in the code. Just the album key and it would list all pictures of this album.

    Another thing, I like to have all pictures in one horizontal line. Unfortunately I have some portrait orientate pictures which are a little bit taller in this line. I would like to have all picture 350 px tall. I used another plugin where I just put the max size to 800 and no matter what they were not bigger than the original size on Picasa. Since I uploaded to Picasa all pictures with 350 px height it didn’t display them bigger than the original size. With your plugin it make the original picture bigger, even though the picture has a max size of only 500px width it showed it with 800 px width. Is there a way to put in the code of the post for example 800px but it won’t make it bigger than the original size? So all landscape and portrait pics showing up in their original size, which means different width but all 350px tall?

    The last thing, is there a way to disable that the pictures are clickable. Since there are showing up in a original size, I wouldn’t need a clickable picture anymore.

    I hope you were able to understand all my questions, sorry to bother you. And I know these are specific things, not everybody would need them, but it would be great if you can tell me where I have to change the code of the plugin to have all these functions if you don’t like to put it in as additional option in your plugin.

    I really appreciate your help. Besides my special requests, it’s a absolutely great plugin.


  2. Mike April 3, 2008

    Hi Alex

    1. You can use the salbumphotos tag to show all the images in an album, in any size supported by Picasa. My instructions say it’s for displaying thumbnails, but you can actually use any size supported by Picasa as the value for max_size. The instructions are here: http://www.toppa.com/shashin-wordpress-plugin#shashin7

    2. I see what you mean about the images getting stretched when you specify an image size that’s larger than the actual image.Some people might want it to do that, so whether it’s a bug or a feature is a matter of perspective 😉 . This is something that would be worth having as an option, but I don’t think I’ll be able to get to it for a while. If you want to try changing the code yourself, you would need to edit the method ShashinPhoto::_setDimensions. ‘width’ and ‘height’ are the actual image sizes, and ‘user_width’ and ‘user_height’ are the requested image sizes. You need to A. add a check that the requested height or width is not greater than the actual height or width, and then B. “knock down” the requested size to a supported Picasa size that is close to but smaller than the actual image size. You can’t use the actual image size unless it happens to be the same as a display size supported by Picasa. The sizes Picasa allows are listed here: http://www.toppa.com/shashin-wordpress-plugin#shashin4

    3. If you set the size to 160, then the images will come out square (160 is a special Picasa size – it will automatically center and crop portrait images to fit). So that’s one way to get a row of images with a consistent height. Unfortunately that’s the largest size available in Picasa for that behavior.

    4. Disabling links on the images is an interesting idea. If you want to disable it for all pictures, then you need to edit ShashinPhoto::_getDivMarkup. That method builds the HTML for displaying images in a variable called $markup. You would need to look through that method and remove all the opening and closing anchor tags. My guess is most people don’t want to disable the image links, so at least for now, I’m not planning to add an option for this. But if more people ask for it, I’ll be happy to reconsider.

    If you make any changes, please let me know – I’d love to see the results.

  3. Sheludkov April 4, 2008

    Hi Mike,
    great plug-in! But now after installig it all my headlines have a colon after them…

  4. Mike April 4, 2008

    Hi Sheludkv – do you mean on every page of your site? I coded it so that it would append the album name after the page name, with a colon in between. But that should happen only on the page that display album thumbnails. Can you let me know what version of WordPress you are using, and can you give me a link to your site, so I can see?

    I’m going on vacation this weekend, so I might not have a chance to respond again until Monday or Tuesday.

  5. Marlene April 4, 2008

    hi there
    shashin looks just what I need. thanks for your work!

    have just installed it and have followed your instructions for the options shashin page and that’s Ok

    but when i go the manage shashin admin page I’m getting two error messages :

    WordPress database error: [Table ‘KulaprabhaPersonal.wp_shashin_album’ doesn’t exist]
    SELECT DISTINCT user FROM wp_shashin_album

    WordPress database error: [Table ‘KulaprabhaPersonal.wp_shashin_album’ doesn’t exist]
    SELECT * FROM wp_shashin_album ORDER BY TITLE

    I’m running WordPress version 2.3.1

    I’d be grateful for your help!

  6. Mike April 4, 2008

    Hi Marlene – sorry for the trouble. Shashin 2.0.4 contains a change that was needed to make it compatible with WordPress 2.5. It’s possible that the change has made it incompatible with older versions of WordPress (I no longer have an older version of WordPress to test with).

    I’d recommend going to http://wordpress.org/extend/plugins/shashin/download/ and downloading and installing Shashin 2.0.3. Please let me know if that fixes the problem.

  7. Christian A. April 9, 2008

    Hey Mike,

    one thing more, how can i put the “full expand” button/function in the bottom-right corner ?

    On your photo site, by clicking an thumb, the image opens to a fix size and when i click the full expand button, the image will grow up to his fullsize.

    My Images in the gallerie are big enough, but i dont get the full expand button. have an idea ?

    greets Chris

  8. Mike April 9, 2008

    Hi Chris – The full expansion button shows up only when the image size you selected is too big to fit on the screen. I configured Shashin on my site to display the images at size 800, which is too tall for most monitors when it’s a picture with a portrait orientation. That’s when the full expand button appears. It looks like you configured yours for size 510. If you change it to 800, then you’ll probably see the full expansion button for portrait pictures.

  9. Karlyn April 9, 2008

    Mike, I think this plugin is great and have been using it for a while to display a random image from my album in my sidebar. Today however, I tried to get thumbnails to display on a designated page and it’s not working. I don’t know what I’m missing, can you help? This is the page – the tag displays, not album photos.

  10. Mike April 9, 2008

    Hi Karyln – There are a couple steps involved with using the salbumphotos tag. You first need to display an album thumbnail (using either the salbum, salbumthumbs, or salbumlist tag) – you can put this on any page or post you want. Then you you need to create a page containing the salbumphotos tag, and put the url of that page in the Shashin admin settings. The album thumbnail will then link to the page containing the salbumphotos tag, and you’ll see all the photos in the album there. Detailed instructions are here: http://www.toppa.com/shashin-wordpress-plugin#shashin7

  11. Karlyn April 9, 2008

    Thank you. Yes, I read over those intstructions over and over and followed them completely, which is why I was stumped that nothing displayed.

  12. Karlyn April 9, 2008

    Mike, this is what I’m using:


    I have it in a page (sub page actually) and I’ve put the url of the page into the options area where that goes also.

  13. Karlyn April 9, 2008

    I just tried [salbumthumbs] alone and nothing either.

  14. Mike April 9, 2008

    Hi Karlyn,

    Sorry for the confusion. I see two problems on your page:

    1. You need to substitute actual values for the placeholders in the documentation. For example, your tag has “max_cols” in it – you need to replace that with a number (indicating the number of columns you want in the photo display). Like this example from the instructions: [salbumphotos=160,3,n,y]. The meaning of each field is explained in the instructions.

    2. People should access the page containing the salbumphotos tag only by clicking on an album thumbnail first. The idea is that the page containing the salbumphotos tag can be used to display pictures from any album (the link from the thumbnail dynamically determines which album photos to display). That way you don’t need to create a page for every album – you can instead display pictures for any album using just one page.

    Let me know if this helps.

  15. Karlyn April 9, 2008

    Yay! I got it now, thank you so much for you help. 🙂

  16. Karlyn April 10, 2008

    Mike, sorry for the trouble, but I have another question now. It seems that when activated, this plugin causes my top menu to disappear whenever I view anything but the index page. When I deactivate the plugin, the menu remains working as it should. If you want to try it out, I’m talking about the large top menu items at the site that my name is linked to. I really want to use your plugin and this particular theme, so if you have any suggestions on what the interference might be and how I can fix it, it’s appreciated. Thank you.

  17. Mike April 10, 2008

    Hi Karyln – the problem is that your theme contains invalid markup. Put the url for your page in the w3c validator to see what I mean: http://validator.w3.org/

    The errors to do with entities and REFC delimiters are not crucial, but some of the other stuff is really problematic (missing closing table tags, mismatching opening and ending tags, etc.).

    If you or the theme author can fix the validation problems, then Shashin shouldn’t give you that kind of trouble.

  18. GFB April 25, 2008

    Hi Mike – absolutely fantastic plugin. First outing with WordPress – revamping an old family site.

    I am running into the “colon” issue as well. I fixed a few minor validation issues so everything now validates – but still have colons appearing in various places in the code. I have not backtracked into the code yet, but this is causing variables not to drop into place properly.

    I even dropped back to the default layout and still have a few mis-placed colons and the page titles disappearing.

    I will leave this activated in case you can drop by the site – and I can get you any access necessary as well!

  19. ziniia April 25, 2008


    I’m the Japanese Shasin(写真)-plugin user.

    It is a nice upgrade. You adopted the function which I requested. I appreciate it.
    How to use [salbumphotos] tag is a little incomprehensible. But it could be used somehow.

    I am most happy if it becomes possible that I choose favorite photo-viewer.

    And I found the part which seems a slip in “ShashinAlbum.php”.

    575 line: An order is reverse to ““.

    The same line :””, “” ?

    602 line: “n”, “n” ?

    I’m poor at English, excuse me.
    Thank you really.

    Your wife regarded as Japanese. So is it Shashin?
    Kai and Eidan are very cute!

  20. ziniia April 25, 2008

    Excuse me.
    It wasn’t indicated well.

    575 line: An order is reverse to “</strong></a>”.

    The same line :”<br >”, “<br/>” ?

    602 line: “</div>n”, “</p></div>n” ?

  21. Lucas Costa April 26, 2008

    Dear Michael, congratulations for the plugin, it seems really amazing.

    Please help! I’m tryin to do EXACTLY what you did in http://www.toppa.com/photo-albums.

    A page that displays all the albums linking everyone of them to an inside page that displays all pics and shows them in highslide or lightbox or whatever. Just like http://www.toppa.com/album-photos?album_id=5145732372625399585&title=Al+Mandrachia

    Sorry for not being able to do it from the instructions but all I get are pages that link albums to Picasa’s Web Album instead of my own site.

    Is it necessary to include PHP in the pages? Change the theme’s code? Change the plugin methods? I think maybe others can gain from your answer.

    Thanks a lot an congratulations.



  22. Rocky April 27, 2008

    Hi Mike, great plugin. After i installed and set it up, i used this “[salbumlist=pub_date desc,n]” in the page “http://www.rockyfp.com/photos/” the albums thumbnails with descriptions are shown correctly; however, when i click on any album, the page doesn’t show that album but still “albums thumbnails with descriptions”.

    Please advise. Thanks you very much.


  23. Rocky April 27, 2008

    Hi Mike, i also found that when I activated the plugin, all menu items disappeared (blank, but link still there) but the current menu item.

    I have to disable that plugin. Not sure if it’s the compatibility issue with WP 2.5.1.

  24. Mike April 27, 2008

    Hi Rocky, Lucas, ziniia, and GFB:

    I just released Shashin 2.1, which makes it easier to display album thumbnails and link to a page containing the photos in each album. It also fixes problems with the page titles. See the post with more information here. If this doesn’t tale care of the problems you’re having, please let me know.

    Also, ziniia, thanks for finding those HTML errors. I fixed them. And yes, the name “Shashin” is from the Japanese word for photograph. I learned it living in Tokyo for a while last year.

Comments are Disabled