Announcement

Collapse
No announcement yet.

Add Like button in Comments

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod Add Like button in Comments

    By default, comments in vB5 have no Like button. I don't know the rationale behind not adding Likes in comments when you can like starter posts and replies.

    If you want to enable Like button in comments, you've come to the right place! This requires a very simple change in the comment template.

    Here are the steps:
    1. Login to AdminCP.
    2. Navigate to Styles > Search in Templates.
    3. Select the desired style/theme in the "Search in Style" dropdown.
    4. Enter "conversation_comment_item" (without quotes) in the "Search for Text" field.
    5. Select "Yes" in the "Search Titles Only" radio button.
    6. Click "Find" button.
    7. Double-click on the "conversation_comment_item" in the search result box to edit the template. Or select it then click "Edit" button on the "Controls" block on the right.
    8. Search for the following line in the template: (Hint: It is near the bottom)
      Code:
      {vb:template conversation_footer, conversation={vb:raw conversation}, controls={vb:raw footerControls}}
    9. Insert the following code ABOVE the code in Step 8
      Code:
      {vb:set footerControls.showVoteCtrl, 1}
    10. Click "Save" button.
    11. Repeat Steps 2 to 10 for each active style/theme you are using.
    Adding the above code still adheres to the Like permission system. If user (e.g. guests) has no permission to like a post, the Like button will not be visible in the comments. Likewise, if you like your own comment, it will display an error "You cannot Like your own posts." similar to when you like your own starter post or reply.

    This is a FREE mod. If you use this mod, please consider donating to show your and support. Thank you!

    NOTES:

    This requires a template edit, so:
    • That means this mod is only for self-hosted version and not possible in vBCloud. Sorry vBCloud owners!
    • It may cause a template merge conflict for "conversation_comment_item" template whenever you upgrade. You would have to resolve the conflicts to ensure the change is not lost
    Last edited by glennrocksvb; 01-18-2022, 11:13 PM.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    If you want this to be official, you can vote for this old JIRA filed more than 5 years ago.



    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


    • goxy63
      goxy63 commented
      Editing a comment
      Nice one, thank you

    #3
    This is fantastic! Two cups of coffee sent!

    Comment


      #4
      Actually I wasn't aware of lack of like button in comments
      I applied the instructions and it seems very good now.
      Thank you so much.

      Comment


      • goxy63
        goxy63 commented
        Editing a comment
        testing testing new option

      #5
      Awesome, enjoy your coffee!

      Comment


        #6
        I have been wondering about this myself I am so glad I am taking the time to surf through all the posts here, this was a great find, thanks Glenn

        Comment


          #7
          Originally posted by glennrocksvb View Post
          By default, comments in vB5 have no Like button. I don't know the rationale behind not adding Likes in comments when you can like starter posts and replies.

          If you want to enable Like button in comments, you've come to the right place! This requires a very simple change in the comment template.

          Here are the steps:
          1. Login to AdminCP.
          2. Navigate to Styles > Search in Templates.
          3. Select the desired style/theme in the "Search in Style" dropdown.
          4. Enter "conversation_comment_item" (without quotes) in the "Search for Text" field.
          5. Select "Yes" in the "Search Titles Only" radio button.
          6. Click "Find" button.
          7. Double-click on the "conversation_comment_item" in the search result box to edit the template. Or select it then click "Edit" button on the "Controls" block on the right.
          8. Search for the following line in the template: (Hint: It is near the bottom)
            Code:
            {vb:template conversation_footer, conversation={vb:raw conversation}, controls={vb:raw footerControls}}
          9. Insert the following code ABOVE the code in Step 8
            Code:
            {vb:set footerControls.showVoteCtrl, 1}
          10. Click "Save" button.
          11. Repeat Steps 2 to 10 for each active style/theme you are using.
          Adding the above code still adheres to the Like permission system. If user (e.g. guests) has no permission to like a post, the Like button will not be visible in the comments. Likewise, if you like your own comment, it will display an error "You cannot Like your own posts." similar to when you like your own starter post or reply.

          This is a FREE mod. If you use this mod, please consider donating to show your and support. Thank you!

          NOTES:

          This requires a template edit, so:
          • That means this mod is only for self-hosted version and not possible in vBCloud. Sorry vBCloud owners!
          • It may cause a template merge conflict for "conversation_comment_item" template whenever you upgrade. You would have to resolve the conflicts to ensure the change is not lost
          For those who are not comfortable editing templates, you could purchase the Product Installation Add-On service below and we will install this mod for you.

          Need help or not comfortable installing this mod? Purchase the installation service below:

          vBulletin One-Time Plugin Installation Service Add-On: $20
          Purchase this product add-on to get one-time professional installation of this mod from us.

          Buy Now Add to Cart View Cart
          Is there a way to change the word "Like" to a different word, such as "Props"?

          Comment


            #8
            Yes, you need to search the phrase variable $vbphrase[vote_cap] and change it to what you want. That is for the original "Like" you see in a post, I don't know if this mod inherits that phrase.

            You would also want to search for $vbphrase[unvote_cap] and change that as well.

            Comment


              #9
              Originally posted by NumNum View Post
              Yes, you need to search the phrase variable $vbphrase[vote_cap] and change it to what you want. That is for the original "Like" you see a the post, I don't know if this mod inherits that phrase.
              So, you change "vote_cap" to "Props"?

              Comment


                #10
                Originally posted by NumNum View Post
                Yes, you need to search the phrase variable $vbphrase[vote_cap] and change it to what you want. That is for the original "Like" you see in a post, I don't know if this mod inherits that phrase.
                I'm not finding that phrase variable anywhere in my default template.

                Comment


                  #11
                  AdminCP / Language & Phrases / Search in Phrases

                  Not in the template itself.

                  Comment


                    #12
                    Originally posted by Iamtdg View Post

                    So, you change "vote_cap" to "Props"?
                    Just about anything.

                    Click image for larger version

Name:	Capture.PNG
Views:	207
Size:	3.2 KB
ID:	15096

                    Comment


                      #13
                      Originally posted by Iamtdg View Post

                      So, you change "vote_cap" to "Props"?
                      No, you edit the phrase “Like” to “Props”.

                      Comment


                        #14
                        Originally posted by NumNum View Post
                        AdminCP / Language & Phrases / Search in Phrases

                        Not in the template itself.
                        It said "No Phrases Matched Your Query". I must be doing something wrong. I searched for $vbphrase[vote_cap].

                        Comment


                          #15
                          In the search screen change "product" to "vbulletin".

                          Further down change "Search In" to "Phrase Variable Name Only"

                          Comment

                          Users Viewing This Page

                          Collapse

                          There is 1 user viewing this forum topic.

                          • Guest Guest

                          Latest Posts

                          Collapse

                          Working...
                          X
                          Searching...Please wait.
                          An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                          Please push the back button and reload the previous window.'
                          An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                          Please push the back button and reload the previous window.'
                          An internal error has occurred and the module cannot be displayed.
                          There are no results that meet this criteria.
                          Search Result for "|||"