Posted 20 февраля, 201410 yr comment_56717 Almost all of our applications support commenting or reviewing to some degree. You can comment on events in IP.Calendar, images in IP.Gallery and blog entries in IP.Blog, and you can review products in IP.Nexus, for instance. The differences between reviewing and commenting are subtle, yet important. Commenting allows you to say something about a content item that has been contributed, while reviewing is intended to allow you to give feedback about the item based on your experience. You should not be able to review something you have not seen or used, for instance, and you should only be able to review it once. We have worked on developing these concepts further for 4.0, and bringing both capabilities easily to all applications in the suite. Comments Any application in the 4.0 suite can support commenting easily. From a development perspective, you need only create a content comment class that extends IPSContentComment (and define a few methods in this class, such as how to generate the URL to the comment), and then in your main content item class you specify this new content comment class in a specific property. For example, with IP.Downloads we have the following in the content item class /** * @brief Comment Class */ public static $commentClass = 'IPSdownloadsFileComment';And then there is, as you would expect, a commenting class found at IPSdownloadsFileComment which extends IPSContentComment. This comment class defines a few properties, and then defines a single url() method (which must return the URL to the comment). Almost everything else is handled automatically by the suite. Otherwise, comments work largely similar to the way they work in 3.x. Moderators can edit, hide, approve and delete comments. You can allow certain users to reply to locked content (e.g. to leave a comment on something that is locked), but otherwise locked content cannot be commented on. You can use multi-moderation on comments and you can quote and multi-quote comments. All of the functionality you would expect to see is still present. Reviews There are only a few primary differences between reviews and comments. You may only leave a single review on a content item. Once you have left a review, you will not be able to leave another. When leaving a review, you are presented with a 5-star panel from which you should select your star rating. Some applications may further restrict your ability to leave a review. For instance, there is an option in IP.Downloads to only allow users who have downloaded a file to leave a review. As of the 4.0 Community Suite, any application can now support reviews just as easy as commenting. Further, as a developer you can support both simultaneously (and, typically, the administrator can disable one or both systems if they choose). Reviews work almost the same as comments from an implementation perspective. You create a review content comment class, and you define a specific property in the content item class. For IP.Downloads you will see this in the content item class /** * @brief Review Class */ public static $reviewClass = 'IPSdownloadsFileReview';And then you will find a review class at IPSdownloadsFileReview, which extends IPSContentReview (which in turn actually extends IPSContentComment). The review class for IP.Downloads, just like the commenting class, only contains a single method to define how to generate the URL, as well as a few required properties. When reviews are left and a star rating is applied, this rating is averaged and applied to the content item. A content item could in theory support both the traditional star rating system (like you might see in IP.Downloads or even in IP.Board in the 3.x product line) and reviews at a technical level, however it is recommended to prevent confusion that you either use the traditional rating system OR reviews, but not both simultaneously. Most applications in 4.0 that support reviews will not support the traditional rating system as a result. You will note in this screenshot that because I have not yet downloaded the file (which is an optional reviews-related restriction in IP.Downloads) that I am unable to review the file at present. When a user does not have permission to do something, the 4.0 community suite makes every effort to clearly indicate why the user is unable to accomplish a given task. Other users reading a review can determine if they found the review helpful or not (although you are unable to specify this on your own reviews of course), and these yes/no votes are subsequently tallied in order to allow users to sort reviews by "most helpful" per the sorting buttons at the top right of the above screenshot. Wrapping up Applications are capable of displaying either reviews or comments (or both) in any manner they wish, however you will find that most applications in the 4.0 suite that support reviews and/or comments will display them in a fashion similar to the above screenshots (noting all the typical "these are early screenshots and the final product may appear different" disclaimers). By supporting both of these similar yet slightly different functionalities out of the box, we believe our first party applications as well as third party applications by our talented development community can really shine and allow end users to interact with the community in logical and focused ways. We hope these changes allow you to set up your own community to cater to your users in the manner best suited to your community. Attached Thumbnails " title="2014-02-17_1449.png - Size: 27.76KB, Downloads: 0"> " title="2014-02-17_1449_001.png - Size: 25.23KB, Downloads: 0"> " title="2014-02-17_1455.png - Size: 61.75KB, Downloads: 0"> View the full article Читать дальше
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.