Turning Off Comments Site-Wide with Advanced Templates
April 17, 2006
This article reprinted from the the TypePad Hacks Weblog. The original article can be found online:
http://www.typepadhacks.org/2006/04/turning_off_com.html
© 2008, John T Unger
I asked Craig McGinty to write a quick tutorial on his method for turning off comments site-wide without losing existing comments in the process. Here's his reply (with some edits for style). Thanks, Craig!
The problem of comment spam came up in a post from Neville Hobson, whose archived Typepad site was being hit by spammers.
Bud Parr devised a method that works for TypePad blogs that do not use advanced templates (Basic or Plus accounts). It involves exporting posts, changing the code in any text editor using search and replace, then reimporting the posts to TypePad. My own version requires you to have a Pro account in order to cut the comment form element from the entry-individual template. This retains existing comments while preventing spam software from automatically posting junk comments.
Before you start changing any templates please be sure you have a back-up copy. This method requires few changes so things should run smoothly. Tips on safely working with advanced templates can be found here.
- Go to the Design tab for the blog you wish to edit.
Near the bottom of the page, locate and click "Create new template module." Give your new template a name of
entry-individualby typing it in the "Template Name" field. (If you already have a template module called "entry-individual," just edit it and skip to step 3.)Navigate to this page in TypePad's Knowledge Base (preferably in a new tab or browser window) and copy the
entry-individualtemplate module code.Return to your new TypePad module, and paste the code you just copied into the Template Body field.
- Scroll down until you see the following line of code:
(it should be near the very bottom).
<$MTWeblogIncludeModule module="comment-form"$>- Deleting this line of code will ensure the form for leaving comments is no longer displayed. Existing comments will remain.
- Click save and republish your site.
Here is an example of how a page looks, with an existing comment still displayed.
Tags: typepad, comments, spam, commentspam, hacks, advanced templates, design, blog, blogs, blogging, weblogs
More Like This: Advanced Templates , Hacks for Comments





Comments