Shashin 2.1 – Easier Steps for Displaying All Album Photos

Shashin 2.1 is now available. It does not include any new dazzling features, but it has a new, easier to use option for displaying all your album thumbnails, and then have them link to a page on your site that displays all the photos in each album. The Shashin page has instructions on how to do this.

There were 3 problems with how I implemented this feature in the previous (2.0) version of Shashin, but they only became clear to me after hearing feedback from people using Shashin 2.0 in a wide variety of WordPress themes. One problem was that the steps involved were just too complicated for most people’s needs (but the more complex options are still there, if you need greater control of the configuration than the new “easy” way).

The second problem was my attempt to manipulate the title of the page containing the [salbumphotos] tag. Shashin 2.0 tries to dynamically append the title of the selected photo album to the page title. In a rational world this would be easy, but WordPress makes it extraordinarily difficult to isolate and manipulate the title of a page, as reported here. I thought I had come up with a work around. But, as it turns out, my solution was not reliable across all the different WordPress themes that are out there. So, with Shashin 2.1, I have removed all the code that tries to manipulate the page title. It now simply displays the album title as a caption on the table that contains the photo thumbnails. This is much cleaner and shouldn’t cause conflicts with any themes.

The third problem was the [salbumphotos] tag, which is used to display thumbnails for all the photos in an album. In Shashin 2.0, a page with the [salbumphotos] tag won’t play nicely with sidebars that use the wp_list_pages function (for listing links to all the pages on a site). The [salbumphotos] tag only worked correctly if you used it in conjunction with Shashin album thumbnails. You couldn’t just go to the page directly from a sidebar link. This is fixed in Shashin 2.1.

Shashin 2.1 also has a few minor bug fixes, the most important of which is that you can now once again see the photo thumbnails in the Shashin admin panel.

I should point out that, if all you want to do with your Picasa photos in WordPress is display your album thumbnails on a page, and then link them to a page that displays the photos in each album, then I recommend kPicasa Gallery. It has similar features to Shashin in this area, but without Shashin’s management overhead. But if you want to do more than just that, then I recommend Shashin 😉 .

56 thoughts on “Shashin 2.1 – Easier Steps for Displaying All Album Photos

  • Dear Michael, A mistake was typing its name by the previous comment.

    It’s wonderful and is the best upgrade.
    It became very easy to use.
    Thank you very much.

    Now, I’ll also use this wonderful plug-in habitually.

  • Michael – fixed my colon issue with this latest release, absolutely fabulous plug-in.

    One question I have not found any documentation on. I will be linking to around 4 Picasa Albums for family photos…is there a way similar to the “Album Photos” pages to create a page that shows All Albums for a particular Picasa account?

    I am thinking I could link each album into their own page rather than have all Albums drop onto one page. Now I realize I can do so by building a page and inputting the Album Names (or ids or something) into the code variables, but didn’t know if there was an automatic way to accomplish this!

    Many thanks.

  • Hi GFB,

    There’s no automatic way to do that at this time. But you can do it with the [salbumthumbs] tag, which is documented here.

    In your case you’d want to create a page with the [salbumthumbs] tag, and give it the album keys for just the albums you want. Then it will display thumbnails for only those albums. When you click the album thumbnails, it’ll link to the page containing the [salbumphotos] tag, where it will display all the photos in the album.

    This is a more complicated than the new “easy” option, but it gives you a huge amount of flexibility. You can choose any albums you want, you can have the album thumbnails in a post or a page, you can layout the album thumbnails differently from the photos, etc.

  • Wow – great-looking plugin, just what I was looking for.

    I’ve installed it on a new WordPress 2.5 install for testing, but can’t seem to get the Highslide option to work. When this option is selected, I don’t see the Highslide “magnifying glass” icon when mousing over the thumbnail would expect. Clicking on the thumbnail results in a small “Loading…” box that pops up over the picture, but nothing happens. If I click again outside the “Loading…” box, the plain image is displayed on its own page. It’s as if the Highslide JS is not getting invoked or something.

    I’ve tried both IE7 and Firefox browsers, but no difference. It works with the sample images at the Highslide web site, so I don’t think it’s a browser setting.

    Any ideas what to look for? Did I miss a step somewhere? The only potential problem I see is that my hosting service (GoDaddy.com) only has MySQL 4.0 rather than 4.1, but it doesn’t seem likely that would cause JS problems.

    Thanks!

  • OK – getting closer. Found one thing I missed the first time: the default WordPress install on GoDaddy is in the /wordpress subdirectory. So I modified the URLs in the highslide.css file to reflect the actual location.

    Now I’m getting the “magnifying glass” cursor when I mouse over a thumbnail. But when I click, it still just brings up the “Loading…” box, and sits there spinning without ever doing anything. I’ve waited up to 5 minutes & nothing happens. Clicking “Loading…” a second time stops it.

    Since I have MySQL 4.0, I also made the suggested modifications to ToppaWPFunctions.php (comment out lines 179-181). I also deleted the existing albums from the Manage.Shashin page, re-added them, and re-synced all the albums with Picasweb.

    Still the same results: I get the Highslide “magnifying glass” cursor, but clicking on the thumbnail never actually loads anything.

    Ideas? Thanks again!

  • Solved my problem: corrupted upload of the highslide/graphics directory. After browsing similar problems on the Highslide forum, I tried setting hs.outlinetype to null in the shashin.php file. That worked! This meant the problem was an inability to load the highslide graphics files. A quick test of trying to manually download these files in a browser showed they were corrupt. Re-uploaded them (explicitly setting FileZilla FTP to “binary: this time) and everything seems to work fine.

    Thanks, and I look forward to moving ahead with this great-lookin plugin!

  • Hi Jim – Sorry for not catching your messages sooner. Sounds like your diligence has paid off. Let me know if anything else comes up.

  • Is there, or will there be any pagination option?

    For example, “kPicasa Gallery” plugin has nice option that you can enter number of albums or photos per page and the script automaticly add page navigation at bottom.

    It can be very useful option, first of all for those who have lot of pictures and want to organize it, nicer.

    One more, when i choose 160px width, all picture thumbs are same size, but when I choose 72px width I get some of them like portrait or landscape shapes, whitch doesn’t look pretty enaught (link http://www.salsanis.com/galerija-slika?album_id=5197716434981344401&title=Treca+salsa+zurka+u+Nisu)?

    Btw, the script is great :))) Regards from Serbia.

  • One suggestion for the [salbumphotos] tag: have a parameter that controls album sort order, in addition to the existing photo sort order. I like to show the most recent albums first, but within each album show the photos in chronological (ascending) order. I’d imagine this is a common scenario.

    I’ve hacked the existing script to make this happen (adding a DESC keyword to the sql query), but might be a nice option for those that don’t want to touch the code.

  • Hi Milan – Pagination is a good idea – I’ll add it to the wish list. If you check the Shashin page, it explains that some of the image sizes are special “cropped” sizes. 160 is one of these sizes – it displays all the images 160×160 square.

  • Hi Jim – that’s a good suggestion – thanks. I try to find the right balance between having good options, but not letting the parameter list become too long and potentially confusing. In this case it might be worth adding one more… I’ll keep thinking about it.

  • Hi 🙂 Just want to say THANKS for this plugin! I was searching for a plugin with so many possibilities for days, and I’m very happy that I found yours which is just perfect. So, thank you so much! 🙂

  • Hey Mike – thanks for providing such a great plug-in. It hardly took much effort to get it working on my site, and I’m impressed with the presentation it gives my site

  • Hey Mike,

    first thanks for these great plug-in. But I have a problem with the plug-in, more exactly with [salbumphotos] tag. I create a page containing the [salbumphotos] tag. The page display thumbnails for all the albums I have loaded in shashin. Then when I click on a thumbnail, it don´t display thumbnails for all the photos in that album of my page, but in the window opens my picasaweb (see here: http://www.essetrip.com/?page_id=71) What´s wrong? Can you help me?
    I want like Dragons art gallery.

    Ideas? Thanks!!!

  • Hi Christian – it sounds like you just need to go into your Settings menu for Shashin and change the “full size image display” setting to Highslide.

  • I am currently running mysql 3.23. I tried installing your plugin, but I get the two create table errors that you mentioned here. I commented out the three lines in the “functions” code. However, I am still unable to add an album which I suppose is b/c the tables never get created at all.

    Any insights?

  • Hi – I haven’t worked with that version of mysql, but it’s possible it pre-dates mySQL’s current UTF-8 support. In shashin.php, look for and comment out the following two lines:

    $wpdb->query(‘ALTER TABLE ‘ . SHASHIN_ALBUM_TABLE . ‘ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci’);

    and

    $wpdb->query(‘ALTER TABLE ‘ . SHASHIN_PHOTO_TABLE . ‘ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci’);

    And then in ToppaWPFunctions.php, replace this line:

    $sql .= “) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;”;

    with this:

    $sql .= “);”;

    Let me know if that works.

  • Dear Sir, should shashin display albums with highlight? Coz only single photos are being displayed with highlight. As to albums, am getting the link which lets visitors go to picasa and view them there.

  • Hi Aouni – album thumbnails can be set up to link to another page that shows the pictures in the album. See the Shashin page for instructions (see link in the post above). The album thumbnail itself does not display in Highslide, if that’s what you mean.

  • Since Shashin 2.2.1, images don’t display anymore. With the previous release, everything worked perfectly well.

    A tag such as [simage=104,160,n,right] only displays an empty square on my blog http://www.heiniger-net.ch.

    What did I do wrong? Or could it be that some bug was introduced?

    Thanks a lot for your help.

  • Hi Daniel – You need to deactivate/reactivate, and then do a “sync all” for your albums (if you downloaded 2.2.1 last Saturday night or Sunday morning, the “sync all” note was missing, but it’s been in the installation notes since then).

  • When I try a “sync all”, it gives me this message:

    “Failed to sync albums. This was probably a bad connection trying to read the RSS feed. Please try again.”

    Trying again just gives the same message over and over.
    What’s the problem?

  • Hi Daniel – please check line 220 of Shashin.php. It should be this:

    if ($foundEnclosure === false) {
        $wpdb->query('ALTER TABLE ' . SHASHIN_PHOTO_TABLE . ' ADD enclosure_url text NOT NULL');
        $wpdb->query('ALTER TABLE ' . SHASHIN_PHOTO_TABLE . ' ADD enclosure_type varchar(255) NOT NULL');
               }

    If you’re missing the “enclosure_type” line, then put this in your code:

    // if ($foundEnclosure === false) {
    //    $wpdb->query('ALTER TABLE ' . SHASHIN_PHOTO_TABLE . ' ADD enclosure_url text NOT NULL');
          $wpdb->query('ALTER TABLE ' . SHASHIN_PHOTO_TABLE . ' ADD enclosure_type varchar(255) NOT NULL');
    //}

    Then deactivate and reactivate – this will force it to create the enclosure_type field.

    There was a glitch with my upload to wordpress.org last weekend, and for a short time there was a version of Shashin.php that had the missing line. I’m guessing this is what’s causing your problem. If this isn’t the problem, please let me know.

  • This is what I found at line 220 in shashin.php:
    [code]
    if ($foundEnclosure === false) {
    $wpdb->query(‘ALTER TABLE ‘ . SHASHIN_PHOTO_TABLE . ‘ ADD enclosure_url text NOT NULL’);
    $wpdb->query(‘ALTER TABLE ‘ . SHASHIN_PHOTO_TABLE . ‘ ADD enclosure_type varchar(255) NOT NULL’);
    }
    [/code]Therefore, it looks ok.
    Is there anything else I can check?

  • Hi Daniel – Do you have a tool like phpMyAdmin, that lets you browse your database tables? If you can send me a list of the columns in your wp_shashin_photo and wp_shashin_album tables, we can see if the tables were updated correctly.

    What version of mySQL are you using? Shashin has certain problems with versions prior to 4.1.

    It must be either Shashin’s table structure or its RSS parser that’s giving you trouble. The tables are the most straightforward to check so let’s start there.

  • Hi Mike — Even better: I have WP-phpMyAdmin. It tells me this:

    Server version: 5.0.32-Debian_7etch6-log
    Protocol version: 10
    phpMyAdmin – 2.10.3
    MySQL client version: 5.0.32
    MySQL charset: UTF-8 Unicode (utf8)

    table wp_shashin_album has the following columns:
    album_key, album_id, user, name, link_url, title, description, location, cover_photo_url, last_updated, photo_count, pub_date, geo_pos, include_in_random

    table wp_shashin_photo has the following columns:
    photo_key, photo_id, album_id, title, description, link_url, content_url, width, height, taken_timestamp, uploaded_timestamp, tags, include_in_random, deleted, enclosure_url

    Thank you for your help. I hope this brings us further. Anything else that is of interest?
    — Daniel

  • Hi Daniel – Try the code change I sent you before, then deactivate and reactivate. The enclosure_type column didn’t get created in your wp_shashin_photo table when you upgraded. At the moment I’m not sure why it didn’t, but the code change I sent you before should force the code to run that will create that column. Let me know if it works.

  • Great! That did the trick. Now it works again, photos are shown.

    But this reminds of another minor glitch: Did you verify the shashin CSS code under Firefox? Or is it my theme? If you look at the “Random Image”, or the little house on the current latest article of my blog in Firefox, you will notice that the pictures “hang out of their frames”. I fixed that in shashin 2.2 by editing the shashin.css, but that change is, of course, gone now.

    Thanks –Daniel

  • Hi Daniel – There are some errors in your “Chameleon” theme that may be causing the trouble:

    
    Warning: Error in parsing value for property 'width'.  Declaration dropped.
    Source File: http://www.heiniger-net.ch/blog/wp-content/themes/chameleon/style.css
    Line: 38
    
    Warning: Expected end of value for property but found 'padding'.  Error in parsing value for property 'margin'.  Declaration dropped.
    Source File: http://www.heiniger-net.ch/blog/wp-content/themes/chameleon/style.css
    Line: 672
    

    Also, with this version of Shashin, you can put a copy of shashin.css in the folder of your active theme and it will use that. So when you upgrade Shashin in the future, you won’t lose any customizations you’ve made.

  • The first css error is intentional, and I just fixed the second one, but without any visible effect on the image-display.

    It took this on shashin.css for my pictures to display properly on Firefox:
    .shashin_image img {
    padding: 3px 3px; /* double this for shashin_div_padding option */
    border: none;
    }

    (i.e. a second “3px” on the padding line)

  • Hi Daniel – at least in theory, there’s no reason to make the change you did. The declaration for this in shashin.css has 3px listed once, which means it adds 3px of padding to each side of the image. By putting it twice, you’re still saying the same thing – the first 3px applies to the top and bottom of the image, and the second applies to the left and right. See here:

    http://www.w3schools.com/Css/pr_padding.asp

    I haven’t seen any problems related to this in Firefox (versions 2 or 3). If you really want to get to the bottom of this, I’d recommend briefly switching themes (and turning off other plugins that add their own css) to test whether there’s some interaction with your theme that was causing this.

  • Hey Mike,

    Love the plugin. I got it working perfectly. I think its great.

    I was wondering: is it possible to display albums from two seperate picasaID’s, seperately on a website, say sorted by ID?
    My problem is this. I use the plugin on our schools website. Right now all pictures from kindergartenschool and primary school are put together on one picasa ID, so they end up mixed together on a page.

    Is there a way to get them displayed apart, maybe on different pages?
    I thought we might have to register an different picasa account for one or the other, but i think shashin would still display them together on a page although it can sync with multiple ID’s.

    Is there a workaround? I dont think a second shashin installation is a possibility, right?

  • Hi Kristiaan – the only way to approach this currently is to use the salbumthumbs tag – see the directions here. But this requires you to know the album keys for each picasa user, which is a pain. I’ll try to think of an easy way to adjust this so you can specify a Picasa username instead of album keys.

  • Thank you very much for this plugin – I’ve been looking at a number of ways of integrating Picasa photos into my family’s site and yours is one of the most flexible solutions.

    That said, I’m hoping that you will consider a change. Instead of using a local style element on each td div that defines the thumbnail width, e.g. 118px or 154px for the 144px thumbnail size, would you consider using a class, e.g. class=”hthumb144″ or class=”vthumb144″?

    I realize that you’d have to define all those classes in the stylesheet for all possible image sizes, but the benefit would be that we could, for example, set all the 144 thumbs to be 154×154, regardless of horizontal or vertical orientation. I prefer the orderly look of same-size thumbs and the 160px thumbs are just a little large for a big album, plus I can get 4 columns of 144s instead of 3 160s.

    Or even better would be a plugin settings option for “square thumbs”…

  • Hi – thanks for using Shashin, and sorry for the delay replying. You can’t crop an image simply by making its containing element smaller. It is possible to achieve the effect of a cropped image with CSS, but if you do a Google search for it, you’ll see discussion threads with people arguing about making the images into background images, negative margins, etc. The whole thing strikes me as too dicey for me to start tweaking Shashin for it.

  • Hi Mike,

    Thanks for a great plug-in. Works like a charm and easy yet flexible too.

    I seem to be missing something in your instructions, as I am not able to figure out how to link 2 pages together (to connect the album thumbnail page to the photos page)? I have read and re-read the instructions several times, but still cant seem to understand how to link them. Any suggestions?

    Here is what I am trying to do:

    Show all album thumbnails on a page and when one is clicked show all the photos in that album. Using [salbumphotos=160,3,n,y,title] works fine. It show the photos exactly as I want (sorted by title).

    But on the album thumbnail page, I would like the albums to show in descending order, with the latest album as the first one. So, if I understand the instructions correctly, I cannot use the [salbumphotos]tag, instead I have to:

    1: Create a page (I called it albums) and past: [salbumthumbs=pub_date desc,2,y,n,left]

    Which works fine and show in correct order. But when an album is clicked it doesn’t show the photos for that. So, I have to:

    2: Create another page (I called it photos) and past:

    [salbumphotos=160,3,n,y,title]

    Ok, so I did that, but still when I click on an album, photos for that album do not show up. I am assuming because in step 1 above I have not linked the “album” page to the “photos” page.

    So how do I link the 2 pages together?

    Or is there an easier way to get the albums in the right order, but photos by title?

    Hope you had a good Christmas break and wish you a very Happy New Year

    Ray

  • I have used shashin for a year now. Its great, thank you so much.

    Feature request: could you make it work with unlisted google albums, it seems to kick out an invalid URL reference if I try to add an unlisted album.

    Thanks

  • Hi – thanks for using Shashin. I’ve looked into adding support for unlisted albums, but the problem is that the thumbnail links would need to include your “secret” key in order to display the photos on your site. This means anyone who looks at your site would be able to copy the key and use it to view your album on Picasa. Let me know if you still want to use unlisted albums with Shashin like this. I’m happy to add support for this, but I want to make sure everyone who would use it understands that it would make their unlisted albums accessible to anyone who is savvy enough to look at the URL and copy the album key.

  • Hello again,

    Please ignore my post above. When I created a new page, I forgot to change the URL in Settings | Shashin to the new photos page. Its all working now.

    Thanks again for a great plugin.

    Ray

  • Hi Ray – sorry for not replying sooner, but it sounds like you worked it out. This will be much easier to do in the next version of Shashin (you won’t need the separate page with the salbumphotos tag).

  • Hi Mike,

    No problem with a late reply. Actually it wasn’t late at all.

    Yes, worked it out, its my own fault for not rechecking the url..:).

    Sounds good for the next version, would be cool. But if I can vote, I would agree with a suggestion someone else made on your site, about pagination. Selecting how many albums and pictures you want to see on a page. Personally, I think with highslide on, I wont use pagination, but I can see someone else wanting to. So would be a good plugin feature.

    I must say, there are a lot of good plugins out there, but yours is not only good in terms of how well works, but its also great because of how easy it is to implement, yet still so configurable. It’s a very cool product.

    Happy New Year again.

    Ray

  • I am not sure I understand the issue with unlisted albums. All my albums on Picasa are unlisted, yet still show up on site using Shashin.

    Ray

  • Hi Ray – I think we might be using “unlisted” with a different idea in mind. Google’s definition is here:

    http://picasa.google.com/support/bin/answer.py?answer=39551

    If your albums are unlisted then they require an authorization key in the URL. I didn’t add support for them to Shashin as I figured people wouldn’t want to make the authorization key visible in their sites. But from what I’ve been hearing recently, some Shashin users won’t mind (for example, they already require a password to view their site).

  • Hi Mike,

    I looked at the link you sent for Google Picasa and yes, all my albums are set to be unlisted. When I am log into picasa, I see the little orange image with a locked lock on it next to all my albums. But I am able to see all the images from picasa on my website using Shasin.

    Unless I am seeing them because Google has cached them, I don’t know. I checked the source code of my site, and I don’t see any key or for that matter even picasa or google being mentioned.

    I will wait a few days to see if the pictures disappeared because they are cached. Will let you know if that happens.

    Ray

  • That’s interesting. It’s been probably a year since I tried using an unlisted album with Shashin (I don’t have any unlisted albums of my own). At the time, Shashin couldn’t add the album because I hadn’t designed it to handle the authorization key in the album URL. Maybe something has changed with Picasa since then. I’ll experiment again with making one of my albums unlisted (I probably won’t get to it for a week or two though – I’m working on finishing up Shashin 2.3).

  • Hi Mike,

    Shashin was just what I was looking for. One question though: how can I make a page that displays only the albums I want to display? If I always need to make a page with the [salbumphotos] tag, that page will be visible and still show all the albums I have added to shashin.
    Theo

  • Hi Mike,

    I’m using your plugin and I’m very satisfied with it. You’ve done a great job!

    Now, after 9-months of using I’m planning to improve my gallery to add rating or comments, but since I liked Highslide plugin I thought it would be imposible.

    But, yesterday I found some galery which has something like highslide (maybe it isn’t highslide), but have rating stars and comments (page gallery is http://www.clubotheque.com/fotografije_&_video.75.html?galleryId=437#).

    Is there any way to add something like this in your plugin, since Picasaweb has comments and there some wp plugins for rating?

    • Hi Milan – thanks for using Shashin. The site you linked to is using Lightbox. Highslide can accommodate anything that we want to put in the caption. But Picasa comments are not included in the RSS feed, so there’s no way for Shashin to access the comments. Picasa also doesn’t have a ratings system. Adding a rating system of my own would be a pretty big job (the ratings plugins designed for WordPress are meant for rating posts, not pictures, so I wouldn’t be able to use those plugins).

  • Hi Mike, loving Shashin. Any update on the unlisted album support? I’m trying to add an unlisted album to my “Random” pool and it won’t add in the Tools menu. (“Failed to add album. This was probably a bad connection trying to read the RSS feed.”)

    I’m aware that the authkey would be exposed, but that’s fine with me in this case. Thanks for any help!

    • Hi Neil – I spent some time the other day looking into this, and it’s actually a somewhat difficult problem to solve. I can have Shashin use an album’s authkey to access the photo feed for an album, so that part is no problem. The problem is that I also need to access your Picasa user feed that has metadata about all your albums. Unlisted albums don’t show up in the public version of that feed, even if I have an authkey. To access that feed, I’ll need to give Shashin the ability to log in to Picasa as you. This is possible with the Google API, but it’ll be a fair amount of work. I just posted the beta version of Shashin 2.3. I’ll take a shot at adding this capability in Shashin 2.4.

Comments are closed.