The forum topic list page as a 'New Topic' button and a 'Mark All Read' button.

A forum topic page only has a 'Post Reply' button.

How can I add a 'New Topic' button to the topic page?

I've searched the forums and the support list but could not find anything relating to my question. If I missed just point me in the right direction.

Thanks!

Comments

Michelle’s picture

Status: Active » Fixed

In the node preprocess, check if the current user has access to post a new topic and then add a variable for the link. Edit the post template and print the variable.

Michelle

Anonymous’s picture

Do you mean to say that it is not possible to have a 'Post New Topic' button unless I hack the code?

I was hoping this behaviour was available by default somehow since it seems to intuitive to have a 'Post New Topic' button on those pages

Michelle’s picture

You don't need to hack the module. It can all be done via preprocess and theming.

No, it's not available by default. I don't know why it would be intuitive to have a button to post a new topic on the page when you just started reading a topic. If that's something you want for your site, though, it's all doable without any module changes.

Michelle

Anonymous’s picture

Thanks for clearing that up!

The reason it's a useful feature is quite simple. I'm reading a forum thread and realize I want to start a new discussion. So, I look for a button that says 'start a new topic' or something similar. Having to go back to the main Forum page to start a new topic is a bit troublesome.

Don't you sometimes want to start a new topic as you are reading someone else's topic?

Michelle’s picture

Occasionally, if I want to do a spin off topic. I've never found it all that troublesome to go back to the forum page, though.

Michelle

Anonymous’s picture

Troublesome is perhaps a bit too strong a word but it *is* an extra step we are forcing on the user.

Having that functionality would make for a better user experience.

It's the same as your e-mail tool. When you read an email message on that very same page you have a 'create new message' button. The software doesn't force you to go back to the main menu or main home page in order to create a new email message.

Status: Fixed » Closed (fixed)

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

webwriter’s picture

Hi totsubo-

Did you work this out? I'm used to having a New Topic button on the topic page as well but am a little lost when it comes to preprocessing and checking for permissions. If you have more detailed instructions, I'd appreciate it!

Lalas’s picture

If you want to add "New Topic" link near the "Reply/Edit/Delete" Buttons of the discussion add following code just below 'print $links' of advf-forum-post.tpl.php

$nid=arg(1);
$node=node_load($nid);
print "<a href='/node/add/forum/".$node->tid."'>Start related topic</a>" ;

This can be positioned anywhere in the template