voteScript -- Returns information about a file when a user clicks on the "vote" button..




This option allows you to set up a script that gets "pinged" when a user clicks on the "vote" button. The vote functionality is a "round trip" kind of deal. Here's how it works:

1. The user clicks on the vote button.

2. Wimpy sends all the information it has about the current track to the defined voteScript file.

3. After your Vote Script has processed the information, it must return either:


4. If your Vote Script returns "ok" wimpy will briefly display "Vote Received" in a little yellow pop up help tag indicating that the vote was successful. If the returned value is not "ok" wimpy will briefly display "Could not process your request at the moment."

By default, Wimpy "remembers" if the user has clicked the vote button for a particular track, and will display "You've already voted for this track" if, well, the user has already voted for a track.

By default, the vote button is not visible. To make the Vote button visible you need to do two things:

1. Establish the vote button in your skin.
Using Skin machine, open a skin_name.xml file. Click on the trash can icon and remove the vote button from the trash, then position the button where you see fit.

2. Define a Vote Script
Use the Customizer tool and set "Vote Script" (voteScript) to the URL to your script that can process the vote information.

If a Vote Script (i.e. this option) is not set in the HTML or with a wimpyConfigs file, the vote button will not show. Only when Wimpy recognizes that the voteScript option is set will Wimpy allow the vote button to become visible.

HINT: If you are using an XML playlist, you have the option of including extra tags to each <item>. Any extra tags that are included will also be returned..

To use this option, enter the URL to a script that can receive and process token pairs that Wimpy issues. We have developed a simple example so that you can get a feel for how the information is transmitted from Wimpy to the script that you define with this option.

You can download the "Vote" example by clicking here.

WARNING: The example provided above is NOT secure. It is provided so that you can get a feel for how the information is returned to your script. We have not developed a "standardized" application to handle "votes" or "track plays" because each webmaster has a different set of requirements. It is up to you to create a script to conform to the way you would like to track the information.

If this option is set, Wimpy will return all the information that it has received about each file. Wimpy will return the information about each file that is played using a standard "GET":

action : vote
flashlistID : 46
entity : m
filename : http://www/path/to/Sanctify.mp3
artist : Delirious
album : King Of Fools
title : Sanctify
track : 1
comments : http://www/graphic/or/ecom/hyperlink.html
genre : Other
seconds : 252.891428571
filesize : 7.48
bitrate : 236
visual : http://www/path/to/graphic.jpg

If the getMyid3info option is not used, some of the information listed above will not be returned.

Wimpy will also return three additional tokens: action, flashlistID and entity.

Since track Plays and Vote return the same information, the action token allows you to distinguish the kind of request that is made. For Track Plays, action is set to "trackPlays," for the Voting, action is set to "vote." This is helpful if you have developed a single script that can receive the information from either Track Plays or Vote.

This is a reference to the item number in the playlist. For example, if the file is the first item in the playlist, flashlistID would return '1" -- if the file is the third item in the playlist flashlistID would be "3"

This defines what kind of file it is. MP3 files return "m" XML files return "x" SWF files return "s" FLV files return "v"

To display the vote button:

1. Edit a skin, and remove the "votes" button from the trash. (The vote button has a star on it)

2. Use the customizer tool an check the option for voting. and enter the URL to the script you are using to track the votes.

To receive and store the returned data on the server:

You can download an example of how to receive the vote data by downloading the "Track Plays / Vote Example" from the "Tools" section.








  ©Copyright Plaino LLC. All rights reserved.