Shashin 2.0 – Highslide and Album Displays

Shashin 2.0 is now available. I jumped the version number to 2.0 because this release includes a couple major new features. One is that Shashin is now bundled with Highslide. It was a fun challenge getting WordPress to play nicely with Highslide for displaying any combination of photos in a post, and then any combination of posts on a page. The other major new feature is linking album thumbnails to a local display of the album’s photos, so you can show them on your site instead of having to go to Picasa.

There are minor new features too: a new tag that lets you display sets of album thumbnails alongside their titles and descriptions, an option to prefix album titles to photo captions, and if you choose not to use Highslide, you can open the links to Picasa in a new window if you want.

All the details, including instructions for using the new features, are on my Post to Post Links II error: No post found with slug "shashin-wordpress-plugin".

If you have any questions or run into any problems, please use the comments on this post.

16 Comments

  1. John March 20, 2008

    I’m trying to display all my albums on one page using highslide.

    Should I use the ‘salbumphotos’ tag? and for that I need to enter the page url in the options?

    Whenever I enter the url into the box I get the error:
    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 2 in /Shashin.php on line 121

    Thanks in advance for any help.

  2. Mike March 20, 2008

    Hi John – it sounds like you’re doing it correctly, but please review the instructions on my Shashin page to make sure.

    Can you let me know the url you entered for the option? That’s a surprising error – could you also let me know your PHP version?

  3. Conan March 20, 2008

    I’m getting the same problem with PHP 5.1.6. Also, there are a couple of other bugs I noticed:

    1. target=”_blank” is not applied correctly to any external a-link when the option to open Picasa in a new tab/window is chosen.

    2. Links to external assets seem to be hard-coded, so Shashin does not work in blogs that run in subfolders. Highslide is also affected by this. Check out get_bloginfo(‘wpurl’) in the Codex.

    Otherwise the plugin is excellent!
    Cheers, Conan

  4. Conan March 20, 2008

    I did a bit of searching and it looks like a RegEx in Shashin may not be syntactically correct, or that a dynamically-built RegEx is not being properly parsed into a correct RegEx format:

    http://uk3.php.net/manual/en/function.preg-match.php#79892

    I hope this helps.
    Conan

  5. Mike March 20, 2008

    Hi Conan – thanks for both your comments, they’re very helpful. I found and fixed the target=”_blank” problem (but I haven’t uploaded it yet to wordpress.org) – thanks for pointing it out.

    I’m not sure what you mean by “links to external assets seem to be hard-coded.” Shashin dynamically determines the locations of files. The one exception I can think of is in highslide.css, where I do have hardcoded paths to highslide assets. I was thinking of writing the css file dynamically, but that causes other headaches. But I could be missing something – if you could give me a specific example of what you mean that would help me track it down.

    Could you let me know what value you entered for the Shashin option “Your page for album photos”? That’s where the regex comes up. I haven’t been able to reproduce this problem so a specific example would help.

  6. Conan March 21, 2008

    Hi Mike,

    The value I entered into the “Your page for album photos” was “?page_id=37”. Interestingly Shashin works fine; all except for the error John pointed out above, which appears at the top of every page after setting this value.

    You can clear the error with error_reporting(0) in Shashin.php, although obviously this is just a temporary hack. I’m guessing that it’s the ? that is disliked by your RegEx.

    As for “links to external assets seem to be hard-coded”, what I mean is this: The and tags echoed by Shashin.php refer to /wp-content from the root, as opposed to /blogfolder/wp-content, or whereever the blog is stored. To fix this was insert a period “.” into the strings like this:

    This:
    src/href=”.’ . SHASHIN_DISPLAY_URL
    Instead of this:
    src/href=”‘ . SHASHIN_DISPLAY_URL

    To make the paths relative, but I guess the main issue is how SHASHIN_DISPLAY_URL is generated.

    I hope this helps, and thanks for the quick response!
    Cheers, Conan

  7. Conan March 21, 2008

    Addendum: “The and tags” should read “The <link> and <style> tags”

  8. Elmar March 21, 2008

    I synced my albums again… got an limit error or something now half of my images are gone! You know how I get it back? If I sync the album It will not show the images anymore.. he’s seeing the ID’s but there empty!! I really hope not to doe it al over again because I have so many!!

  9. Elmar March 21, 2008

    Damn! I cannot even place a new album to Shashin. IT will add the album but will not show the foto’s..

  10. Elmar March 21, 2008

    Hi I checked again, I had a backup of my photo’s but when I sync my photo’s per slbum or in once (sync all albums) then It’s F*cking up my Database and I can’t use it anymore. I didn’t try with adding new albums but I don’t think it will work. 1.07 worked great for me! And syncing is great there. I hope you can fix this! Because I really want and need the highslide. And the functionality to get the large images from picasa only has 2.0. Otherwise I wanted to bring shashin 1.07 with highslide together but it’s to complicated for me!

  11. Mike March 21, 2008

    Hi Elmar – I’m sorry for all the trouble. Are you still seeing a PHP error? (you mentioned a limit error before). Also, did you deactivate and then reactivate Shashin on your plugins admin panel when you uploaded 2.0? That’s a crucial step for updating the database configuration.

  12. Mike March 21, 2008

    Thanks Conan. I see exactly what you mean now with the urls. I’ll get that fixed. I think the issue with the regex is that PHP 5 must be reporting the warning and PHP 4 isn’t (I’m still on PHP 4, so that’s why I don’t see it). You’re right it probably has to do with the ? since that’s a special regex character. I’ll get that fixed too. You can expect an update within 24 hours.

  13. Elmar March 21, 2008

    I read the readme.txt always before doing stuff 😉 But I deactivated the 1.07 then deleted 1.07 then i uploaded 2.0 and activate the plugin. So I did al those things. I only got the error if I were syncing all my album in once.. But still.. Now I had some backups so i’m really glad! And tried it again! now I synced only one album. But still then I had a problem. It erases the HTTP link to the original image.. so now if i click on a image in the album (in manage – shashin – album) it links to http://www.domain/blog/edit.php?imgmax=160&crop=1 instead of for example: http://lh3.google.com/username/R8JQ_frDHjI/AAAAAAAADqY/E9dHvsmfn4c/P2201300.JPG.jpg?imgmax=160&crop=1

  14. Elmar March 21, 2008

    When I see my database the ID’s are still in there and the names but the image links are erased. So know my option ony is use 1.07 for adding new albums and syncing (I think adding a new album will also will do not good) but didn’t try it yet. And using 2.0 for the highslide 🙁

  15. Mike March 21, 2008

    Hi Elmar – what you’re describing sounds really strange. My hunch is that something went wrong with the database DDL when going from 1.07 to 2.0 (I never tested skipping the versions in between). If you have something like phpMyAdmin for your site, and you’re comfortable doing some SQL, could you send me the output of these two statements?

    DESCRIBE wp_shashin_album

    DESCRIBE wp_shashin_photo

    If we’re lucky the problem will be an incorrect column definition that we can fix.

  16. mlodedrwale March 21, 2008

    Hello!

    I have strange problem with shashin.
    Ther are no thumbnails in administration -> shashin -> album. I can see markup, photo key and other things but not the thumbs. When i paste the markup to the post, tha image doesn’t appear. I can only see images in widget.

    and when i click on submit button on album administration page i have this warning:
    Warning: Invalid argument supplied for foreach() in /home/mlodedrw/public_html/mlodedrwale/wordpress/wp-content/plugins/shashin/Shashin.php on line 348

Comments are Disabled