hi,
is there any setting in voting api where i can select some of content types to be voted not all?
any help is appreciated

Comments

galundin’s picture

Yes, when you set up your voting widget, you have to tell it which types of content it will appear on. Do you know which voting widget you're using?

keti-1931’s picture

widget .... u mean five star and all?

no i am thinking of using api only no widget

galundin’s picture

Voting API doesn't do anything by itself unless you're writing custom PHP code to create votes with function calls. Other than that, you must install an additional module to provide a UI widget. The widget is the front-end that users interact with, while Voting API is the back-end, which only handles storage and calculations and Views integration, etc.

Can you be more specific about what you're trying to do?

keti-1931’s picture

say i have a content type test 1 , test 2 , test 3 and i want to calculate votes for test 1, test 2 and not for test 3 so how do i go.
i dont want to use widget due to some reasons.

torotil’s picture

Voting doesn't care about that. It calculates vote results for all entities that have votes. So to don't calculate votes for type test3 just don't insert votes for nodes of type test3.

keti-1931’s picture

votes??
i didnt understand. can u tell me how to insert votes for entities??

galundin’s picture

Votes are inserted by PHP code that calls functions offered by Voting API. That's what an API is: "Application Programming Interface." It is a specification of data structures, functions, and other technical details related to programming. You cannot use Voting API directly unless you know how to program in PHP. That is why you need a widget module. A voting widget is a PHP program that creates votes.

Perhaps what you want is to allow authors to assign vote values to their own content, but not allow others to vote on it. To do that, add a Fivestar field to the proper content type(s) and choose "rated while editing" in the configuration of those Fivestar fields, instead of "rated while viewing."

If that isn't what you want, please be more specific. We don't necessarily need to know your reasons, just describe how you want it to work.

TR’s picture

Category: Task » Support request
Issue summary: View changes
Status: Active » Fixed

This support request has been answered.

TR’s picture

Status: Fixed » Closed (fixed)