• Hi, Kevin!

    I'm using your Polls for Elgg 1.7.14. Good plugin.

    But need to correct it because PHP WARNING:

    "Division by zero" in file /var/www/mod/polls/views/default/polls/results.php (line 46)

    My changes:

    <?php
            //populate array
            foreach($responses as $response)
            {
                //get count per response
                $response_count = getResponseCount($response, $user_responses);
           if ($response_count != 0) {    
                //calculate %
                $response_percentage = round(100 / ($user_responses_count / $response_count))
               
                //html
                ?>
                <div id="progress_indicator" >
                    <label><?php echo $response . " (" . $response_count . ")"; ?></label><br>
                    <div id="progressBarContainer" align="left">   
                        <img src="<?php echo $img_src; ?>" width="<?php echo $response_percentage; ?>%" height="12px">
                    </div>   
                </div>
                <br>
            <?php
            } }
            ?>

    Thanks ;)

  • You're welcome to try this:

    https://github.com/kevinjardine/polls

    (download and put into a directory called mod/polls)

  • elgg 1.8.3:

    Deprecated in 1.8: $vars['options'] must be an associative array in input/radio Called from [#16] Z:\home\elgg183f.com\www\engine\lib\views.php:503

    and don't work poll button

  • Evgeniy, what version of the polls plugin are you running?

  • Evgeniy, I think you'll find that those issues have been fixed now on github.

  • Nudeler2

    Hi,

    got this red errorpage (elgg 1.8.2):

    Could not load the elgg:polls library from .../mod/polls/models/model.php

  • Nudeler2 - as explained above, you need to put the code in a directory called mod/polls

  • Nudeler2

    Oh, sorry, I didn`t understand, now I got it...

     

  • Nudeler2

    Yes, seems to work fine!

  • Nudeler2

    Thank you very much!

  • right now i download polls from github: https://github.com/kevinjardine/polls by button download this repo as a zip file, and:

    widgets saying:

    Deprecated in 1.8: widgets use content as the display view Called from [#9] Z:\home\elgg183f.com\www\engine\lib\views.php:503

    Deprecated in 1.8: widgets use content as the display view Called from [#5] Z:\home\elgg183f.com\www\engine\lib\views.php:503

    What happen? )))))) Dont understand ))
  • I forget, thanks Kevin Jardine for your work and answers! ))

  • Evgeniy, I've fixed that in github. I admit that I am getting really annoyed at seemingly pointless deprecation messages, however. They have the affect of discouraging plugin authors from upgrading their plugins. Not your fault of course.

  • Hi,
    got the following Messages:

    Deprecated in 1.8: The profile/icon view was deprecated.  Use elgg_view_entity_icon() Called from [#8] /var/www/.../elgg/engine/lib/views.php:503

    Deprecated in 1.8: page_draw() was deprecated in favor of elgg_view_page() in 1.8. Called from [#5] /var/www/.../elgg/mod/polls/pages/read.php:67

    Deprecated in 1.8: The profile/icon view was deprecated.  Use elgg_view_entity_icon() Called from [#8] /var/www/.../elgg/engine/lib/views.php:503

    Deprecated in 1.8: Use $vars['full_view'] instead of $vars['full'] Called from [#7] /var/www/.../elgg/mod/polls/views/default/object/poll.php:111
    -> [#6] /var/www/.../elgg/engine/lib/views.php:503

    Deprecated in 1.8: $vars['options'] must be an associative array in input/radio Called from [#10] /var/www/.../elgg/engine/lib/views.php:503

    I've download the Polls 1.8 and changed a lot of other Warnings by myself. But I don't find any troubleshooting about this...

    I'm running elgg 1.8.3

  • Has anyone an idea to solve the Problem?

    In addition, there is another problem too.
    I can't see any Button for may be "ADD"
    The link http://.../elgg/polls/add/Christian works fine, (if I type the url manually in the Browser) but I miss the Buttons.

    Thank you for your help

  • Another Round:

    I solved the following Warnings:
    # profile/icon view
    # page_draw
    # full_view

    But the following two Warnings and the problem with the Buttons, I've no ideas anyway...
    Deprecated in 1.8: $vars['options'] must be an associative array in input/radio Called from [#10] .../elgg/engine/lib/views.php:503
    and
    Deprecated in 1.8: settings/polls/edit was deprecated in favor of plugins/polls/settings Called from [#8] .../elgg/engine/lib/views.php:503
    For the last Warning I think I must rename a File, but I don't know which one???
    Setting the edit.php to setting.php -> I got a white Screen...

  • hi kevin, thank you very much for your work.

    We have made some modifications for the polls 1.7 plugins, because there were a bug wich allow a user to vote more than a time.

    The code we have developed is in https://gitorious.org/mod-reddry/polls

  • aruberutochan - so far as I know that is a deliberate feature that allowed site admins only to vote more than once. The idea was that admins could adjust the vote (not by cheating but if eg. moving a poll from somewhere else). I agree that this feature was confusing and not very useful so I removed it for the version I am working on for Elgg 1.8.

  • Helllo Kevin,

    great plugin! Is there a way to make the poll 100 % anonimous (ie, not displaying who has voted recently)

  • Hans - yes, check the plugin settings. That's an option.

  • Hello Kevin,

    I'm using your great plugin on elgg 1.7.15. It's working fine but I want to set the poll 100% anonymous like Hans Huber want.

    Sorry but  I dont find the plugin settings you're are talking about.

    I just have :

    - Group polls :

    answers : Yes, on by default / No, off by default / No

    - If group polls are activated, where should polls content be displayed in group profiles?

    answers : Left / Right / None

    - If group polls are activated, who gets to create polls?

    answers : group owners and admins only / any group member

    So my question is which one to set poll 100% anonymous ?

    Thanks

     

  • Sorry, I forget to mention that I'm running version 0.8

  • rvk, the options are:

    Show poll creation in activity river

    Show poll voting in activity river

    You can set either or both to no.

    :)

     

Kevin Jardine

Elgg plugin developer

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 4038
  • Recommendations: 15

Other Projects

View Kevin Jardine's plugins