Resource icon

New post & reply buttons in threads

avalanch

Active member
avalanch submitted a new resource:

New post & reply buttons in threads - Adds reply and new thread buttons to threads.

This code is amp html friendly.

You can use this to show it members of certain usergroups. Simply edit the "in_array" below to add usergroups to it.
This will add a "reply" button next to the newthread button.

Go to: ACP --> Template --> thread_view and find:
<xf:breadcrumb source="$forum.getBreadcrumbs()" />

Add this code directly below that line:


PHP:
<xf:if is="{$xf.visitor.user_id} AND in_array({$xf.visitor.user_group_id}, [2, 3, 18, 4, 5])">
    <xf:pageaction>
        <xf:button href="{{...

Read more about this resource...
 
One item - unfortunately I cannot get a new thread button to appear for visitors/not logged in the way you can on the forum_view pages. Adding group_id 1 does not show the button, nor does removing the group check in the compound AND statement do the trick either.
 
I was able to get something else to work - put the button into a sidebar widget and that did the trick. I used the code to post a new topic that was in the forum_view template. Works much better for me than this solution, although your effort is much appreciated.
 
Back
Top Bottom