Topic: SEO Images

Hello,

I would like to use your plugin to display photographs for the website that I'm developing.

My only issue is that it must be SEO friendly. Are there any options? Images MUST be index by Google, etc.

I've tried to use http://www.mkwebdesign.ca/tutorials/mak … endly.html for the Wordpress plugin, but it doesn't seem to really work.

Thanks,

Last edited by NiveouS (2011-11-12 11:15:02)

Re: SEO Images

I've tried to use http://www.mkwebdesign.ca/tutorials/mak … endly.html for the Wordpress plugin, but it doesn't seem to really work.

Here is how I have successfully integrated the SEO script with WP-SimpleViewer.
(1) Open 'simpleviewer-seo.php' in a plain text editor
(2) Replace line 13:

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

... with:

 $doc->load($gallery_filename);

(3) Replace line 42:

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

... with:

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

(4) Upload 'simpleviewer-seo.php' to your 'wp-content/plugins/wp-simpleviewer/' folder
(5) Open 'wp-content/plugins/wp-simpleviewer/wp-simpleviewer.php' in a plain text editor
(6) Replace lines 820 - 832:

return <<<EOF
<script type="text/javascript">
var flashvars$gallery_id = {};
flashvars$gallery_id.galleryURL = "$gallery_file_url";

simpleviewer.ready(function () {
    simpleviewer.load("flashContent$gallery_id", "$width", "$height", "$bgcolor", $useFlash, flashvars$gallery_id);
});

</script>
<div id="flashContent$gallery_id" >SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a></div>
EOF;

... with:

ob_start();
include 'simpleviewer-seo.php';
$include = ob_get_clean();

return <<<EOF
<script type="text/javascript">
var flashvars$gallery_id = {};
flashvars$gallery_id.galleryURL = "$gallery_file_url";

simpleviewer.ready(function () {
    simpleviewer.load("flashContent$gallery_id", "$width", "$height", "$bgcolor", $useFlash, flashvars$gallery_id);
});

</script>
<div id="flashContent$gallery_id" >SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>
$include
</div>
EOF;

(7) Upload the file to the original location ('wp-content/plugins/wp-simpleviewer/wp-simpleviewer.php')

Steven Speirs
SimpleViewer Support Team.

Re: SEO Images

Amazing - will give it a try tomorrow.

Thanks!

Re: SEO Images

Just added the code - is there any way to test if it is working?

Noticed this error coming up -

[13-Nov-2011 03:56:09] PHP Warning:  DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Empty string supplied as input in /public_html/wp-content/plugins/wp-simpleviewer/simpleviewer-seo.php on line 13

Last edited by NiveouS (2011-11-13 09:58:22)

Re: SEO Images

Just added the code - is there any way to test if it is working?

Display the WordPress page with your gallery in a browser and view the source of the page.
You would normally see something like:

<div id="flashContent27" >SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a></div>

... but with the script in place and working you should see something like:

<div id="flashContent27" >SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>
<div id="svseo"><h1>SV - SEO - Gallery</h1><ul><li style="list-style-type: none;"><p><a href="http://www.example.com/wordpress/wp-content/uploads/2011/11/image002.jpg" target="_blank"><img src="http://www.example.com/wordpress/wp-content/uploads/2011/11/image002-150x150.jpg" alt="Flower" title="Flower"/></a><br />Flower</p></li><li style="list-style-type: none;"><p><a href="http://www.example.com/wordpress/wp-content/uploads/2011/11/image001.jpg" target="_blank"><img src="http://www.example.com/wordpress/wp-content/uploads/2011/11/image001-150x150.jpg" alt="Tree" title="Tree"/></a><br />Tree</p></li></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>

Noticed this error coming up -

[13-Nov-2011 03:56:09] PHP Warning:  DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Empty string supplied as input in /public_html/wp-content/plugins/wp-simpleviewer/simpleviewer-seo.php on line 13

Make sure line 13 in your simpleviewer-seo.php file looks like this:

$doc->load($gallery_filename);

I have uploaded the modified 'simpleviewer-seo.php' and 'wp-simpleviewer.php' files which work for me as a zip file here.
Download the file, unzip the contents and upload the files to your '/public_html/wp-content/plugins/wp-simpleviewer/' folder.

Steven Speirs
SimpleViewer Support Team.