Last Saturday I mentioned that I had added a way for you, the reader, to rate my articles and give me some feedback. There are a number of these services available but I chose to use Outbrain as I liked their features. I did mention that although they made it easy to install if you used basic templates in TypePad it was not quite so easy if you are using advanced templates. I also promised, time permitting, to explain how I did this since some of you may find yourself in the same situation. Here it is.
Fair warning - this won't be my typical conversation or whatever you care to call it. Rather it is a more instructional article on how to add code to your TypePad blog to include the Outbrain rating system. If this is of interest, read on.
The Outbrain rating system is setup to be easily added to your blog via a widget. If you are using TypePad's basic templates adding the Outbrain widget is straightforward and easy. Simply add it via the instructions on their website.
If you are using TypePad advance templates as I do, you can't add the widget directly. You have to get the code and add it to your templates. The problem is that when you"claim your blog" and indicate that it is a TypePad blog you cannot find the code you need. When you go to the support function you may find a response to a query about how to add it to advanced templates that basically states working with advanced templates is complex and please email the support group for more assistance.
I emailed support (twice) and got no response so I posted another question on their support forum and did get a response. "Kate" was very friendly and tried to be helpful and took a look at my code but I'm not sure she was fully familiar with the process. Being the impatient type I continued to search and found clues that allowed me to figure out how to get the code. I'm sure Kate would have gotten back to me with the solution if I had waited but adding their widget should not be an individual exercise every time. Other "add-ins" make it easy to find the code, I'm not sure why Outbrain doesn't. Once you get the code adding it isn't hard and you can be set in just a few minutes.
The trick to getting the code is that when you claim your blog indicate "Other" rather than "Typepad".
When you click the continue button you go to another page select your language and click continue again. At this point you see 2 snippets of code.
Before adding any new code to your templates I strongly recommend creating a copy that you can revert to in case of problems. I'd also suggest you set up a test blog to see how your code changes will work before going live on your real blog.
The first code snippet will look like:
You can follow the instructions but I would offer 2 suggestions. First, I would go to the Design page and "Create a new template module" and copy the code into it. You can then include this where you want it using the following include statement.
< $MTInclude module="puttemplatenamehere"$ > (remove the spaces before and after the dollar signs - I added them to make sure the command would appear in this article)
Second rather than entering the URL each time use the MTEntryPermalink tag:
This will automatically enter the permalink for you with every new post.
Scrolling down on the Outbrain page reveals the second code snippet.
Install this as instructed. I added this to the Main Index Template as follows:
When you've completed this publish the changes in TypePad. Once it has been published return to Outbrain and go to the "Manage Blogs" via the link in the left column. Scroll down the Manage Blogs page to the section of "Pending Blog Claims". Find your pending blog claim and select the "Check Now" link. This may take a few minutes and you may have to retry waiting for your changes at TypePad to take effect. Once this completes you are all set and your rating widget should appear.
Once your blog claim has been accepted you should see the widget appear on your blog. If you don't see it you may want to try placing it in a different part of your code.
Good luck - I hope this helps.