View Single Post
  #1  
Old 14 Dec 2017, 06:40
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
[vBMods.rocks] 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 thread! 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)

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  9. Insert the following code ABOVE the code in Step 8

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

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

This mod is also posted on my site.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote