We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16434
    • 3 Posts
    Quote from: banal at Mar 28, 2008, 11:44 AM

    Quote from: kujdik at Mar 28, 2008, 11:14 AM

    Hello,

    this looks good. But I have question about possibilities of this module..
    I need multiple poll module - i think, more than one question in one set and log votes from webusers.
    Is it possible with this module? Or is it in plan to the future???
    (I have not found an other module)

    Thank you...
    Hi kujdik

    I’m not sure if i really understand what you’re trying to achieve.
    With EasyPoll you can:

    • Create multiple polls...
    • ... and add multiple choices/answers to these polls
    • Translate your polls into multiple languages

    What do you mean by "log votes from webusers"?
    Currently you can log the Users IP and/or store a cookie on his computer to prevent him from voting multiple times. However: You cannot track which user voted for which option. To do this, you’ll have to extend the software in a way, that it’s more of a quiz/test instead of a poll. Currently i have no plans to do so, but it’s certainly doable. The hardest part would probably be to actually create groups of questions and then create a summary of people who: successfully passed the test, failed the test and people who didn’t complete the test (maybe even separated into "started" and "not started").

    If you plan to extend the software in such a way, i’d be interested in what you came up with.

    Thank you for your answer...
    I’m sorry - my English is a bit poor..
    It is exactly what I mean:

    • track which user voted for which option
    • create groups of questions and then create a summary of people who: successfully passed the test, failed the test and people who didn’t complete the test
    I tried find something like this and no results -> so I plan to develop something like this and maybe I inspire from your solution...

      Just have a little faith...
      • 34127
      • 135 Posts
      Wow, this is really cool! It’s about time someone created a new poll script, and AJAX at that! grin

      I actually was working on an AJAX poll system too which does a lot of what your poll does, minus poll close/open dates and multi-lingual options/questions. I was working on it over the summer but had to stop when college started again. I finished it a couple of weeks ago but I’m wondering if I should even bother posting it now (I didn’t know you were working on one too! tongue ) since yours looks really good...
        • 2734
        • 165 Posts
        Hi Rick

        Glad you like the Poll Module.
        You're probably right, releasing another Poll-Module with a smaller feature-set doesn't seem to make too much sense. If you got some good ideas and like to share them, go ahead! I'm sure my Solution could still be enhanced in several ways. [ed. note: opengeek last edited this post 13 years, 7 months ago.]
          • 23506
          • 156 Posts
          /**
           * ------------------------------------------------------------------------------
           * Easy Poll Module for MODx
           * ------------------------------------------------------------------------------
           * Easy Poll Voting, inspired by the Poll Module developed by garryn
           *
           * This Module allows creation of multiple Polls, localized for different languages.
           * Polls can be set active/inactive and timed with a start and end date.
           *
           * ------------------------------------------------------------------------------
           * Read the bundled documentation.html for usage instructions.
           * ------------------------------------------------------------------------------
           *
           * The EasyPoll Module is free software; you can redistribute it and/or modify
           * it under the terms of the GNU General Public License as published by
           * the Free Software Foundation; either version 2 of the License, or
           * (at your option) any later version.
           *
           * EasyPoll is distributed in the hope that it will be useful,
           * but WITHOUT ANY WARRANTY; without even the implied warranty of
           * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
           * GNU General Public License for more details.
           *
           * You should have received a copy of the GNU General Public License
           * along with EasyPoll (located in "/snippets/EasyPoll/"); if not, write to the Free Software
           * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
           * or visit: http://www.gnu.org/licenses/gpl-2.0.html
           *
           * Dependencies:
           * MODx 0.9.5, 0.9.6 (this is the version this module was developped for. might work
           *             with other versions as well. not tested)
           * PHP Version 5 or higher
           * MySQL Version 4.1 or higher (utf-8, InnoDB, Trasactions)
           *
           * @author banal
           * @version 0.3 <2008-02-08>
           */
          if(!isset($modx)) die();
          
          $basePath = $modx->config['base_path'];
          $easyPollPath = $basePath . 'assets/modules/EasyPoll/';
          
          // ------------------------------------------------------------------------------
          // get the user language settings
          // ------------------------------------------------------------------------------
          $manager_language = $modx->config['manager_language'];
          $sql =	'SELECT setting_name, setting_value FROM ' . $modx->getFullTableName('user_settings') .
          		' WHERE setting_name=\'manager_language\' AND user=' . $modx->getLoginUserID();
          $rs = $modx->db->query($sql);
          
          if ($modx->db->getRecordCount($rs) > 0) {
              $row = $modx->db->getRow($rs);
              $manager_language = $row['setting_value'];
          }
          
          // load localization file.
          $_lang = array();
          include_once($easyPollPath . 'lang/english.inc.php');
          
          if($manager_language != 'english') {
          	$langfile = $easyPollPath . 'lang/' . $manager_language . '.inc.php';
          	if(file_exists($langfile)) {
          	     include_once $langfile;
          	}
          }
          
          // ------------------------------------------------------------------------------
          // Create EasyPollController
          // ------------------------------------------------------------------------------
          $classfile = $easyPollPath . 'include/EasyPollController.class.php';
          if(!file_exists($classfile))
          	$modx->messageQuit(sprintf($_lang['EP_noclassfile'], $classfile));
          
          require_once($classfile);
          $controller = new EasyPollController($_lang, $easyPollPath);
          try {
          	$controller->run();
          } catch (Exception $ex){
          	$modx->messageQuit($ex->getMessage());
          }
          return;
          

          Parse error: parse error, unexpected ’{’ in /www/alushta/www/htdocs/manager/processors/execute_module.processor.php(98) : eval()’d code on line 76

          What i do wrong?
            • 2734
            • 165 Posts
            Hi pixelranger

            The error is most likely due to a PHP incompatibility. EasyPoll currently only runs on a PHP 5 environment.
            Please post Questions like these in the EasyPoll Support-Thread.
              • 25663 MODX Staff
              • 12,272 Posts
              Hi banal,

              Nice job on the execution of this add on. Kudos! I wonder if it would be a good idea to fall back to the key for the Poll name and each option to make putting up single-language polls more straightforward. That way you wouldn’t have to copy/paste the "internal title" for each choice.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 2734
                • 165 Posts
                Quote from: rthrash at May 13, 2008, 01:47 PM

                Hi banal,

                Nice job on the execution of this add on. Kudos! I wonder if it would be a good idea to fall back to the key for the Poll name and each option to make putting up single-language polls more straightforward. That way you wouldn’t have to copy/paste the "internal title" for each choice.
                Hi Ryan

                Thanks for the Feedback. You’re right, it’s probably a good idea to improve the "single language-setup", since that might be the case for most of the MODx Sites. Consider it noted for the next release wink
                I got some ideas for the multi-language setup as well. It could be interesting to see which "language-speakers" vote for which option (count votes per language). Or in general, a poll choice could also consist of images instead of just text...

                I’ll note any feedback that might be interesting for a next release, so keep it coming if you got some input or wishes.

                In the meantime: If you want to see EasyPoll in Action (in 4 Languages) have a look here: http://www.ubsarena.ch/ (on the right side of the page, about half way down).
                  • 4429
                  • 429 Posts
                  followed the instructions for installing v3.2 but when I click to run the module I just get blank screen.

                  This is on the default modx installation with example files.
                    • 6561
                    • 139 Posts
                    I suppose the answer is ’no’, but I guess it is not possible to run this when using PHP Version 4.4.2?

                    It’s frustrating that I could run & use it on local Xampp server, but not on my production environment!

                    Are there other poll modules supporting PHP 4?
                      • 18783
                      • 9 Posts
                      Hi. Excuse me for my English smiley
                      I want addon for modx, to create poll. I view EasyPoll, but I can’t use it, because there is PHP 4 on the server sad
                      Are there any other addons ?