Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] tcm_rating: TXP Rating System
Notice: This thread is archived, there is a new verision of this plugin here.
**********************************************************
First release of my rating system for Textpatten. I’m kinda obsessed with upgrade-abiliy, so although this does add a bit of extra stuff beyond what a mod does, it doesn’t require any hacking. It consists of four things:
- tcm_ratingoutput – Plugin to display ratings for a single article, using either a text output of the average, or stars
- tcm_ratinginput – Plugin to create a form to input ratings for an article.
- ratings.php – File to input values into the ratings table
- ratings_sql.php – Install file (run it once), creates new tables for the mod.
Other fun stuff
- Some simple tools to avoid abuse – you can set a delay, in minutes, for one IP to post to one article.
- Ability to use any rating range, from 1-a million.
- Ability to use images for ratings (stars included in the zip)
Live demo (this is just a beta site, right now it isn’t doing much other than demoing this plugin. select an article and rate it)
Last edited by tmacwrig (2004-07-07 15:34:20)
Offline
#2 2004-07-07 05:43:26
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_rating: TXP Rating System
This is a nice idea that will be useful for blog and non blog sites. A question and a suggestion if you don’t mind:
1. Can the rating be made to show along with the article, that is before comments is clicked and the enter a comment page is displayed?
2. After entering a rating for the first time it says “You have already rated this article.”, Shouldn’t it say thank you the first time around. And then “You have already rated this article.”, if I try to rate the article a second time.
Offline
Re: [archived] tcm_rating: TXP Rating System
- I think so, if it is added in the article form. I’ll check that out today.
- It says “You have already rated this article” so that you don’t have the opportunity to rate it again. But it is a good idea to make it say “Thank You”. I guess I’ll have it check the referrer.
Offline
Re: [archived] tcm_rating: TXP Rating System
- $thisarticle is used instead of $context, so that it can be used in article forms, with multiple articles on a page.
- ratinginput no longer adds a </form> to it’s output when a form isn’t displayed.
I’m still working on a “Thank You” message, because the method I used to have ratings.php go back to the page doesn’t leave a HTTP_REFERER to get.
Last edited by tmacwrig (2004-07-08 00:50:23)
Offline
#5 2004-07-07 17:23:00
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_rating: TXP Rating System
Good of you to make the changes, I think they make it more useful and usable.
Offline
#6 2004-07-07 17:35:44
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_rating: TXP Rating System
One thing I just noticied is that you get whisked back to the top of the page after rating/re-rating and article. Is there any way to reload the page at the same point? Having to scroll back down to see a star and/or message is not good usability.
Offline
Re: [archived] tcm_rating: TXP Rating System
That might be a little tough. The header() function can’t send the user to an anchor.
Offline
Re: [archived] tcm_rating: TXP Rating System
Just updated files / Full download
Changes:
- Now displays “Thank You” message for 10 seconds after posting.
Last edited by tmacwrig (2004-07-08 17:56:46)
Offline
#9 2004-07-10 21:37:16
- Rufnex
- Archived Plugin Author
- From: Germany, Munich (Bavaria)
- Registered: 2004-06-23
- Posts: 51
Re: [archived] tcm_rating: TXP Rating System
Does your system also work for the links section? a link rating system would also be very nice .. like LinksSQL in small ;o)
Offline
#10 2004-07-11 12:59:48
- Rufnex
- Archived Plugin Author
- From: Germany, Munich (Bavaria)
- Registered: 2004-06-23
- Posts: 51
Re: [archived] tcm_rating: TXP Rating System
@tmacwrig:
i’ve installed this plug-in .. after i rate a article, i got no start but this message:
This article has not been rated.
the rating is inserted into the table. whats wrong with my installation? thx for help
Rufnex
Offline
Re: [archived] tcm_rating: TXP Rating System
sorry, I’ve been away for a week at the beach :).
I’ll try to figure out these issues later today.
Offline
Re: [archived] tcm_rating: TXP Rating System
Rufnex – just before I dip into what might be going wrong, what’s the name of the ratings table, and where have you put the input and output forms?
Offline