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

XF 1.3 Disable "unlike"

Discussion in 'Styling and Customization Questions' started by hterrag, Jul 4, 2014.

  1. hterrag

    hterrag Active Member

    Is there a way to disable the "unlike" button?
  2. Freddie Agricola

    Freddie Agricola Active Member

    You mean once you 'like' something you can't unlike it?
  3. Brogan

    Brogan XenForo Moderator Staff Member

    It would require custom development.
    hterrag likes this.
  4. hterrag

    hterrag Active Member

  5. localhost8080

    localhost8080 Well-Known Member

    just add

    a.LikeLink.item.control.unlike {
        visibility: hidden !important;
    to extra.css
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That doesn't disable it, it just hides the link.
    It would be simple enough to bypass that.
    maszd likes this.
  7. localhost8080

    localhost8080 Well-Known Member

    yes, but it's enough for the common user.
  8. Martok

    Martok Well-Known Member

    I don't know, I think even many 'common' users would soon work out that the Like/Unlike link leads to a URL such as this:


    as you can easily see this when you hover over a Like link.

    Once they have worked this out, they can then unlike at will.
  9. localhost8080

    localhost8080 Well-Known Member

    wtf... then in addition change unlikecontent method from like-model to

    public function unlikeContent(array $like){
  10. Lawrence

    Lawrence Well-Known Member

    Hi, you can now, ;) Well, once I release the add-on, I need to do more testing and pick an efficient way to remove the unlike link without using a lot of template mods, most likely this will be done with CSS. Unfortunately, the permission I added covers all content types, members can unlike any content type they liked, or they can not unlike any content types they liked.
    maszd likes this.
  11. Lawrence

    Lawrence Well-Known Member

Share This Page