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

emanuele

Link to Mod

Provide a new way to vote in polls by assigning points to each choice instead of only select it.

The feature must be activated in Features and options ticking Enable voting polls with points, in the same place is also possible to decide the highest value of points assignable to a poll.
Once activated when a new poll is created it becomes possible to define the maximum number of points each user can distribute between the choices in the poll and the maximum number of points the user can assign to each choice. If in any poll Max assignable points is set to 0 then the poll behaviour falls back to SMF's default.

For SMF 1.1.x
To completely remove any trace of the mod (including database entries), please use the uninstall script provided.

Change log

  • 0.1.2: version update (SMF 1.1.14 and SMF 2.0) , added utf8 translations
  • 0.1.1: initial release


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.

Farjo

This will be very useful for our competitions which we vote on each month and sometimes the entries are too good to vote on just one :)

If I can make a suggestion O:) Perhaps the 'Maximum votes per user' option should be removed, as it now appears to be redundant.

Thank you for the mod :D

emanuele

Quote from: Farjo on May 03, 2011, 11:27:16 AM
This will be very useful for our competitions which we vote on each month and sometimes the entries are too good to vote on just one :)
Yep, that was the idea! :D

Quote from: Farjo on May 03, 2011, 11:27:16 AM
If I can make a suggestion O:) Perhaps the 'Maximum votes per user' option should be removed, as it now appears to be redundant.
Not really, because if you want to setup a normal poll allowing max "n" choices then it's still needed. ;)


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.

Farjo

Oh yes I see! If 'Max assignable points' is zero it becomes a 'normal' poll. Very neat, I like it even more :)

emanuele

Exactly...I should document it... :P

BTW I'm way too lazy to completely remove functionality! ;)


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.

Abavagada

I just download this mod zip and tried to install it on SMF 1.1.13.

"The package you tried to upload either is not a valid package or has become corrupted. "

Can this please be checked and/or fixed? I would like to use this mod but don't want to have to install it manually.


emanuele

Try the new one.

Sorry, it's a while it seems I cannot pack properly files in linux...don't know why.
If any of you have any idea I'm completely open to suggestions! ;)


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.

Abavagada

Thanks for the zip fix. Works now.

Very nice mod! I never liked poll systems because they are so limiting, but this one opens up a lot of possible setups and usages. Nicely done!

Farjo

Hello :) Will the be a 2.0 version of this please?

emanuele

Emulation is the way! :P

I'll update it in the next days.


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.

Sapinho®

hi emanuele, this mod allows assign points to user group?

emanuele

Do you mean different amount of points per each group? No...


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.

Sapinho®

oh, than u for reply, good job, =)

Sweetwater

FYI - Install on 2.0 RC5 says its not compatable with this version.

Regards,

emanuele

Thanks.

Yes, I know. I removed the RC4/5 compatibility from the package (even if it is possible to install the mod on these versions using the emulation) because there is emulation and because RCs should not be used now that the final is out. ;)
In fact I should have removed the tick from the mod site too...I'll do it next time I update the mod.


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.

elizadani01

Thanks for sharing the information.



studiowi33

#16
How do I make this work with the "Additional Polls" mod? The variable names are different enough to halt my manual installation in my tracks.

Thanks all.

-s.w

EDIT:
Quote from: emanuele on September 07, 2011, 08:28:19 AM
At the moment I've no idea, I'll check how the mod works and I'll come back to you.

Feel free to ask again if I don't post anything in...let's say a week. :)
Thank you.
SMF 2.0.2

emanuele

At the moment I've no idea, I'll check how the mod works and I'll come back to you.

Feel free to ask again if I don't post anything in...let's say a week. :)


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.

Paracelsus

Quote from: emanuele on September 07, 2011, 08:28:19 AM
At the moment I've no idea, I'll check how the mod works and I'll come back to you.

Feel free to ask again if I don't post anything in...let's say a week. :)

I second that request, I use "Additional Polls" MOD and it kind of difficults the "Vote polls with points" installation process.

emanuele

Completely forgot about it. :-[
At the moment and for the next few weeks I won't be able to do anything...sorry.
Probably during Christmas holidays.


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

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: