Posts Tagged ‘comments wpmu’

Modifying the WPMU comment field to reference a comment policy

Thursday, January 10th, 2008

As noted on our Voxeo Talks blog, we now have created a “Comment Policy” regarding comments posted to this blog site. When you go to fill out the comment field on a blog entry we have some text below that field and before the submit button that basically says that in submitting the comment you agree to comply with our Comment Policy. This all came about after one of our recent posts attracted some comments that made us concerned that we were not stating what we would and would not permit to be posted.

Creating the “Comment Policy” page was a simple matter of creating a new “Page” in the top-level blog here on the site. This is what you see when you hit blogs.voxeo.com. As I think I’ve noted before, this top “portal” is, in fact, just another WPMU blog, but we’ve set it up so that the main page does not allow actual postings, but rather displays the latest posts across our various blogs. So there will never be any actual “posts” in that particular top-level blog. There can, however, be pages, and they will appear in the sidebar where it says “Pages”. The nice thing about this is that you also quickly get an easily-referenced URL that you can use in other places. In this case, that URL is “http://blogs.voxeo.com/comment-policy/

The next step was to modify the comment field across all the blogs here to include a reference to the comment policy. Because all of our blogs use the exact same theme, this, too, turned out to be a relatively trivial exercise. I just went into our theme, which is actually named “default” in our case and found the file “comments.php”. Down on line 97, I inserted a simple <p> paragraph (shown in blue):

<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><em>Please note: By submitting a comment you agree to comply with our
<a href="http://blogs.voxeo.com/comment-policy/">Comment Policy</a>.
We welcome all comments, positive or negative, but do reserve the right to remove
all or part of blog comments that do not comply with our policy.
</em></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" class="commentsubmit" />

This is now visible below the comment field in all of our blogs. That was it… nice and simple.

Now, the one remaining thing I would like to do is to add a link that says “Comment Policy” underneath the “Pages” heading in the sidebar of each of the blogs here. Right now it only appears under the Pages heading on the top-level site (blogs.voxeo.com). I’m not entirely sure how I’ll do this yet. That block in the sidebar is automagically generated with the various “pages” created for the specific blog. Obviously, I could simply create a new page called “Comment Policy” in each blog and copy/paste the text into it, but that: a) is more manual work than I want to do; and b) could lead to the comment policies on blogs being out of sync if we update the main one. So I need to figure out a way to link to the main comment policy. What I might simply do is create a new entry under “Links” in each blog that goes back to the main comment policy. The other option might be to see about doing some kind of “include” macro inside the pages that brings in the contents of another page (if such a thing exists). I’m definitely leaning toward the Link option as the simplest, even if it means that the “Comment Policy” link will appear in a different place on the blogs than it does on the main home page.

We’ll see. In the meantime, we do now have some text in the comment area of all of our blog entries. If you have suggestions for how you’ve done something like this, please feel free to leave a comment. (Subject, of course, to the comment policy! ;-)

Technorati Tags: , , , , , ,