Making SimpleViewer SEO friendly

Blog, Tutorials May 16, 2010 18 Comments

I had a issue with my images and captions not being indexed by Google and other search engines because my images were being displayed in the flash viewer SimpleViewer.

SimpleViewer Flash viewer

SimpleViewer Flash viewer

The solution for the problem was to create a small php script that would pull the images and caption from the gallery.xml file that SimpleViewer uses and then display them on the webpage for the spiders and non-flash viewers to see.

This code if for websites that are not running on a CMS system.  You should be able to edit your pages directly for this script to work.

There are several different ways of displaying the images, but I put the PHP include command into the flashcontent DIV which you can see below.

<div id=”flashcontent”>Your browser requires JavaScript and the Flash Player to view the content on this site.
<a href=”http://www.macromedia.com/go/getflashplayer/”>Get Flash.</a>
<?php include(“simpleviewer-seo.php”); ?>
</div>

The code will fetch your thumbnails and captions.

You will have to change the $imgpath variable to your gallery directory.

The code also puts the first 50 characters of your caption into the image’s ALT and Title tag.

To see if the plugin is working, enter the url simpleviewer-seo.php file in your browser and you can see what it put’s out.  Another way is to disable javascript in the browser and you should then see the script running rather than the SimpleViewer flash gallery.

If you need any help, feel free to send me an email.

Gallery Output for non-flash browsers and spiders.

Gallery output for non-flash browsers and spiders.

Mikael Kjellstrom

You can download the code below and try it out.

http://www.mkwebdesign.ca/codes/simpleviewer-seo.zip

This code is provided without guarantee and  ’AS IS’ .

Note: SimpleViewer SEO does not work with the WordPress Plugin of SimpleViewer. I might support a modified plugin in the future for WordPress, so if you are interested, please leave a comment.

18 Responses to “Making SimpleViewer SEO friendly”

  1. Felix says:

    Looks awesome! Thanks!

  2. Cameron says:

    Thanks for this technique, I’m using it on my site to make it more SEO friendly.

  3. Ron Lew says:

    Hello,

    I would love to use this technique of yours, however, I must be doing something wrong. I have the website below and the php output below. The output is not showing images but “X”s. the source code shows that it is not following the images and just repeats the thumbs/ folder. There are 12 “X”s and there are indeed 12 thumbs in the folder. the index.php, sv-gallery-output.php are in the /MonicaDengo folder and the thumbs are in the /MonicaDengo/Thumbs folder. I put the code you suggested into the index.php file as well.

    Any insight you have would be very helpful.

    Lastly, once this works, how do I tell the spiders to look at the sv-gallery-output.php to find the images? i will have numerous galleries…

    Thanks so much for the help.

    Ron

    Website page is here:
    http://www.lindareps.com/simpleviewer/page_MD_no_iframe.html

    location of sv-gallery-output.php:
    http://www.lindareps.com/svmanager/MonicaDengo/sv-gallery-output.php

  4. Ron says:

    Thanks you, it looks like a very handy script. But I’m trying to download the file, and I get to your 404 page. Is the link broken?

  5. Tom says:

    Hi there
    Handy script, but I’m getting the same problem. I can’t get images (thumbnails) to display. Caption displays ok but no images. Any idea why?
    If you send me an email I can give you access to my files so you can check.
    Thanks very much

    Tom

  6. Mikael says:

    Email me the the url to your gallery.xml m (at) mkwebdesign dot ca and I will have a look at it.

  7. Andrew Brackenbury says:

    Hi – Just found this link and wondered if your technique would work and be beneficial for a site using SV Pro 2? My site is: http://www.abrackenbury.com

    Thanks for any help,
    best regards
    Andrew

  8. Mikael says:

    Andrew,
    In certain instances, the script works fine in SimpleViewer 2.0 . You can download it and try it on one of your galleries. Let me know if you need any assistance.
    PS! I did a quick test of your gallery.xml and it looks valid for the script to work. http://www.mkwebdesign.ca/test/simpleviewer-seo.php
    …Mikael

  9. Ehrin says:

    I have to tell you thank you sooooooooo much for this. It is very very very generous of you. Thank you so much for your help and your code.

    Wishing you the best,
    Ehrin

  10. Andrius says:

    First of all, huge thanks for producing this simpleviewer plugin!

    The only issue I have is that I don’t know how to make it work with SimpleViewer WordPress plugin. The issue is that I am unable to supply SEO plugin with the URL of the gallery file (wp-uploads/[GalleryID].xml).

    Do you plan to make any ammendments to make it work? or any ideas on how I could fix this?

    Thanks!

  11. Sandra says:

    Hi Mikael,
    many thanks for providing the script.

    Perhaps I miss something, but how do I make sure that the page is only displayed if flash is not available?
    If I include the script into my gallery, I first see all thumbs that are populated by your script AND the SimpleViewer slideshow.

    What do I miss?

    Thanks,
    Sandra

  12. Mikael says:

    Sandra,

    You need to place the code inside the PUT CODE HERE
    or if you are using the newest embed code from SimpleViewer it won’t have the flashcontent div, but rather the sv-container, so then put your code in between the sv-container div.

    PUT CODE HERE

    …m

  13. Mikael says:

    Andrius,

    Sorry for the delay in approving and replying. I have been in Europe travelling with patchy internet.

    I think the only way right now would be to modify the current wp-simpleviewer.php file and insert the code into it. If you would like, I can do a modified version and you can then try it.

    …m

  14. Andrius says:

    Mikael,

    thanks for the reply! That would be great! I tried to figure it out myself, but my knowledge of php is limited to only being able to read it.

    Thank you!

    a.

  15. Conny says:

    Hi Mikael,
    thx a lot for your plug-in. I have SV2 and when i check enter the url simpleviewer-seo.php file in my browser it worked. So i try implement it in the sv-container of the index.html and put the simpleviewer-seo.php in the same directory like my index file.

    Is this correct? How can i check if the plug-in works? I try to google my captions but they doesn’t show up.

    Thx, Conny

  16. Mikael says:

    Conny,

    You can either disable flash in your web browser (java script) and next time you view the website the photos with captions should show.
    If you just want to make sure that the captions is showing, try viewing your site with the text-only web viewer Lynx.

    You can do that online at

    …Mikael

  17. Eric says:

    Hello Mikael,

    Does your very good script is fully compatible with Juicebox (http://juicebox.net/) the “new” Simpleviewer ?

    Thanks in advance.
    Eric

  18. Mikael Kjellstrom says:

    Eric,
    I have not tried it with the Juicebox. The script is fairly simple, and can easily be modified to match the new xml file.
    Mikael

Leave a Reply