News:

Wondering if this will always be free?  See why free is better.

Main Menu

Vote polls with points

Started by emanuele, May 02, 2011, 04:06:27 PM

Previous topic - Next topic

ocin4

Hello,
nice Mod, thanks for it.

Why are the Maximum assignable points limited to 10? Is there an easy way to increase this limit?

ocin

emanuele

From the admin panel? (admin > configuration > features and options > general)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

ocin4

Quote from: emanuele on May 21, 2013, 05:25:40 PM
From the admin panel? (admin > configuration > features and options > general)

Thanks and sorry, I must have missed that.

ocin

MartiMedia

Hi Emanuele,

This is a fantastic mod, thank you! I hope I'm allowed to request an additional feature, if not: sorry!
Is it possible to also implement a minimum amount of points a voter must spread across the options?
I think that means 2 things:
-Disabling the 'submit vote' button until the voter spread at least this minimum amount of points across the options
-Create an additional input field at poll creation time where this minimum can be set (right under 'maximum')

I hope you will consider adding that, it would be perfect for our forum use...
Thanks! MM

MartiMedia

Never mind, I edited the php and javascript and now it works the way I want. If anyone is interested what I've done plz let me know.
Cheers! MM

Paracelsus

Hi emanuele,

Installed MOD in SMF 2.0 and it works as supposed to, but... how to have an average of points per option in the results instead of just adding them up? It shouldn't be very hard to code it, since you know your code, do you have any suggestion?

DenDen60

I like this MOD.


How complicated would it be to add a total at the end of the process.


If someone answer 0,1,5,8,4 for example, not only will it give the average results has it does now, but it would give a total (18) as well as the average total. (18) (Since there is only one entry.     )


So when a second person vote 4,8,6,7,2 the mode calculates the average total (27) and the average for each option as it does now 2 (2), 4.5 (2), 5.5 (2) 7.5 (2) and 3 (2), but it would give the average total (22.5) (18+27) / 2




Gryzor

Strange this mod hasn't seen more action/feedback!

Just installed it on my 2.0.3 and it works beautifully!

What would be even better would be something akin the Eurovision (eugh!) voting mechanism - an option gets a predefined X points, the second gets Y, the third Z and so on. But I realise this is a completely different logic so I'm just grateful for the mod as is :)

GigaWatt

You should really upgrade to the latest SMF version.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Gryzor

Erm, yes. Had a brainfart there, I'm on 2.0.15 actually :D

efk

This is really awesome mod, but with 1 huge problem. Example, if I want to give 14 points to spread and max 3 points per option, so participant can vote for himself, it is expected from system to split 11 remaining points to other options, but default mod behavior is voter can give 3 points to himself and finish voting, so 11 points are unused and makes system without valid purpose, because voter will vote for himself and that's it, we can only manually track his behavior. So how to force to spread all points before allowing hit on ?

<?php
$servername 
"?????";
$username "?????";
$password "?????";
$dbname "?????";

// Create connection
$conn = new mysqli($servername$username$password$dbname);
// Check connection
if ($conn->connect_error) {
    die(
"Connection failed: " $conn->connect_error);


$sql "SELECT t.`id_poll`, t.`id_member`, t.`id_choice`, t.`points`, m.`member_name` FROM  `smfqu_log_polls` as t LEFT JOIN `smfqu_members` as m ON t.`id_member` = m.`id_member` ";
$result $conn->query($sql);



while(
$row mysqli_fetch_array($result))
{
 echo 
"Poll: " $row["id_poll"]. "   Member: "$row["member_name"]. "   Choice:  " $row["id_choice"]. "   Points: "$row["points"]. "<br>";
}
mysqli_close($con);
?>


- We want to track votes, so how to set Choice order to start from option #1 and not as option #0 ?
- What to change so latest votes to be displayed at top and is it possible to add some function to delete displayed logs overtime, I guess it will take memory, so long list will be a problem, or at least pages could help or be displayed only what is voted and not everything?
We keep custom PHP block on testing forum (script above), so wanna move full working system on primary forum.

Poll: 3 Member: Maria Choice: 0 Points: 0  <<
Poll: 3 Member: Gabriel Choice: 4 Points: 0
Poll: 3 Member: Gabriel Choice: 3 Points: 1
Poll: 3 Member: Gabriel Choice: 2 Points: 0
Poll: 3 Member: Gabriel Choice: 1 Points: 0
Poll: 3 Member: Gabriel Choice: 0 Points: 1  <<
Poll: 2 Member: Gabriel Choice: 5 Points: 1
Poll: 2 Member: Gabriel Choice: 4 Points: 3
Poll: 2 Member: Gabriel Choice: 3 Points: 0
Poll: 2 Member: Gabriel Choice: 2 Points: 1
Poll: 2 Member: Gabriel Choice: 1 Points: 0
Poll: 2 Member: Gabriel Choice: 0 Points: 0  <<



Advertisement: