• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Watch/Unwatch Forum Button

Dynamic

Well-known member
#1
Hello,

I am just wondering how one would go about adding a Watch Forum and Unwatch Forum button (styled like the Sign up button) to a forum?

I have Social Groups by Waindigo installed, and this allows users to become members of the forum. However, I would like to replace this with a button that will make the member watch the forum. If they are watching the forum, it should display "Unwatch Forum" on the button. This uses the standard forum watch feature built into Xenforo.

Thanks.
 

Brogan

XenForo moderator
Staff member
#2
You could edit the phrases and replace them with images or inline styling.
Or edit the template and apply a class to the link.
 

Dynamic

Well-known member
#3
Hi @Brogan,

Sorry, I should have explained more. The current template has a button that allows you to join the group. I would like to change this button into a watch/unwatch forum button. I am just wondering if there is a bit of code I can add in that has some code to watch/unwatch a forum with the style of the sign up button as the class.

Thanks.
 

Dynamic

Well-known member
#5
Hi @Brogan,

Thanks for the reply. I am only using it for the addon is what I meant. Basically I just need the bit of code that is displayed on all of the thread lists that displays the "Watch Forum" and "Unwatch Forum" (non-addon). That way I can just style it as the sign up button and include the code into the addon. It is just finding that bit of code that I am having a hard time with.

Thanks.
 

Brogan

XenForo moderator
Staff member
#6
The easiest way to do that is to search for the phrase content in the ACP; in this case "watch forum".

That will give you the phrase name, which is, unsurprisingly "watch_forum".

Then just search the templates for that phrase and in this case there are only two: forum_view and forum_watch.