Shashin 2.3 Beta is Here
Shashin 2.3 is a complete rewrite, with more robust error handling, improved security, and several new features.
I’m initially releasing it on my site only, as a beta release. Update: The final version is now available for download at wordpress.org:
I’ve done a fair amount of testing myself, but since it’s a rewrite, there’s the possibility of new bugs where there weren’t any before, so I’m looking for help testing it before I make it more widely available on wordpress.org. Please use the comments section on this post to let me know if you run into any problems.
If you’d like to see an overview of the code, here’s the Shashin 2.3 phpdoc documentation.
Important installation instructions if you’re upgrading:
- Make a backup copy of your current Shashin files
- Deactivate Shashin
- Delete Shashin from your plugins directory (this will not harm your Shashin photo data)
- Unzip and upload the new version
- Reactivate Shashin
- Go to the Shashin settings page. You will need to reset your options (they’re stored in a different way in Shashin 2.3, and it doesn’t inherit from previous versions)
New features and how to use them:
- Automatic daily synchronization of all your Shashin albums with Picasa. This is turned off by default – you can go to the Shashin settings page to turn it on. This was the last feature I added and I haven’t tested it thoroughly, so I’d especially appreciate feedback on this.
- Internationalization: Shashin now comes with a shashin.pot file and will work with localization files you create. If you create a translation for Shashin, please send me your localization files and I’ll include them with the Shashin distribution.
- Simplified use of the [salbumthumbs] tag. If you’re using Highslide with Shashin, you no longer need a second page with the salbumphotos tag to display an album’s photos. Just click an album thumbnail, and the page will reload showing thumbnails of the album’s photos. On the Shashin settings page you’ll see a new set of options for specifying the thumbnail size, sort order, etc.
- Repurposed [salbumphotos] tag: you can now use it to show all the photos for an album, without having to first click an album thumbnail. This means the syntax has changed slightly – the first argument is now an album key:
- Improved usability for the Shashin admin menus. You can sort your albums and photos by clicking on different column headers. Also, Shashin makes use of the new styling options in WordPress 2.7 to make the album list easier on the eyes.
- The [srandom] and [snewest] tags used to require either a single album key or the word “any” as its first argument. You can now also provide multiple album keys. Here’s an example:
- For each of the Shashin widgets, you can now specify CSS “float” and “clear” values.
- Uninstall option: this will delete the Shashin database tables and delete all the Shashin options from the WordPress options table. You can never get your photo key and album key numbers back if you do this, so only uninstall if you really don’t like Shashin 🙁
Bug fixes, security fixes, and error handling:
- If you list multiple album keys or photo keys in a Shashin tag, they’ll now always display in the order you listed them.
- There were a number of minor bugs with Shashin widgets. I won’t list them all here, but it’s probably safe to say that if you noticed something that wasn’t quite right with one of the widgets, it’s fixed now.
- Better protection against SQL injection (this is a very low risk for Shashin anyway, since it doesn’t take user inputs through public-facing pages, but the extra protection can’t hurt).
- Removed an XSS (cross site scripting) vulnerability.
- In the admin panels, Shashin used to report the same error message regardless of what really went wrong. Now the error reporting is much more specific, which will make debugging much easier.
- Northclick’s excellent internationalization tutorial. I scoured the web looking for a guide to using xgettext for generating the shashin.pot file, and this was the only good one I found.
- Glenn Slaven’s guide to scheduling events in WordPress.
Update 1/21: the official release is now available at wordpress.org. Thanks to everyone who helped with testing! The download link above now points to wordpress.org.
Update 1/18: I’ve uploaded another revised version, thanks to a couple bug reports I received. You’ll need to deactivate and reactive Shashin for one of the fixes to go into effect (there was a datatype problem with the date fields, resulting in albums and photos not always sorting in the right order).
Update 1/16: Post to Post Links II error: No post found with slug "shashin-wordpress-plugin" for the Shashin 2.3 beta. Also, I found and fixed two very minor bugs. The download link below includes the fixes.
Comments are Disabled
I am trying this for this first time, and I can’t get the album tag to work. It just shows up in my post as text.
Hi Mike – I think you might be mixing up two different tags: salbumthumbs can be used to show all your album thumbnails. The way it works in Shashin 2.3, if you click one of those thumbnails, the page will reload, showing all the photos from that album. The salbumphotos tag is no longer needed to make this happen.
You can now use the salbumphotos tag to simply show all the photos from a specific album, without having to click an album thumbnail first. Several people had requested the ability to do this. If this is what your trying to do, then you need to follow the example I have in the post above – you need to add an album key as the first argument.
Maybe I’m just really slow, but what should my post contain? I can get the widget to work, but in my post, the actual ‘tag’ appears.
Hi Mike – Sorry it’s confusing. I need to update the documentation page but I haven’t had a chance yet. You need to look at the example in the post. This one:
The first argument needs to be an album key. Your first argument (160) is the size. If you change your tag to, for example:
Then you’ll see all the photos for whichever album you added to Shashin first.
I’ve just installed the 2.3 Beta, and so far – so good! I’ll go through my installation and pages – and let you know if there are any hickups! Thanks for the nice work, Mike! 🙂
The sort order fixed is confirmed as working. Thanks!
I’ve been using your plugin for almost a year and I’m really satisfied. You’ve done a great job!!!
Now a little problem to describe 🙂
I’ve instaled Shashin2.3 and found one small problem with my gallery page where I use [salbumthumbs] tag.
I have 37+ galleries at picasaweb and I made page on my website where I divided that 37 galeries in 2 parts, plus embaded some YouTube video (page is http://www.salsanis.com/galerija-slika).
One part is showing 35 galleris and second part is using 2 galeries. Problem is when I click on a gallery it opens in new page with thumbnails of that gallery, but I still can visit other part of page, plus YouTube embaded video (you can see it at my website).
Problem is that if I use [salbumthumbs] more than one time per page, I’ll have thumbnails of desired album as many times as I use [salbumthumbs] tag in that page (plus all other embaded content).
Is there anything I can do to fix this issue (I wouldn’t like to change my gallery page, but if I must I’ll do it).
Thanks. Regards. Milan
Hi Milan – I see what you mean. I designed the previous version of Shashin with your situation in mind. But I got a lot of complaints that the implementation was too complicated (and some WordPress themes would automatically show links to the page with the salbumphotos tag, which wouldn’t work when linked to directly). That’s why I simplified things in the new version. There’s no way to get the old behavior in the new version. If you don’t need the other new features in Shashin 2.3, you could switch back to your old version for now.
Something I might be able to do is add an option that would suppress all other content on the page when it reloads to show all the photos (that is, it would show the photos, but not show anything else that was on the page). I believe that would solve your problem. I’ll try that, and if I can get it to work, I’ll make a new release in about a week.
I read through Mike’s (commenter) text above and I am in the same boat as him. I try to use the [salbumthumbs] tag and that is all I see on the page. I want a page that shows thumbnails for all of my sync’d albums and then when you click them, it shows that album. It worked in Shashin 2.2, but I can’t get the new version to do so. The instructions you provided above are for showing one specific album I think (noted by having to put in the album key). I think Mike is looking for what I was looking for. Again, I might be missing something though too. FYI, I also left a comment about the error I am experiencing.
Hi Patrick – You can specify a sort order with salbumthumbs instead of album keys, like this:
This will display all your albums sorted by pub date. The syntax is unchanged from previous versions. See here for all the details:
some of my photos are old, and quite small; some are from a ‘watch’ camera. thus, the toolbar obscures the picture. is there anyway to make the toobar ‘fade’ in highslide when the mouse moves off the photo?
I have created a page that shows all the albums and it works just fine except one album that shows nothing in the album. Here’s the link of the page http://fei2.co.cc/biji/album/langswitch_lang/en/ and the album key is “album_key=7”
You might see that it tells you something about the language, it is the language switcher I’m using in my blog, but I have deactivated it, still shows nothing.
I’ve tried to delete the page and recreated a new one, another failure. Then I made a post to show one of the photos in this album, it works. I also checked the album properties in Picasa, there’s no difference compares to others.
I have no idea why this happens. Could you give me any instructions to solve this?
Dear Mr. Toppa,
I use your wonderful plugin in some of my sites, but after the upgrade there is a problem, that I can’t fix. Sashin seems to be unable to read the picasaweb-rss-feed. If I give Sashin the username and add albums, it load three oder four albums, then it stops and givs the following error: “ShashinAlbum::setAlbumPhotos – Failed to read Picasa RSS feed for album.” In the head of the WP-Dashbord appears: “Warning: Invalid argument supplied for foreach() in /var/www/web46/html/hosting/wp-content/plugins/shashin/ToppaWPFunctions.php on line 444” (Sorry for my bad english…)
Hi Clarezoe – can you give me the Picasa URL for the album, the one with album key 7? Then I can test it.
Hi Norman – a couple other people have reported this problem, but I’m not sure what’s causing it. Can you give me the Picasa URL of the album that fails to load?
Hi Mike – yes, you can do that. Look for the function getHeadTags in Shashin.php. At line 674 you’ll see:
Change it to:
Other overlay options are described at: