posted May 11, 2011, 8:39 AM by Morteza Mirmojarabian
updated Jan 9, 2014, 8:19 PM
The comment system at the bottom of this page is a live example of my approach to viewers comments in Google Sites.
A form to receive comments
Click Edit page ► Insert ► More gadgets ► Public ► Search gadgets: "Comment Form" by Mori ► Select.
- Google form key
Go to the Comment Form & Board template ► click Use this template ► copy the form key, which is at the bottom of the page.
For example: dEZzbmM1V21IdWcwYm9RWFNFeTJ1SVE6MA
- Speech bubble border color
You can pick any HTML color and its darker/lighter shades.
- Form elements background image
The default is a 1×50px gradient image. Feel free to use it or create yours.
- On submit
As an alternative to displaying the confirmation message, you might want to reload the page. You can also redirect users to a custom 'thank you' page or anywhere else you wish.
800px, i.e. multi-line text field width:492px + single-line text fields width:244px + margins and borders:64px
- Include a border around gadget
- Display title on gadget
A guestbook to display comments
Click Edit page ► Insert ► More gadgets ► Public ► Search gadgets: "Comment Board" by Mori ► Select.
Note: As you see, Comment Form and Comment Board are two gadgets.
Hide Comments sheet
- Google spreadsheet URL
Go to your Google Drive ► open the template copy ► click File ► Publish to the web ► select Comments under Sheets to publish.
Note: A common mistake to avoid is publishing All sheets.
Uncheck Automatically republish when changes are made if you're going to moderate comments before they appear on the board and then manually republish them ► click Start publishing ► copy the generated link. For example:
- Feed URL
Select ATOM under Get a link to the published data ► copy the generated link and click Close. For example:
Option: Activate your feed at Google FeedBurner to get more subscription options and keep track of your statistics.
Go to FeedBurner
► change https
on your ATOM link and paste it ► click Next
► click Next
► copy the feed URL.
For example: http://feeds.feedburner.com/google/fWTL
Click Skip directly to feed management
► Email Subscriptions
You're done although there are still many other things to customize on FeedBurner.
- Dynamic height
- Yes: Your gadget grows as users add comments.
- No: Specify a static height. The default value is 86px.
- Feed icon
Like Admin & Viewers comment icons should be 16×16px.
- Include a border around gadget
- Display title on gadget
It makes your spreadsheet interface cleaner. But before that there are two things you might want to do:
- Customize the timestamps format
Click on the Comments sheet tab ► click the Timestamp column letter to highlight the entire column ► click Format ► Number.
- Rename the sheet
Select Rename from the same sheet tab menu.
Now select Hide sheet
from the same menu.
Note: To unhide it at any time, click View ► Hidden sheets.
Format Source sheet
It improves the spreadsheet usability.
- Resize columns
There are two ways to change column width:
- Place your mouse pointer on the columns dividing border ► click and drag the arrow in the direction you'd like your column to expand or contract.
- Click on the column letter menu ► select Resize column ► enter a new value ► click OK.
- Highlight admin's comments
Click on the Name column letter menu ► select Conditional formatting ► select Text is exactly from the drop-down menu ► enter the admin display name ► set a text color and/or cell background color ► click Save rules.
Here are a couple of options:
- Click Subscribe to comments to get updates in your feed reader or via email.
- Define a notification rule on the spreadsheet
Click the Tools drop-down menu ► Notification rules ► check A user submits a form ► check Email - right away or Email - daily digest ► click Save ► Done.
Simply type in your answer on the row below the viewer's comment. If the row below is already filled, right-click the comment row number to highlight the entire row ► select Insert 1 below from the drop-down menu ► enter your comment.
Right-click the spam comment row number to highlight the entire row ► select Delete row from the drop-down menu.
After you've done moderating comments, click the File drop-down menu ► Publish to the web ► Republish now.
Can I customize the Comment Form and Board fields?
This comment system includes four common fields (name, email, URL, comment) that you're not supposed to customize, add to or subtract from.
Why don't comments appear on the board immediately?
It can take Google servers a short time to republish spreadsheets as web pages. So here are the best things to do:
- Select Automatically republish when changes are made.
- Set Comment Form On submit to Reload the page.
- Put a notice like this above your form:
Please reload the page shortly after submission if your comment doesn't appear immediately.
Why isn't there the ATOM option under Get a link to the published data?
It's a known issue in Google Apps accounts. As a workaround, invite your regular Google Account, e.g. firstname.lastname@example.org, to the spreadsheet as an editor, sign in to the spreadsheet through that account, and get the ATOM link.
Do I need to make a new Comment Form & Board for each page?
Yes. But to make things a little easier, create a page template including the gadgets and use it whenever you create a new page or even to change existing pages templates. Obviously, however, you'll need to customize some gadgets settings on each page.
Do both gadgets need to be on the same page?
No: one can be placed on page A and the other on page B; or you can even put just one of them on your site. Imagine you'd like to close comments for some reason, e.g. because your post/article is too old. Then simply remove Comment Form and leave Comment Board for review. Or you can embed Comment Form only, e.g. to keep comments private.
Although these two gadgets are related, they can work independently.
DiscussPlease note that all posts are moderated.