AJAX rating system - Wordpress

Closed Posted Mar 21, 2008 Paid on delivery
Closed Paid on delivery

Only "pretty coders" need apply! I would like to incorporate a rating system to an existing "Wordpress as CMS" site. It would use JavaScript to add a specified rating value when certain links are clicked, AJAX to allow ratings to be added without refreshing the page.

I am most concerned that the page remain accessible, valid code only. No messy solutions wanted. Wordpress experience required.

## Deliverables

I have a proposed solution to the "problem" already:

A new table is created in the WP database, called "ratings".

Fields:

- ID

- PostID

- User IP

- value (this can get overwritten)

On each post, there is a small "ratings" box.

On pageload, the controls in this box remain inactive and a "loading" gif displays until an AJAX request is made to see if the user's ip already voted (MySQL SELECT PostID, value FROM ratings WHERE UserIP = [ip of visitor]. If yes; appropriate css styles/active status/link hover text is made. If no, buttons are made active and appropriate css classes/link hover text are applied.

Certain links have functions appended to them to allow ratings to be added on click.?

Certain pages have a PHP function which assigns a rating on pageload.

Ratings cannot always overwrite each other, values overwrite all listed underneath them: (Numerical values assigned based on what makes the most sense)

1) I used this (ballpark value 15?)

2) I like it (5?)

3) I hate it (0?)

4) I looked at it (1?)

Would like also an option of ? 5-star-based rating system (the "I used this" bonus value is only assigned based on a link click; should show up as a 5-star vote) - will need to ask users which they prefer.

Placeholder icons will be required, but I will create final versions myself.

It is unlikely, but code must obviously not conflict with existing plugins.

Standard WP syntax should be followed for security purposes ($WP_query etc.).

--

These ratings need to be accessed as follows:

- A standard JOIN syntax for ordering by rating

- A dropdown which allows visitors to choose sort order (date ASC or DESC, alphabetical, or rating) which can be added to result pages (like in? [login to view URL]) - this will be a POST value

- numerical value (as X/10 or similar + # of voters) as WP tag

Not sure what best practices are for indexing, making a new table for averaged scores, etc. Whatever is "cleanest" and fastest!

Use of GNU released code is fine; I will take care of distributing final code to comply with license.

Engineering JavaScript MySQL PHP Project Management Software Architecture Software Testing Web Hosting Website Management Website Testing

Project ID: #3813735

About the project

1 proposal Remote project Active Apr 12, 2008

1 freelancer is bidding on average $315 for this job

fahdi

See private message.

$314.5 USD in 14 days
(97 Reviews)
5.7