Suggest entries + karma modifcations

Creating and modifying plugins.
Post Reply
Sandrachen
Regular
Posts: 6
Joined: Fri Nov 14, 2008 9:51 am

Suggest entries + karma modifcations

Post by Sandrachen »

Hi all,

i am running a businessblog wie s9y and so far i am very happy with the opportunities that software offers for customization. But at the moment i have a problem.

We use the suggest_entries-Plugin, so our customers can leave feedback about their experience with our business. Now we would like to add a picture to the submit form with the stars that are used in the karma plugin, so that a customer can rate our service with their words and with a visual rating.

so what i tried to do was understanding the karma plugin. but i failed.

my question would be: how can i define a picture as a form-element and how do i know on what star in the image they clicked?

i have knowledge in html an php, so i dont want to know how to add some code or such stuff, i just dont get it how you use a picture as an element for an form.

sorry if my english sucks, missing some practice :-)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Suggest entries + karma modifcations

Post by garvinhicking »

Hi!

That would need complete custom coding, based on javascript and putting the input into the large textarea field.

You cannot use the karma plugin for this, it has completely different coding than you would need.

So you need javascript to put on the anchor onclick event and then write the actual image part that you put into the parameters of the onclick function within the textarea field.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Sandrachen
Regular
Posts: 6
Joined: Fri Nov 14, 2008 9:51 am

Re: Suggest entries + karma modifcations

Post by Sandrachen »

Ok, i was hoping that i could just copy and paste some code from the karma plugin. Seems like i have to put some work in my javascript skills.

thanks for the answer.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Suggest entries + karma modifcations

Post by judebert »

We actually didn't use any Javascript in the Karma plugin.

I wrote an article explaining the new graphical rating bar capability and an article on using CSS for rating bars.

The Karma plugin is difficult to understand. You should have seen it before we got to it! :lol: Don and I thought throwing Javascript into the mix would make understanding even harder.

The voting is performed by clicking on a link. The Karma plugin checks for appropriate cookies to rule out machine voting and multiple voting, tries to eliminate robots, and records the vote in a database. The Karma table is organized by article; for arbitrary voting, you'd need to add new identifiers or a new table.

The voting itself isn't too difficult. The rating bar code is a little more complex, since it needs to handle cases with graphics and text. The interactions with other plugins -- like click counting and so on -- haven't been standardized or cleaned up, so they could definitely be confusing.

It's possible "POST" style forms could use image buttons instead of the links we use in the Karma plugin, but I'm not sure how easy that would be. If you really want to do that, perhaps Javascript would be the best bet; at least using an "onclick" function to submit the form from a Karma link.
Judebert
---
Website | Wishlist | PayPal
Sandrachen
Regular
Posts: 6
Joined: Fri Nov 14, 2008 9:51 am

Re: Suggest entries + karma modifcations

Post by Sandrachen »

Hi judebert,

thanks for your input, i think that will lead me to a solution. Your articles are really great, already forwarded the CSS-one to my webdesigner :-).

The database and counting stuff isn't that intresting for me.


In short words, all i want is to expand the suggest-entry plugin with the rating bar, so that the customer can type in the text, click on one of the stars and then click the submit button. So i don't need code to submit from a karma link. I just need to figure out how i can "store" the value of the click for my POST-array.

I guess i will find a solution for this in the karma-script.
Last edited by Sandrachen on Mon Apr 20, 2009 3:42 pm, edited 1 time in total.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Suggest entries + karma modifcations

Post by Don Chambers »

Have you considered the contact form plugin? It cannot do the karma plugin either, but each form can be customized with any fields you wish... it does not write anything to a database, rather it sends an email to a specified email address with the results. It would be quite simple to add radio buttons, or a select/drop down field with ratings.
=Don=
Post Reply