1 (edited by Eric 2012-11-19 07:05:49)

Topic: SEO Compatible

Hello,

How works Juicebox with Search Engine Optimisation (SEO) ?

It is necessary to send to Google Webmasters Tools the config.xml file for example ?

Thanks in advance,
Eric

Re: SEO Compatible

It is necessary to send to Google Webmasters Tools the config.xml file for example ?

Google Webmaster Tools allows users to submit a sitemap in XML format but the Juicebox gallery 'config.xml' file is not a sitemap. It simply stores the image data for the gallery.
Reading this Google Webmaster Central Blog article, I expect that Google would be able to find and index the XML file. (If it can do it for a Flash gallery, I expect it would be able to do it for a non-Flash gallery but only Google would be able to answer this with certainty.)
However, to increase the chances of your gallery being indexed by Google, you might like to implement a solution similar to the PHP script on this web page. Although the script was written for SimpleViewer rather than Juicebox, the principal is the same. The script uses the data in the XML file to populate the gallery's container div on the HTML index page with traditional <img> tags using 'alt' and 'title' attributes. The script should be able to be converted from the SimpleViewer format that it is currently in to the Juicebox format quite easily as SimpleViewer and Juicebox XML files share a similar format.

3 (edited by john 2013-01-25 01:33:18)

Re: SEO Compatible

Any update on this? The seo worry is the only thing stopping me buying this.

The link to webmaster blog is a 3 year old document and reading years on in replies many people had lots of issues with getting indexed.

The link for the php script requires code tinkering and seems to be in flash, I just don't have a clue how to convert it to work with juicebox. Any chance someone can do it and paste up the code for me to copy??


I ended up on juicebox because of the simplicity with the plugin for Lightroom. I need something that (with no coding skills) i can have a great gallery that resizes  depending on users browser, looks superb, easy for older web users to navigate and it takes me less than 60 seconds for a 12 image product gallery.

The only thing holding me back is the fact I am not sure google will find and index my product images. They seem to like easily crawl able html with some text and a nice img src and alt tag for each image. I decided against flash because of the seo headache and am desperate that this juicebox will work seo wise. I don't want a hard solution involving learning java/php and scripts and all that stuff.

Re: SEO Compatible

I really agree with you, i can develop galeries myself but as i will have many pictures to "offer" i never found a very good and useful gallery product with path and filenames that i choose for seo.

But they seems to prefer develop product over other products to earn money without looking to the needs of the webmasters.
I will stop also and i don't wants to buy upgrades each time they develop something else.

After Simpleviewer, Juicebox, Showkase and to morrow JuiceKase ?

Re: SEO Compatible

The link for the php script requires code tinkering and seems to be in flash, I just don't have a clue how to convert it to work with juicebox. Any chance someone can do it and paste up the code for me to copy??

I have adapted the SimpleViewer SEO PHP Script for use with Juicebox galleries. (The code is entirely PHP and does not involve Flash at all.)
(1) Change the $imgpath variable to the absolute URL of your gallery folder.
(2) Paste the code into a file named 'juicebox-seo.php'.
(3) Copy the file to your gallery folder.
(4) In your gallery's embedding code, change:

<div id="juicebox-container"></div>

... to:

<div id="juicebox-container"><?php include("juicebox-seo.php"); ?></div>

(5) Make sure that the file extension for the web page containing your gallery's embedding code is '.php' rather than '.html'.

<?php
######################################################
# Project:      SimpleViewer SEO Gallery Plugin      #
# Version:      2.02                                 #
# Author:       Mikael Kjellstrom                    #
# License:      Copyright (c) 2010 Mikael Kjellstrom #
######################################################

######################################################
# Adapted for Juicebox by Steven Speirs, 2013        #
######################################################

$imgpath = 'http://www.yourdomain.com/pathtogallery/';  // The path to the gallery 
$altmaxchars = "50";   // The maximum characters of the TITLE and ALT tags taken from the title and caption 

$doc = new DOMDocument();
$doc->load( 'config.xml' );

$gallery = $doc->getElementsByTagName( "juiceboxgallery" );
foreach( $gallery as $gallery ) {
    $gallerytitle = $gallery->getAttribute('galleryTitle');
}

print "<div id=\"jbseo\">";
print "<h1>$gallerytitle</h1>";

$images = $doc->getElementsByTagName( "image" );

print "<ul>";

foreach( $images as $image ) {
    $largephoto = $image->getAttribute('imageURL');     
    $photo = $image->getAttribute('thumbURL'); 

    $titles = $image->getElementsByTagName( "title" );
    $title = $titles->item(0)->nodeValue;

    $alttitle = substr($title, 0, $altmaxchars);
    $pos = strrpos($alttitle, " ");
    if ($pos>0) {
        $alttitle = substr($alttitle, 0, $pos);
    }
    $title = htmlspecialchars($title);
    $alttitle = htmlspecialchars($alttitle);

    $captions = $image->getElementsByTagName( "caption" );
    $caption = $captions->item(0)->nodeValue;

    $altcaption = substr($caption, 0, $altmaxchars);
    $pos = strrpos($altcaption, " ");
    if ($pos>0) {
        $altcaption = substr($altcaption, 0, $pos);
    }
    $caption = htmlspecialchars($caption);
    $altcaption = htmlspecialchars($altcaption);

    print "<li style=\"list-style-type: none;\"><p><a href=\"$imgpath$largephoto\" target=\"_blank\"><img src=\"$imgpath$photo\" alt=\"$altcaption\" title=\"$alttitle\"/></a><br />$title<br />$caption</p></li>";
}

print "</ul>";

print "<p style=\"font-size: 10px;\">&copy; 2010 &middot; <a href=\"http://www.mkwebdesign.ca/tutorials/making-simpleviewer-seo-friendly/\" target=\"_blank\">Powered by SimpleViewer SEO Gallery Plugin</a></p>";
print "</div>"; 
?>

Re: SEO Compatible

Yes, i know it. It is an hack, why don't integrate a similar process in your products ?

7 (edited by john 2013-01-25 10:48:47)

Re: SEO Compatible

Thanks for the code. I'll have a tinker and see if I can get it to work.

I know to some people code is just like writing a sentence in english but to other's ,like me, it can take hour'ss or be impossible to do something like centre an embedded image.

I appreciate the code for me to cut and past. Thanks.

And thank you Eric for raising this post initially, I also agree it would be nice to be built in. I would be happy to pay extra for it. But, I suppose with free code available it may seem cheeky to charge for something most webmasters can do with their eyes closed.

Re: SEO Compatible

Well it works, but when i open the gallery live there is a large gap above and below the main image, unless I click on full screen, then the gap goes. This defeats the object of the original perfect script and the fiddling gives back the time I gained by using juicebox over other gallery's.

The code source looks a bit spammy. I fetched as google in webmaster and although I don't know much about seo it's just a pile of tags and links with no structure including that I think google might turn their nose up at.

Appreciate I am asking too much and probably should be paying someone to right jquery or somesuch for my website. I want someone to tell me different and tell me how to fix the new big gaps from the changed galler now with a .php .  I do want to use this but I want some seo benefit and no risk of being penalised.

Re: SEO Compatible

Well it works, but when i open the gallery live there is a large gap above and below the main image, unless I click on full screen, then the gap goes. This defeats the object of the original perfect script and the fiddling gives back the time I gained by using juicebox over other gallery's.

The SEO script should have no effect on the layout of your gallery (or web page). It populates the 'juicebox-container' <div> with HTML text, links and images for SEO purposes (sourced from the gallery's XML file) but, when the gallery is loaded, the entire contents of the 'juicebox-container' <div> should be replaced with the gallery itself (though the SEO code remains on the page and can be viewed in your browser using the 'View Source' option).
Your web page should look the same both with and without the following code inside the 'juicebox-container' <div>.

<?php include("juicebox-seo.php"); ?>

If you continue to experience difficulties, please post the URL to your web page so that I can take a look.

Re: SEO Compatible

Steven,

Yes sorry, I should have checked before posting. My google chrome browser is the culprit, firefox or safari are fine and the code makes no difference. As you said.

Thank you agin for writing up the code. It works, and you spent the time writing up instructions and modifications that were correct and I went and had a hissy fit because I had something wring my end with the browser.

I like the juicebox, I will just do some more checking and considering the lite is free there is no harm in trying a few galleries within my webpage and see if they end up in google's images.

If it all works I will buy the pro, the main reason to pay would be to remove the link so my competition can't copy me too easily!! So sorry about that in advance.

Many thanks.

Re: SEO Compatible

Hello

I had bought Simpleviewer because it was the only gallery which was able to display my art as I wanted; but it took me several months to realize that it was because of Simpleviewer that my SEO  just crashed : when I had one or two messages a week  in my guestbook since 6 years, in 2012 I had... three.
So I set Juicebook and it is the same thing.
I'm going to try your php code but frankly, I did'nt pay to have my SEO going to zero and to be forced to work hard in order to understand and set your code.
Elisabeth

Re: SEO Compatible

Entièrement d'accord !

Re: SEO Compatible

I am working on a site with multiple Juicebox galleries and have set up each gallery as a separate folder within the file structure.  The main file for each gallery sits one level outside of the folder.  The link below shows a screenshot of the folder structure.

http://www.harvardstudio.com/site/galle … icebox.jpg

The juicebox-seo.php file is reading the xml file correctly:

http://www.harvardstudio.com/site/galle … ox-seo.php

However the gallery page is not pulling in the seo information on the page I am testing:

<!--START JUICEBOX EMBED-->

<script src="gallery_arch/jbcore/juicebox.js"></script>
<script>
  new juicebox({
      containerId : 'juicebox-container',
      baseUrl : 'gallery_arch/',
  });
  </script>
<div id="juicebox-container"><div id="jbseo"><h1></h1><ul></ul><p style="font-size: 10px;">&copy; 2010 &middot; <a href="http://www.mkwebdesign.ca/tutorials/making-simpleviewer-seo-friendly/" target="_blank">Powered by SimpleViewer SEO Gallery Plugin</a></p></div>

</div>
<!--END JUICEBOX EMBED-->

The url for the page above is http://www.harvardstudio.com/site/gallery_arch.php.  I know I am pulling in the file thru the include statement because I am seeing the copyright info in the output code. 

If I copy gallery_arch.php into the same folder as the seo and config file everything works.  Is there a way this SEO will work with the main gallery page not in the same folder as the juicebox-seo.php, config.xml, and image files?

Hope this makes sense.

Appreciate the help!

Re: SEO Compatible

@ dkane

If using a baseUrl, you will need to modify the SEO script to take this into account.
By default, the SEO Script looks for the 'config.xml' file to be in the same directory as the web page into which script is included.
In your case, change:

$doc->load( 'config.xml' );

... to:

$doc->load( 'gallery_arch/config.xml' );

The $imgpath variable should still point towards the gallery folder: http://www.harvardstudio.com/site/gallery_arch/

Re: SEO Compatible

@steven.

Thank you for the help!!  Making that change worked perfectly.

As a former Simpleviewer user, Juicebox Pro is a great HTML5 alternative and the SEO script is a great add-on.

16 (edited by ZabParis 2013-02-03 17:23:37)

Re: SEO Compatible

Hello Steven

thanks for the code ; it was not so hard to implement !


But if you can help me a bit more I would be very pleased.

Each gallery in my website is called from a php page (http://www.extrados.fr/spip.php?article17 for example), and displayed in an iframe :

<iframe id="gallery" src="#" width="100%" height=750  frameborder="0" scrolling="no"></iframe>
<script type="text/javascript">
    document.getElementById('gallery').src = "http://www.extrados.fr/galeries2/#SOUSTITRE/index";
</script>

  (the little script is for Google translation)

#SOUSTITRE is the keyword which indicates the gallery I want, "amerique" in this example.

If i load directly the url http://www.extrados.fr/galeries2/amerique/index the SEO code works perfectly and in the page  source code I see all the links to the images and the comments.

But through the iframe, in the parent page source code you won't see that.

I've tried to replace the iframe by an include, but it doesn't work, I tried to set directly the embedded code in the parent page, does not work...

Have you any idea ?

Because if there was a way, it would be better for SEO, AND the comments would be translated when I apply Goggle translate...

Thanks.

Elisabeth

Re: SEO Compatible

@ZabParis

If you were to load the gallery into an iframe, display the page containing the iframe in a browser and view the source of the iframe, then the SEO code will be displayed.
However, if you would like the SEO code to be inserted into the page which contains the iframe, then you would need to create a container on the page with the iframe, such as:

<div id="seo"><?php include("juicebox-seo.php"); ?></div>

... and hide it with CSS such as:

<style type="text/css">
    #seo {
        display: none;
    }
</style>

Re: SEO Compatible

Thanks for the help on SEO. I originally posted this on another thread, but I think it's better to continue the discussion here. My question is, is it possible to make each image have a uniquely indexed page on Google? The technique described here would be having one crawlable page for the entire gallery, as opposed to individual pages for each image.

It turns out that Google already has recommendations on making AJAX pages crawlable: https://developers.google.com/webmasters/ajax-crawling/

Is there any way to integrate this with Juicebox? I know it's already possible to have unique URLs for each image by appending #1, #2, etc. It's simple to change these to #!1, #!2, etc. to fit with Google's framework. However, I am stuck when it comes to what to do next.

Re: SEO Compatible

Is there any way to integrate this with Juicebox?

It looks like it may be possible to implement this for a website containing a Juicebox gallery but it does not look like something that can be integrated within Juicebox itself (as it requires, amongst other things, creating HTML snapshots).
(As you are already aware, it would also require implementing a new direct linking technique as Juicebox natively uses # rather than #!.)

Re: SEO Compatible

Hi Steven
it was a bit of work but now it's ok, even with my iframes !
Too bad I don't know PHP enough to be able to adapt the SEO script so that there is just one file which gets the good gallery's name. I had to create 24 different SEO files. But not so hard.
Thanks a lot !!!!!
Elisabeth

Re: SEO Compatible

I just wanted to see if I am thinking correctly and if I modified the code correctly.  It does work and I get the title and caption of each photo when I view the page source.  I'll know in several days if Google finds the page when I seach on some of the titles.

The code can be tweaked in any number of ways. Whether or not removing the <img> tags from your code will harm your SEO results, only time will tell.

Re: SEO Compatible

Try hiding the 'jbseo' <div> in your 'index.php' page using CSS such as either:

#jbseo {
    visibility: hidden;
}

... or:

#jbseo {
    display: none;
}

Re: SEO Compatible

I'm assuming this method will not affect SEO?

This is a valid use of hiding links and text according to this web page.

Re: SEO Compatible

Juicebox-Pro v1.3 now comes with SEO built in: http://juicebox.net/support/sharing/#seo