Featured Comment Plugin
Featured Comment Plugin gives you ability to highlight your favourite comments in Newscoop. You will be able to make for e.g. TOP 5 comments all over the site.
While using this plugin you will be able to create different lists of comments (as we have so far list of featured articles), manage and display them in theme anywhere you want.
- Filtering by:
- create date
- drag and drop comments to create custom lists
- saving lists
- removing lists
- adding new lists
- removing single comments from lists
- comment search by name, email, subject, comment message, article title
- Editing existing comments without changing original one
- Adding external comment, e.g. from Facebook, Twitter etc.
More about plugin
To find comment you wish you have to type name, email, subject, comment message, article title in "Search"
- Managing lists
If the list name is not given, then the default comment list will be set to: 'CommentList-<current_date> e.g: CommentList-2013-10-24 23:35:41.
If the comment is already in featured list, proper error message will show up
'Reset all filters' option will reset all extra filters (Commenter, Date created, Language)
To display featured comments lists in fronted, use below code and place it in whichever template file you wish. Let's say for e.g. front.tpl
Above code will display all comments from all lists (defined by administrator in Featured Comments plugin backend). Look at Screen 1.
Screen 1. Comments display in frontend.
You have ability to define some constraints to display lists by given criterias.
- id - list id
- name - list name
- orderBy - order (default is set to list create time)
For e.g. to define constraints to display list with id = 1 or/and name "testlist" we can do something like this:
Above example will show us comments for list with id = 1 and name testlist.
If you do not use constraints, the comments from all defined lists are displayed.
Featured comment Meta class (access from template to featured comment added to list)
To have ability to manage featured comments in templates, meta class is given with properties:
|editedMessage||Comment edited message|
|editedSubject||Comment edited subject|
|subject||Original comment subject|
|message||Original comment message|
|nickname||Commenter full name|
Commenter url (especially defined when
added as exteranl comment, e.g. from Facebook)
|anonymous_author||Checks if commenter is anonymous|
|submit_date||Comment creation date|
|article||MetaArticle - Article which comment was submitted|
|user||MetaUser - Registered user properties if not anonymous|
|source||Comment source (e.g. Facebook, Twitter etc.)|
|isEdited||Checks if comment was edited by editor|
Adding external comments:
You can easly add external comment (e.g. from Facebook or Twitter). The big button "Add External Commet" (look at Screen 6.) gives you that possibility to do that.
After click on that button, modal window will show up with options to add new, external comment look at screen below:
Screen 2. Adding external comment
There is also possibility to choose to which article this comment will be submited. When submitted, it will show up under that article in frontend and in backend. In plugin backend near that comment, label with source name will show up, similar one to "Edited" label (Screen 3.)
Editing featured comments
When you drag and drop comment to created list or when you load one of the existings lists, you will be able to edit comment. After mouse move on comment in Featured Comment list (right side), "Quick edit" button will show up:
Screen 3. Quick edit button
After clicking on that "Quick edit" button, option to edit original comment will show up:
Screen 4. Editing original comment
When submitted, comment will be saved and will show up on frontend smarty block edited version of comment, not the original one. In plugin backend edited comment will have label "Edited" (look at Screen 6.)
To easly add comment to comment list, plugin hook has been implemented. It let's editor to quickly add comment to selected list. (e.g. Good comments, Bad comments etc.).
Hook will show up in Content -> Comments near comment action buttons:
By clicking on "x" near list name, comment will be removed from list.
Comments order in lists:
To quickly change the order of the comments list that is displayed in frontend, change the order of the comments on the selected list (in backed, look at screen below) and save the current state.
Screen 5. Featured Comments Backend comments ordering
In "Available Comments" column (look at Screen 6.) by default 15 comments per page are displayed, sorted descending (last added comments will be on top of the list).
Screen 6. Plugin backend view