Lookfab, here’s a slight tweak to the default kakumei topic.php theme file that should do what you want:
<ol id="thread" start="<?php echo $list_start; ?>">
<?php $i = 0; ?>
<?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
<li id="post-<?php post_id(); ?>"<?php if ($i == 0) { echo 'class="firstpost"'; } elseif !($i % 2) { echo ('class="alt"'); }?>>
<?php bb_post_template(); ?>
</li>
<?php $i++; ?>
<?php endforeach; ?>
</ol>
You can then style the class “firstpost” using CSS to make it stand out however you want…
I didn’t test this, but I think it should work either by itself or with a tweak or two.
Thanks bobbyh. I think this is what I am doing now, but the problem is that when the thread goes onto a second page, the first post on the second page gets class=”firstpost” too.
Is there any other way to find out programmatically whether a post is the first one in a topic?
Try this (inserted into the code I had above):
<?php if ( ( $i == 0 ) && ( $page == 1 ) ) { echo 'class="firstpost"'; } elseif !($i % 2) { echo ('class="alt"'); }?>>
Yes, this does the trick. Thanks very much!