• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Review This Item Button

JBS

New Member
AMS Premium
EMS Early Adopter
RMS Premium
SC Premium
Is there a way to add a "review this product/item" button? Once the item was reviewed it would be cool if it turned to "reviewed". My members are having an issue figuring out were to click to rate items.

...or...

What is the URL that I would use to create my own button?

Also...a button for "discuss this item". Like in the XF resource manager?
 
The challenge is that there are multiple rating systems and they work differently ie, one is an inline AJAX rating, the other is an AJAX overlay form action. You can't just place a "button" somewhere. Neither system works like that as they are both AJAX driven by clicking on the stars (which is a javascript action that either then does an inline rating or launches the overlay for users to enter in text for the review).

You'd have to completely re write the rate/review system to do what you want.

As for the discuss button, it has been suggested and MIGHT make it into the next version.
 
The challenge is that there are multiple rating systems and they work differently ie, one is an inline AJAX rating, the other is an AJAX overlay form action. You can't just place a "button" somewhere. Neither system works like that as they are both AJAX driven by clicking on the stars (which is a javascript action that either then does an inline rating or launches the overlay for users to enter in text for the review).

Is there a way to add a second instance of the rating system to a different location...like the reviews tab...or above all the tabs?
 
Depends on which rate/review system you are using. If its the inline ajax system, then it will require some programming to handle additional inline inserts. The Review system would be a bit easier since it does a response redirect which reloads the page (it could be done similar to how the Resource Manager has it below the main body content).

I wish I could tell ya that you just cut and paste some template code, but its not that simple. Even relocating it requires more than just a template edit, it will require modification to the .js file, some programming code (the view) and a couple different template edits (and some CSS changes).

Once I release this next version, I will be available for customization and can certainly handle something like this for you. I've done a few rating customization's for license holders.
 
Not sure if this will work for you, but this is now part of core showcase when using the Rate & Review rating system type (this is not applicable to rate only system).

I've added a new block above the Reviews on the Reviews tab of an item (see below image). This only displays if the viewing user has permission to rate & review and has not yet reviewed the item. If the user does not have permission OR has already review, the block won't even be rendered.

This is an example of what it looks like (very simple).

Selection_035.png


This is also displayed below the "Content" tabs and on all the Custom Field Tabs pages (again, only for the Rate & Review rating system type). Here you can see it below the content on the first tab...

Selection_036.png

Here you can see it below a Custom Field that has been set as its Own Tab....

Selection_037.png


NOTE: the Rate Only rating system is only available in the sidebar because of it being inline ajax. I've removed the inline ajax rating (as it has become a show stopper for way to many things), so this stuff above also works with rating only system.
 
Last edited:
Is there a way to differentiate between someone who can't review the item because they don't have permission (such as not being logged in) and someone who can't review the item because they've already reviewed it?
 
{$item.has_rated} should be exposed and is a BOOLEAN. You'll need to use them BOTH to test for various cases. Just because {$item.has_rated} is 0 (which means they have not rated the item), doesn't mean they CAN.

{$item.canRateItem} determines whether they CAN or CAN NOT.

{$item.has_rated} simply means they have or have not rated.
 
Yep, exactly what I needed. I'll leave this here for anyone who might find it useful.

Code:
<xen:if is="{$item.canRateItem} == 0 AND {$item.has_rated} == 1">
Can't rate, already rated </xen:if>

<xen:if is="{$item.canRateItem} == 1 AND {$item.has_rated} == 0">
Can rate but has not </xen:if>

<xen:if is="{$item.canRateItem} == 0 AND {$item.has_rated} == 0">
Can't Rate Item </xen:if>
 
One more question on this subject :)

If I wanted to build a template link to take a user to their review, how should I do that?
 
One more question on this subject :)

If I wanted to build a template link to take a user to their review, how should I do that?
Individual reviews are not fetched by User ID, they are fetched by Review ID. There are no fetching methods to get a review for a specific individual.
 
Thanks for clarifying.

If you get bored here are a couple more non-urgent noob questions for the sake of learning :D

How does the recent activity tab list reviews by user? Is it possible to a) display the total number of reviews (not items) a user has outside of showcase (postbit, member card, etc) and/or b) create a tab with a list of a user's reviews (same appearance as recent activity, basically filtered)?
 
How does the recent activity tab list reviews by user?
That tab fetches content via the NewsFeedHandler (data is stored in the table: xf_news_feed). Data in the xf_news_feed table is purged after 7 days.

Is it possible to a) display the total number of reviews (not items) a user has outside of showcase (postbit, member card, etc)
That data is not stored, nor are there any fetching methods in any of the models, so custom development would be required to do something like that.

and/or b) create a tab with a list of a user's reviews (same appearance as recent activity, basically filtered)?
There are NO fetching methods for User Reviews that are USER ID based. It would require extending models and adding in your own custom fetching methods.
 
Back
Top