AF is awesome, but I really can't work this one out after 3 days of looking at the code and searching around.

I have AF using nodecomment with a node type of "reply" for forum replies. I'd assumed that I could use node-reply.tpl.php in my theme directory to theme the replies, but nothing happens when I do that (even after clearing the cache), so I'm assuming there's some sort of override somewhere in AF.

The nearest I can get is the .../styles/naked/advanced_forum.naked.comment-wrapper.tpl.php template, which wraps all the replies. Tried Theme Developer; no use. Tried the age-old "editing template files at random"; no luck.

I can see the view theme info, but that's unthemed and the template suggestions there don't help or give any useful pointers.

I can see in AF.module that there's post rendering going on for AP, etc. but there's nothing obvious for the actual themeing of the reply node(comment).

Can somebody point me at the template, file or function I need to look at?

Many thanks.

Comments

Michelle’s picture

I don't have the exact file name handy but it's the one with "post" in it.

Michelle

dunx’s picture

I tried that one: advanced_forum.naked.post.tpl.php

That's the "forum" node, not the replies. If you echo "hello world" at the end of that it comes out after the Tags, so before the replies.

I've now added a "DUNX {filename}" line to the end of every template in naked. None of those lines show up after the reply, nor in the page source.

Style cloudless_day has no template files. Style silver_bells (on which it relies) has no template files.

Still at a loss as to how to style the replies.

Michelle’s picture

Forums aren't nodes. The "post" template applies to forum posts, whether they be the starting post or reply posts. If it's not using that template for the replies, then something else is interfering. I haven't updated the Nodecomment module on my site in quite some time. It's possible some recent change to it has broken this.

Michelle

dunx’s picture

Sorry for the confusion, my "forum" node is a forum post, not a forum (which is taxonomy).

The replies don't seem to be using the advanced_forum.naked.post.tpl.php template even though the post and reply output is almost identical, which is confusing.

I am getting closer though... seems I may need to theme the view, rather than the "reply" node. If I want to add something after the reply node (which is an option, for what I'm after) I can add that to my theme's views-view-row-node--nodecomment-comments-1.tpl.php, which is a copy of the view module template views-view-row-node.tpl.php.

However that template simple displays $node, so I come full circle for actually themeing the reply node.

Okay, found it! You are right; it's that advanced_forum.naked.post.tpl.php template. It's just that the view was being cached (as noted in the AF docs and as displayed in the view's config screen), so I need to clear the cache (drush cc all) every time I make a change to the template file.

Thanks for the pointers and hopefully of use to somebody else.

Michelle’s picture

Status: Active » Fixed

Oh, yeah, the caching is pretty aggressive because multiple node loading in D6 is slow.

Michelle

Status: Fixed » Closed (fixed)

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