PDA

View Full Version : Google reviews on your Site


Haktar
06-12-2011, 10:17 PM
Hey Guys, im redoing our website and I thought it would be a nice idea to have a link to our google places page so our customers could easily leave a review but it looks like the google api lets you do everything put pull your reviews, and after a bit of researching there doesn't seem to be any scripts for it so i thought id rattle one together and share it with you Technibblers ;)

Its far from perfect but it does the job.

you can see it in action at http://novatekk.com/V2/contact.php

Let me know what you guys think and if it works for you....

Here is the CSS Code;


/* Google Review */
.googlereview a{
color:#f86008;
font-size: 12px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
text-decoration:none;
}

.googlereview{
color:#757e85;
font-size: 12px;
font-family: Verdana, Geneva, sans-serif;
font-weight: normal;
}

.comment-box-readonly-first-n{
color:#757e85;
font-size: 12px;
font-family: Verdana, Geneva, sans-serif;
font-weight: normal;
}

.snippet{
color:#757e85;
font-size: 12px;
font-family: Verdana, Geneva, sans-serif;
font-weight: normal;
}

.userpic{float:left;margin:12px 8px 0 0;}
/* Google Review */


and the php code;

<? include('grabreviews.php');
echo $reviewcount . 'reviews';
echo '<div class="googlereview"><div class="userpic">' . $reviewersimg[0][0] . '</div>'; if(isset($reviewersname[0][0])){echo $reviewersname[0][0] . ' - ';} echo $reviewdates[1][0] . '</div><div>' . $reviewstars[0][0] . $reviewfirstcomment[0][0] . ' ' . $reviewfirstsnippet[0][0] . '</div><br/>';
echo '<div class="googlereview"><div class="userpic">' . $reviewersimg[0][1] . '</div>'; if(isset($reviewersname[0][1])){echo $reviewersname[0][1] . ' - ';} echo $reviewdates[1][1] . '</div><div>' . $reviewstars[0][1] . $reviewfirstcomment[0][1] . ' ' . $reviewfirstsnippet[0][1] . '</div><br/>';
?>

Haktar
06-12-2011, 10:18 PM
would help if i uploaded the script ;)

rename to .php :)