Shashin 3.1.3, and why all the recent changes

Update: Shashin 3.1.4 takes care of the activation issue – you no longer need to click the “deactivate” and “activate” links in the plugin panel when upgrading.


I’ve uploaded Shashin 3.1.3 to wordpress.org. Several people have complained of error messages that start with “Invalid data property __get for…” when updating to 3.1.x. These messages relate to new settings that are added during activation, but they were not actually being added. This puzzled me because the WordPress automatic updater shows a message saying it is deactivating and reactivating the plugin when it upgrades. The problem is, it’s not actually doing it – here is the WordPress defect ticket: Auto update plugins does not activate activation hooks.

Apparently this behavior is an intentional choice. I’ve submitted a patch that corrects the wording (so at the very least, plugin authors like me don’t misunderstand what it means). In the future I will make sure to work around this, but with 3.1.3, you will need to deactivate and reactivate Shashin one more time yourself from the plugin menu after upgrading.

My apologies if you’ve had other difficulties with the recent Fancybox changes. I’ve included Highslide with Shashin since 2008, and I gradually added features and made improvements as I learned the capabilities and quirks of Highslide. Due to a licensing conflict I was alerted to, I had to rip Highslide out of Shashin immediately and switch to a different viewer with a GPL compatible license (Shashin was temporarily removed from the wordpress.org plugin repository because of this). Some of the other great viewers, like PrettyPhoto, are also not GPL compatible, so I went with Fancybox. I had only a short period of time to add it, and I’ve spent many hours recently working through some of the intricate issues involved with making it work with Shashin.

Version 3.1.3 makes the following improvements:

  • Added automatic timed slideshows
  • Improved captions for photos shown after clicking an album thumbnail (this also fixes the bug with then “return” link for albums)
  • In FancyBox caption, show exif data if requested, even if there is no photo caption text
  • Bug fix: show correct FancyBox captions on photos shown after clicking an album thumbnail, on pages that have a mix of photo groups and album thumbnails
  • Possible bug fix: add a 30 second buffer to the time check when synchronizing albums, in case there is a delay between synchronizing the album’s meta data and the album’s photos (this is to try addressing occasional reports of photo ID numbers changing, which means they are being deleted and re-added).

Also, its worth highlighting that in 3.1.2 I resolved the problem of the Fancybox slideshow navigation controls overlaying controls for videos. The video controls are accessible now.

46 Comments

  1. Pedro March 11, 2012

    heres the screen cast I said I was gonna upload showing the bug/conflict thing
    http://dl.dropbox.com/u/5288197/shashin%20map%20bug.mov

    if you have any ideas on how to fix it, let me know! or if theres a google map plugin you condone that would be great too, I rather change google map plugin than photo plugin

    cheers!

    • Mike March 12, 2012

      Hi Pedro, thanks for sharing the screencast. It must be a browser specific problem. I don’t see that happening in Chrome or Firefox. But that is beyond what I can provide as free support.

  2. Eric March 13, 2012

    Mike,

    After updating to 3.1.3 I cannot get fancybox to work. In Shashin settings, both “Use Fancybox” and “Display at photo hosting site” cause album thumbnails to open the album in Picasaweb. I tried deactivating and reactivating the plugin, but that did not work. The url is http://www.esaner.com/sanerthanyou/photos.

    Thanks,
    Eric

    • Mike March 14, 2012

      Hi Eric – I checked your Kelly Family Photos album (great old pictures!) and Fancybox is working fine for me. Maybe you have some old javascript cached in your browser? Try holding down the shift key and click reload on your browser – that should force it to reload everything.

      If there is still a problem, please let me know what browser you are using, and let me know if there’s a particular album or set of photos I should check.

  3. Mike March 14, 2012

    I replied to soon. I just tried with Firefox and I see the problem now. It doesn’t seem to like a line of Javascript that is ok in the other browsers I tested. I’ll work on a fix.

    • Pat Quintin March 14, 2012

      Hi Mike,
      I’m having the same issue on my site. The error message in the Firefox console says “setShashinFancyBoxCaption is not defined” on shashin.js line 21.

      Thanks so much for this excellent plugin – I’ve been using it for a couple of years now, on various sites.

  4. Shan March 15, 2012

    HI Mike,

    why you are not adding facebook Like button in shashine gallery..
    we want like button on every image so if some want to share on fb so he can ?
    and how can i call shashin in php [shashin] is not working in php.
    watin fo replay πŸ™‚

    thanks

  5. Stuart March 15, 2012

    Hi,

    I don’t suppose you know how I could get the image 3 of 9 to float right? I’ve tried various things with no success. It seems it’s in the same div as the fancybox-title? I’m not sure how I separate it though?

    Screenshot: http://dl.dropbox.com/u/31942303/fancybox.jpg

    I actually had it working with a fancy-box plugin but then I upgraded to the new version with Fancy Box included so I didn’t need that any more. My old configuration doesn’t work as it seems to class with the new fancy box if I select other viewer and then say fancy box.

    Anyway… only thing I really need to sort if for the image 3 of 9 etc to float to the right.

    Any help would be greatly appreciated.

    Thanks.

    • Mike March 19, 2012

      Hi Stuart – it sounds like you are using a Fancybox plugin, not the version of Fancybox that comes with Shashin. Your caption doesn’t appear to be the caption that Shashin generates for Fancybox. I can’t advise you on other Fancybox plugins. If you want to use the Fancybox that comes with Shashin, select “Use Fancybox” on the Shashin settings page.

      • Stuart March 20, 2012

        Hi Mike,

        Thanks for the response. It is the Shashin version I am using with Use Fancybox selected. The only changes I have made are to set display:none; beside .shashinLinkToOriginalPhoto and .shashinFancyboxCaptionClose as I didn’t want the link to the original photo or the close icon.

        The caption and image 3 of 9 appear to be in another div? I just want to separate the image number to float right and leave the caption on the left?

        I hope that makes sense and any help is appreciated.

        Thanks again.

        • Stuart March 20, 2012

          The caption and the image number both appear to be located in the div called: shashinFancyboxCaption

          If there is no way of separating it to align part left and part right, could you tell me how to remove the image 3 of 9 as that would be my plan B.

          Thanks again.

          • Stuart March 20, 2012

            Hi,

            I’ve now got a problem with the rest of my site. I was last month using Shashin with my own installed Fancybox add on instead of Highslide. This meant that my Shashin and any other image on my site worked with fancybox viewer.

            I then upgraded my Shashin as it now comes with fancybox and uninstalled my original plugin. Shashin now works fine for my gallery with Shashin but the rest of the images on my site no longer use Fancy Box.

            Do you know how I can tell the rest of the site to use the fancybox as well?

            Basically I’m trying to achieve two things get all images to use fancybox and also align image 3 of 9 to the right or remove that aspect entirely.

            Any help is greatly appreciated.

            Thanks again for your time.

          • Mike March 24, 2012

            Sorry for the late reply. I’m realizing I don’t have a link to your site – please let me know it so I can take a look at your site.

  6. NintendoGal March 16, 2012

    Just wanted to say I donated once more. Wasn’t much ($10), but it’s what I can give at the moment. I really do appreciate your effort on this plugin thus far! πŸ™‚

  7. Stuart March 16, 2012

    Sorry for my typing errors above. Should be:

    ‘class’ = ‘clash’
    ‘need to sort if’ = ‘need to sort is’

  8. nick March 17, 2012

    hi! planning to use your plugin – but i use responsive theme from themeloom and your plugin always requires fixed width it seems. IMHO the MAX option in number of columns should mean the max available width of div – no need to use max presetted in the settings menu – should be easily done by css, or am i wrong?

    how big should be the donation to bring this closer to your attention? πŸ™‚

    hoping to hear from you soon

    • Mike March 19, 2012

      Responsive design for Shashin is on my to-do list. The work I had to do with switching to Fancybox (to stay GPL compliant) set me back on getting that done. I’m still trying to figure out the best way to do it. My thought at this point is to provide an option to use a list instead of a table for the thumbnail layout. By using a list, the number of columns can adjust to fit the available width, but it means you can no longer specify how many columns you want (it’ll just go as wide as it can in the available space).

  9. Neville March 17, 2012

    Hi Mike,
    Thanks for all your hard work to keep the plugin alive in light of the Highslide license issue.

    Is there a way to remove the “View at Picasa” and “Close X” captions that now appear below each thumbnail?

    I assume these are a result of moving to Fancybox since I’ve seen that before.

    Thanks

    • Mike March 19, 2012

      Hi Neville – the simplest thing to do would be to comment out lines 37 and 135 in shashin/Public/Display/shashin.js, if you’re up for tweaking the code. These lines call the function that generates the custom caption. By not calling that function, it’ll just use the text from the “title” attribute as the caption. You’ll just need to remember to do this again in future Shashin updates.

      Keep in mind that if you use Twitpic, its user agreement requires that you provide a link back to the original photo (that’s what originally motivated the “view at…” link).

      • Neville March 19, 2012

        Hi Mike,
        Thank you. I made those changes and they removed those links from the expanded image, which is fine. However it did nothing to the same links on the thumbnails. Here is an example of what I am talking about… maybe there is another piece of code I need to comment out?
        http://www.grenada-beaches.com/photos/morne-rouge-beach-pictures/

        What do you think?

        • Mike March 20, 2012

          Hi Neville – that should not be appearing there at all. It’s the caption that is used for the expanded view. It’s in a div that is not supposed to be displayed. shashin.css has this:

          .shashinFancyboxCaptionWrapper {
          display: none;
          }

          But your theme’s stylesheet is overridding it to “display: block”. You can either remove that “display: block” from your theme’s stylesheet, or change shashin’s to “display: none !important;”

          • Neville March 20, 2012

            Thank you kindly Mike. I modified shashin.css and it worked perfectly. Just need to make a note to myself to do make these changes on each update.
            Thanks Again

          • Mike March 21, 2012

            Neville – you can save your customized version separately, so it doesn’t get overwritten:

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

            But you’ll still want to check shashin.css when I release new versions, to see if there’s anything you need to add to your custom one

  10. tsouliang March 19, 2012

    hello πŸ™‚
    how can we change the text “next” and “previous” in the display of album or photos ?
    i need to put it in french ^^
    thanks πŸ˜‰

  11. tsouliang March 20, 2012

    hello,
    thanks for reply, but i use localisation plugins, i traduce the “Next”, “Previous”, and “Return” texte, i creat the “.mo” … and nothing append -.-

    I try the way of your link and it’s the same …
    What is the probleme ?

    • Mike March 20, 2012

      Are any of your translations showing up, or is it just the “Return”, “Next”, and “Previous” that aren’t showing up? If nothing is working I probably can’t help you – I don’t have experience making translation files. But if its just the text for those links, I can see if there’s something in my code that might be an issue.

      • Tsouliang March 21, 2012

        hi,
        all the word i see from you plugin are in english.
        I have just change the “next” and “previous” with “localisation” plugin, but not working. I try to find other place, if this text are from wordpress, my personal theme … but nothing found -.-

        • Mike March 24, 2012

          Sorry, I can’t help with how to create plugin localizations beyond what I’ve already provided

  12. Radek March 20, 2012

    Hi,

    I’ve just upgraded to the latest version of Shashin (on latest wordpress) and it broke badly!

    Fatal error: Call to undefined method ToppaFunctions::arraymergerecursiveforsettings() in E:inetpubvhostskamyki.comsubdomainsnataliahttpdocswordpresswp-contentpluginsshashinLibShashinSettings.php on line 46

    I cannot access the site neither my admin panel. Plase help….

    Thank you.

    Radek

  13. Radek March 20, 2012

    Tried to downgrade to version 3.1.3 but no luck…. error on activation
    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Call to undefined method ToppaFunctionsFacadeWp::callFunctionForNetworkSites() in ….pluginsshashinAdminShashinInstall.php on line 70

    Please help…

  14. Jens Jakob Teislev March 20, 2012

    When I click on the album-overview gallery thingy I have on my website they take me directly to Picasa Web Album instead of opening up something using jquery. Do I need to install jquery separately??

    Thanks

    • Mike March 20, 2012

      Hi Jens – I took a look at your site and I didn’t see any obvious problems in the code. My guess is that you have other javascript running on the page that may be interfering with Shashin. Please try the following:

      1. temporarily change your theme to one of the default WP themes (like twenty eleven)

      2. temporarily deactivate ALL plugins except Shashin

      3. check your photo page to see if its working correctly now

      4. if it is working, turn your plugins back on one at a time, and then reload the photos page after each plugin you turn on, to see if it’s still working (then switch your theme back last).

      If this reveals a particular plugin (or your theme) causing a conflict, please let me know which one and then I can try to figure out exactly what the conflict is.

      Another thing to check is if your WP admin-ajax script is being hidden from public use (WP uses this for ajax calls, even for public pages). See this earlier comment: http://www.toppa.com/2011/shashin-3-0-8/#comment-65390

    • Radek March 20, 2012

      Something similar is happening to me. Please have a look – second post is an album. Since an upgrade nothing is happening on click.

      http://www.natalia.kamyki.com/

      • Mike March 20, 2012

        Hi Radek – you’re experiencing the 2nd possible problem I described. You have an access restriction that is stopping Shashin from using WordPress’ admin-ajax.php script. I get this error on your page:

        XMLHttpRequest cannot load
        http://natalia.kamyki.com/wordpress/wp-admin/admin-ajax.php?action=displayAlbumPhotos&shashinAlbumId=86&shashinParentTableId=1&shashinParentAlbumTitle=Odwiedziny+u+Gabi+i+Wojtka&shashinParentTableStyle=float%3A+left%3B.
        Origin http://www.natalia.kamyki.com is not allowed by Access-Control-Allow-Origin.
        

        See this comment: http://www.toppa.com/2011/shashin-3-0-8/#comment-65390

        • Radek March 22, 2012

          One small question, can I use Shashin for viewing images from WordPress directly. I mean images that are directly on WP not in Picassa (uploaded to WP).

          Thanks.

          • Mike March 24, 2012

            Hi Radek – no, Shashin is designed for use with external photo services.

  15. Pat Quintin March 20, 2012

    Hi Mike,
    I should have been more specific when I wrote earlier in reply to Eric’s post.

    This is a Firefox (and apparently Camino on the Mac) bug: clicking an album thumbnail on the photos page takes you to the album on picasaweb instead of seeing it in highslide. The error message says that setShashinFancyBoxCaption is not defined on line 21 of shashin.js.

    Much worse, other js is breaking: my navigation dropdowns don’t appear, so inner pages of the site are unavailable in Firefox. Cufon is toast, too.

    Have you figured anything out about this one?

    • Mike March 20, 2012

      Hi Pat – looks like you are running the previous version of Shashin. If you update to the version I posted a few days ago (3.1.4), you’ll find this issue is fixed.

      • Pat Quintin March 20, 2012

        Fantastic, Mike! It’s a thing of beauty. You are a grape among raisins.

  16. Sarah March 22, 2012

    Is there a way to get the album date and number of photos not to show in the caption on the album thumbnails? (but leave the album title.) Thanks.

  17. Marcos March 22, 2012

    Mike, this new version of Shashin is very nice!

    I have a question, IΒ΄m searching for a plugin to make galleries from youtube playlists. Just like your galleries of photos, but with videos.

    I saw that Shashin provides this option for the user’s videos. But I have to organize my videos by categories and publich them in different pages. Do you know any plugin that do it?

    Thanks!

    p.s sorry my bad english..

    • Mike March 24, 2012

      Hi Marcos – I found this page in the Google cache (its no longer online) that tells you how to find the RSS feed for playlists. You can give this URL to Shashin and it will save it as an album that you can sync:

      You will need the Playlist ID from the Playlist LINK,
      it will look something like this:
      http://www.youtube.com/view_play_list?p=121D6A1AA7ADE758
      
      From this link you need to copy the part after '?p=':  121D6A1AA7ADE758
      
      Now copy this code to this link:
      http://gdata.youtube.com/feeds/api/playlists/YOUR_YOUTUBE_PLAYLIST_NUMBER
      (e.g. http://gdata.youtube.com/feeds/api/playlists/121D6A1AA7ADE758)
      

Comments are Disabled