1. 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

Discussion in 'Styling and Customization Questions' started by Dynamic, Aug 18, 2013.

  1. Dynamic

    Dynamic Well-Known Member

    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.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You could edit the phrases and replace them with images or inline styling.
    Or edit the template and apply a class to the link.
     
  3. Dynamic

    Dynamic Well-Known Member

    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.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If it's specific to that add-on, you will need to ask in the discussion thread as I don't use it.
     
  5. Dynamic

    Dynamic Well-Known Member

    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.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
    Dynamic likes this.
  7. Dynamic

    Dynamic Well-Known Member

    Hi @Brogan,

    Found it :) Thanks heaps for your help man :)
     

Share This Page