Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to accept reviews (stars and comments)?
Does anyone recommend a specific approach to offering a reviews feature on a TXP site? I saw wlk_helpful but it seems oriented toward “Helpful? Yes | No” situations.
Thanks!
Offline
Re: How to accept reviews (stars and comments)?
+1 for curiosity on this, I’m looking for the same functionality.
Offline
Re: How to accept reviews (stars and comments)?
I’m working on a review site at the moment, but I’m using ExpressionEngine because it has very good built-in support for membership, plus an optional discussion forum module that integrates tightly with the membership features and other aspects of the CMS.
For the review functionality I’m using the Rating module from Solspace which adds some really useful features.
Are you thinking of reviews that include a 5-star (or similar) rating as part of the review?
Just thinking out loud about this, but one approach might be to investigate the possibility of extending the commenting feature in Textpattern to add a custom field to each comment to hold the rating value, storing a number between 1 and 5. There are plenty of ways then to display a star rating based on this number and also to use an Amazon-style clickable star rating feature (e.g. see Raty).
Not sure how easy it would be, or, indeed, if anyone has ever done it, but that’s where I would start looking.
Offline
Offline
Re: How to accept reviews (stars and comments)?
I would be very willing to contribute to a bounty if this is a viable plugin.
Edit: Having direct or indirect Rich Snippet (schema.org, essentially) support would be amazing.
Last edited by gaekwad (2013-12-05 13:02:18)
Offline
Re: How to accept reviews (stars and comments)?
In Textpattern model markup is fully customizable. E.g.
<txp:ratings results="1" wraptag="ul" break="li">
<strong><txp:rating_option /></strong>: <txp:rating_count /> votes
</txp:ratings>
Or listing options:
<txp:ratings>
<a href="<txp:rating_url />"><txp:rating_option /></a>
</txp:ratings>
Widgets suck donkey ass.
Offline
Re: How to accept reviews (stars and comments)?
gaekwad wrote:
I would be very willing to contribute to a bounty if this is a viable plugin.
Edit: Having direct or indirect Rich Snippet (schema.org, essentially) support would be amazing.
The easiest way to incorporate schemas IMHO is to use custom fields for the individual pieces of content that make up the schema and then wrap those pieces of content in the appropriate schema tags in your template. (As I described in this post relating to the music events schema.)
I’m looking forward to the teased native unlimited custom fields with Textpattern 4.6, it should make creating a flexible content model a lot easier and make Textpattern much more flexible and adaptable going forward.
Needless to say, I’m making heavy use of the review schema in the site I’m working on.
Schemas need to be fully integrated into the content of a site and such the only way to implement them properly is by separating out your content into separate logical chunks that represent that different pieces of the schema that you want to use. Trying to retrofit schemas onto monolithic chunks of content is painful and destined to failure.
OT, but I’ve seen one example of a WordPress plugin that allows people to add certain schemas to a page, however, from various blog posts and reviews of it I’ve seen around the web, a lot of people are using it incorrectly by adding it to existing content rather than wrapping existing content with the correct schema tags. They then wonder what this “extra box of schema tags” is doing polluting the visual look of their site, so the common wisdom to solve this seems to be to put it in a div
marked up with display: none;
. Which results in Google ignoring the content of the box and making the added schema worthless.
Offline
Re: How to accept reviews (stars and comments)?
springworks wrote:
The easiest way to incorporate schemas IMHO is to use custom fields for the individual pieces of content that make up the schema and then wrap those pieces of content in the appropriate schema tags in your template. (As I described in this post relating to the music events schema.)
This is exactly what I do right now. My ideal would be to have the values easily retrievable in some numerical text form so I squirt them into schema/meta things, as opposed to having just a star listing a la Amazon, et al.
Offline
Re: How to accept reviews (stars and comments)?
As long as your ratings are only presentational, that’s very easy to do, appending a jQuery script at the end of the comment_form
:
<script>
$(function() {
$("#txpCommentInputForm").after('<p id="rate">Rate it: <input name="rate" type="radio" value="1" />1...<input name="rate" type="radio" value="5" />5</p>');
$("#txpCommentSubmit").click(function() {
$("#message").val($("#message").val()+'\n\nRating: '+$("#rate input:radio[name='rate']:checked").val())
});
});
</script>
Offline
Re: How to accept reviews (stars and comments)?
Here’s somewhat simple rating script which can be seen in action over here, although it’s a bit modified version in Lakitoimisto.info.
Last edited by kuopassa (2013-12-05 18:29:07)
Offline
Re: How to accept reviews (stars and comments)?
Thanks everybody. Petri, I liked your idea of looking at a third-party script. Since I needed one that allows written reviews too, I searched around and found this: http://www.review-script.com/ (Is it just me or do these pay-for-script websites age faster than normal?) It’s not cheap, but I like that you can purchase a Facebook authentication add-on.
Offline
Re: How to accept reviews (stars and comments)?
etc wrote:
As long as your ratings are only presentational […]
Without wishing to thread-hijack, here’s how a vote mechanism might work in my mind:
- one opportunity to vote, either based on cookie, IP or some other identifier – clearly not 100% infallible, but good enough
- scores are tallied and stored in the database; extracting a percentage approval rating (59% liked this), an absolute score (86 said yes, 31 said no) or something similar would then be possible using
etc_query
(see what I did there?)
Offline