Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-30 16:29:26

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

how do I allow voting for articles?

hello, I have a BIG problem…

ok, some background first: I’m making a site on which user s will be able to register themselves using mem_self_register.
once registered users, they’ll be able to access pages to upload content (articles, images, hopefully). This articles have to be open to be voted for.
my first idea was to use an article custom field (‘voted times’) and allow the user to click on a button which would simply increase by ‘1’ the value in the custom field. After that, the articles could be displayed by the value in the custom field (most voted, least…)

now: how do I allow multiple users to write in the database table for an article they did not write themselves? (if I grant basic privileges to these users they won’t be able to change anything but their own articles).
also: how do I prevent a user to click over and over again teh same button (well, I might use a cookie, I guess…)

jeez…


what was that again…?

Offline

#2 2007-03-30 16:55:28

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: how do I allow voting for articles?

I know there are some plugins for ratings:

http://textpattern.org/plugins/757/css_rating

http://textpattern.org/plugins/285/tcm_rating

http://textpattern.org/plugins/108/gwd_bx_rating

Don’t know if they can help you.

Bye!

Z-

Offline

#3 2007-03-30 17:08:24

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: how do I allow voting for articles?

I knew css_rating and tcm_rating but they only allow an author to display his own rating.
Say: ‘I saw this movie I give it 5 stars’.
What I need is to let people vote a specific article.
i’ll check this gwd_bx_rating… thanks!


what was that again…?

Offline

#4 2007-03-30 17:30:54

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: how do I allow voting for articles?

well I should run a query like this:

$sql = 'UPDATE textpattern SET custom_1=custom_1+1 WHERE id=20';

having the id set to article_id so that you will be able to vote the current article


what was that again…?

Offline

#5 2007-03-30 18:21:25

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: how do I allow voting for articles?

feragnoli wrote:

I knew css_rating and tcm_rating but they only allow an author to display his own rating.

Uhm.. are you sure? They look like complete voting system. Anyway, I’ll give them a try, I may need a similar feature.

Z-

Offline

#6 2007-03-30 18:51:56

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: how do I allow voting for articles?

uhmm… I think you’re right..!
dunno why I remembered css_rating was actually something else…


what was that again…?

Offline

Board footer

Powered by FluxBB