GBook is such an easy script to set up that it occurred to me that it could be used to collect reviews that have microdata/Rich Snippets markup in them - definitely a great way of getting better listings in the search engines.
I've done the markup already; relatively simple because all it needed was a few template changes: a change to overall_header.php and comments.php.
What I haven't done is put star ratings and aggregate ratings in because the scripting is beyond me; if anyone would care to assist with that please get in touch.
It's still a work in progress but I'm happy to share what I've done so far:
/*************************************
Title: MicroData
Version: 0.01
Author: Simon Allen
Demo: http://www.1-ecommerce.com/comments/gbook.php
Download: None Yet
Description:
Amendments to the files as follows:
\gbook\templates\default\overall_header.php
Amend DTD on Line 4 to:
Code: Select all
<!DOCTYPE html>
Amend line 5 and add a new line to look like this:
Code: Select all
<div class="gbook_commentbox" itemprop="review" itemscope="" itemtype="http://schema.org/Review">
<meta itemprop="itemReviewed" content="Add Your Review Title" />
Code: Select all
<span class="gbook_submitted_by"><?php echo $lang['t17']; ?> <b><?php echo $name; ?></b>
<meta itemprop="author" content="<?php echo $name; ?>"/></b></span><br class="clear" />
Code: Select all
echo '<span class="gbook_submitted_by">'.$lang['t18'].' '.$from.'</span>';
echo '<meta itemprop="name" content="'.$from.'" />';
echo '<br class="clear"/>';
Code: Select all
<span class="gbook_added"><meta itemprop="datePublished" content="<?php echo $added; ?>" /><i><?php echo $lang['t31'].' '.$added; ?></i></span>
Once you've done all that go to the Google Rich Snippets Testing tool http://www.google.com/webmasters/tools/richsnippets and test your page.
Heres the URL for my own: http://www.google.com/webmasters/tools/ ... .php&html=
You can miss out the "itemReviewed" line if you wish and I've added a CreativeWork - WebPage declaration by altering the body tag as follows:
Code: Select all
<body itemscope itemtype="http://schema.org/WebPage">
Cheers
Simon