Integrating Everywhere add-on with Community Builder profile system

From JReviews Documentation
Revision as of 14:03, 15 December 2013 by Jreviews (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When you integrate JReviews Everywhere add-on with Community Builder profile system, members of your site will be able to rate and review each other.

Creating a JReviews listing type for Community Builder profiles

The first step is to create a listing type for members in JReviews Listing Types Manager:

Listing-types-manager.png

Click the New button in top right corner to create a new listing type:

Members-listing-type.png

Title - enter the listing type title.

Comments & Ratings - 3 options are available:

  • Allow comments and ratings - users will be able to rate and review each other.
  • Allow comments without ratings - users will be able to review each other without ratings.
  • Disable comments and ratings - reviews and ratings disabled - don't choose this.

Select all the field groups you want to associate to this listing type - here you can select review field groups in case you want to include extra review fields besides the standard "Comments" text area.

Display in Advanced Search Page - choose No, this is only for JReviews listings.

Rating Criteria - create rating criteria based on which users will review each other:

  • Rating Criterion - enter the title of the rating criterion.
  • Required - uncheck if you want the criterion to be optional.
  • Weight - criteria weights for weighted average rating calculation. The total must add to 100, do not enter the % character. If left blank a simple average will be calculated.
  • Tooltip - hints for users on how to rate in the review form.

Under Advanced Setup you will find many settings. Since this listing type will be used with EasySocial profiles, only the review related settings will be used:

Members-listing-type2.png

It is recommended to set Stop users from reviewing their own listings to Yes so that users won't be able to review themselves.

The integration includes only user reviews functionality, editor reviews are not available, so none of the editor related settings will be used.

Assigning the JReviews listing type to Community Builder categories

Next step is to go to the Everywhere add-on:

Everywhere-link.png

Click the Select Extension dropdown, choose Community Builder and click the Setup New button:

Everywhere-cb1.png

There are two different ways to setup the Everywhere integration with Community Builder:

Using access groups as categories

This approach would allow you to assign a listing type to specific user groups. If you want to enable reviews for registered users, but not for other types of user, this is the best approach.

After you click the Setup New button, in the popup form select the listing type that you created and choose user groups for which you want to enable reviews:

Everywhere-cb2.png

Using CB custom field options as categories

If you need to differentiate users of a specific user group and enable reviews only for specific users based on their field values, it is possible to use CB field options as categories. You would even be able to assign different listing type with different rating criteria and fields to different users. This would be useful for example in:

  • Student/Teacher site
  • Freelancer site: professionals/employers
  • Community site where businesses sign up to the site to offer their services. Businesses in different industries can have different rating criteria

The first step for this approach is to create a new CB field. Go to the Community Builder component and click the Field Managemet. Click the New Field button, enter the values and click the Save button:

Community-builder-new-field.png

Next, you will need to edit this file:

  • /components/com_jreviews/jreviews/models/everywhere/everywhere_com_comprofiler.php

Near the top you will find two configuration variables:

var $integrationMode = 'fields'; // groups | fields
var $cbCustomField = 'cb_membertype';


You will need to change the $integrationMode to "fields" and $cbCustomField to reflect the name of the CB field that you created.

Now when you go to the Everywhere Add-on, select Community Builder and click the Setup New button, you will see those field values as categories:

Everywhere-cb3.png

You can assign the listing type to the specific field options or assign different listing type to each field option (member type).

Displaying the review form and reviews in Community Builder profiles

To display the review form in Community Builder profiles, it is necessary to install the CB JReviews Everywhere plugin for Community Builder which can be found in the JReviews package that you downloaded from the Client Area. The file that you need to install is this:

  • /package_jreviews_2.4.x_unzip_first/plugins_everywhere_addon/community_builder/plug_cbjreviews_everywhere.zip

To install it, go to the Community Builder component, click the Plugin Management and at the bottom of the page you will find the plugin installer:

Community-builder-installer.png

Publish the CB JReviews Everywhere plugin on the Plugin Management page and then go to the Tab Management page and make sure that the Profile Reviews tab is published as well. Then the Profile Reviews will show up in all profiles for which you enabled the integration:

Everywhere-cb4.png