I'm trying to add some content between the block of comments and the "Post new comment" box. I can't seem to find a way to do it.

I can theme individual comments, so thought maybe I could theme the last comment (and add the content), but this doesn't fully work because if the last comment is indented, then the extra content is also indented.

I thought I could theme the comment box itself, but it seems that it's not themeable (I am wrong about this? If I am, how can I theme it?)

I then thought maybe I could theme the entire block of comments, but it seems (apart from CSS styling) that's not possible either.

I've read this, this and this, but haven't got anywhere.

So just to clarify: I'd like to put some content between the last comment and the start of the "Post New Comment" section of a page.

(it matters, I'm using a Zen derived theme, but have also tried Garland and got no where with either - I'm happy to hack about with just about anything (non-core) as I'm not going to publish the theme, and support isn't really an issue)

Anyone got any ideas of themeable blocks, or other ways to do this?

Comments

ainigma32’s picture

Status: Active » Fixed

It looks like you'll have to use the /modules/system/box.tpl.php file. Copy that to your theme and then add a conditional statement that checks if it is displaying a comment. Here's a (very crude) example:

<?php
// $Id: box.tpl.php,v 1.3 2007/12/16 21:01:45 goba Exp $

/**
 * @file box.tpl.php
 *
 * Theme implementation to display a box.
 *
 * Available variables:
 * - $title: Box title.
 * - $content: Box content.
 *
 * @see template_preprocess()
 */
?>
<?php if ($title && $title == t('Reply')): ?>
	<h2>Sumthin before the comment box</h2>
<?php endif; ?>
<div class="box">

<?php if ($title): ?>
  <h2><?php print $title ?></h2>
<?php endif; ?>

  <div class="content"><?php print $content ?></div>
</div>

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.