Hi,
This spring Ragtek helped me out creating an add-on (http://xenforo.com/community/resources/permissions-for-watch-thread.592/) that via permission can turn on/off the possibility to watch a thread. At the time all was good and the "Watch thread" link appeared/disappeared accordingly to the permission that was set, in the thread view. After a while I realized that we had only taken care of 1 of the 3 location that as anything to do with this feature. I e-mailed Ragtek and got this answer back:
I tried to understand what Ragtek wanted be to do. Due to a bug in Xenforo something is not working. This is what I came up with:
But now the option to watch a thread when creating/editing a thread is gone regardless what the permission setting is. Something is clearly wrong.
This IF-statement I found in the template thread_view where the "Watch thread" link was placed. That's why I thought this was the variable to use.
I hope anything of what I just said makes any sense to anyone. Any help or pointers on this would be very much appreciated
This spring Ragtek helped me out creating an add-on (http://xenforo.com/community/resources/permissions-for-watch-thread.592/) that via permission can turn on/off the possibility to watch a thread. At the time all was good and the "Watch thread" link appeared/disappeared accordingly to the permission that was set, in the thread view. After a while I realized that we had only taken care of 1 of the 3 location that as anything to do with this feature. I e-mailed Ragtek and got this answer back:
For this add-on to be useful the possibility to watch a thread when creating a thread or editing a thread must be taken care of so permission will affect these parts to.the bug is, that we're having a function canWatchThread but xenforo isn't checking for it in the output and shows the watch_input to all registered users
so you'll need to change in post_edit & thread_create template:
Code:<xen:if is="{$visitor.user_id}"> <fieldset> <dl class="ctrlUnit"> <dt>{xen:phrase options}:</dt> <dd><ul> <li><xen:include template="helper_thread_watch_input" /></li> </ul></dd> </dl> </fieldset> </xen:if>
I tried to understand what Ragtek wanted be to do. Due to a bug in Xenforo something is not working. This is what I came up with:
Code:
<xen:if is="{$canWatchThread}">
<fieldset>
<dl class="ctrlUnit">
<dt>{xen:phrase options}:</dt>
<dd><ul>
<li><xen:include template="helper_thread_watch_input" /></li>
</ul></dd>
</dl>
<xen:include template="thread_fields_status" />
</fieldset>
<!-- slot: after_options -->
</xen:if>
But now the option to watch a thread when creating/editing a thread is gone regardless what the permission setting is. Something is clearly wrong.
Code:
<xen:if is="{$canWatchThread}">
I hope anything of what I just said makes any sense to anyone. Any help or pointers on this would be very much appreciated