• Hello
    different WP-Users should have different weights when they do a poll. Is there a way to do that? (child-theme / direct php change/hardcode / whatever)

    Example
    User A, Weight: 6
    User B, Weight: 1 (std.)
    User C, Weight: 1 (std.)

    User A vote: YES
    User B vote: NO
    Result: YES (75%) No (15%)

    Many thanks for any ideas
    best regards
    Actino 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hey Actino

    This would need to be done directly into the code when a vote is registered.

    If you are familiar with php, we can guide you through.

    Thread Starter actino

    (@actin)

    Hey YOP
    thanks for answer – I am familar with php – 5Y ago.. but i think I would like to try. Maybe you can give me just some hints about the logic of the files how you would do that
    It can be hardcoded (if user == name1, then…) – not perfect.

    i dont expect exacte code, just your mind how and where you would do it
    (may just an idea of code)

    models/polls.php on “public static function update” you can do….

    many many thanks
    best regards
    Actino

    Plugin Author YOP

    (@yourownprogrammer)

    Hey Actino

    I am thinking the easiest way to do this is to multiply the number of votes based on user weight.

    Given your example …

    User A, Weight: 6 – record 6 votes when this user votes
    User B, Weight: 1 (std.) – record 1 vote
    User C, Weight: 1 (std.) – record 1 vote

    What do you think?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘User Weights for a poll’ is closed to new replies.