We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24995
    • 1 Posts
    Hi there,

    I’d like to know if its possible to customise this module so that only members are allowed to vote? How would one go about setting this up?

    thanks

    R
      • 29181
      • 480 Posts
      Read my post at the top of this page. I had to do something similar for a client not that long ago, and have documented the changes I made there.

      Hope that helps,
      Taff
        Adrian Lawley: www.adrianlawley.com
        • 9517
        • 1 Posts
        does anybody can help me please in the following issue - i want to use pictures or links to pictures instead of text of the poll answer? is it possible? what should i do for that?
        thanks in advance.
          • 26568
          • 30 Posts
          Found JS error under IE in pollmanager_module.txt

          <script language="JavaScript" type="text/javascript">
          function postForm(opcode){
          document.module.opcode.value=opcode;
          document.module.submit();
          // the closing curly brace is missed
          }
          </script>
          
          • Last Of The Romans Reply #45, 15 years ago
            hello guys,

            where i can see IPs who voted?
            In my BD i cant`s see this info...
              palma non sine pulvere
              • 22120
              • 21 Posts
              Contemplating adding this to my site but number of posts/problems have me freaking a bit... that plus lack of a live example to follow to understand the CSS nesting/order to set up the poll in HTML.

              Any examples or anyone advise staying away from this particular module? Would like to use it and can see the time and effort Garry has put into support and updates (which has been great), altho I’m noting not a lot of posting here all around lately... hmm... undecided

              TYVM - any advice/help appreciated!
                • 14225
                • 12 Posts
                Hi all

                I have added the 2 snippets and module which all look fine, however the when I vote, it doesn’t log it (ie the module still shows zero votes).

                I am using the basic call from the documentation: [!pollvote? &pollid=`1` &redirect=`1` &onevote=true &ovmessage=`You can only vote once` &resultsbutton=true!] and have setup a poll with id = 1.

                If anyone has any ideas I would appreciate it!

                Thanks.


                  • 29131
                  • 11 Posts
                  Quote from: jj0101 at Jan 05, 2010, 03:36 PM

                  Hi all

                  I have added the 2 snippets and module which all look fine, however the when I vote, it doesn’t log it (ie the module still shows zero votes).

                  I am using the basic call from the documentation: [!pollvote? &pollid=`1` &redirect=`1` &onevote=true &ovmessage=`You can only vote once` &resultsbutton=true!] and have setup a poll with id = 1.

                  If anyone has any ideas I would appreciate it!

                  Thanks.

                  jj0101 are You still interested in solving Your problem ?

                  I had the some problem. You have to use &useip=true and &onevote=true together. Then ip numbers will be added to the table in mysql base.


                    • 14930
                    • 70 Posts
                    Quote from: PaulGregory at Aug 21, 2006, 05:54 PM

                    • No need to pass through ID, it picks up the most recent one
                    I was wondering if there was a way to do this?
                      • 28580
                      • 24 Posts
                      Good little module but it does not sanitize its input. I would recommend adding mysql_escape_string to the following lines

                      $results = $modx->db->select('*', $iptable, 'ipaddress=\'' . $useraddy . '\' AND pollid=' . mysql_escape_string($_POST['poll_pollid']), '');
                      ...
                      $sql = "UPDATE " . $polltable . " SET votes=votes+1 WHERE id=" . mysql_escape_string($_POST['poll_pollid']) . ";";
                      $modx->db->query($sql);
                      $sql = "UPDATE " . $choicetable . " SET votes=votes+1 WHERE id=" . mysql_escape_string($_POST['poll_choice_id']) . ";";
                      $modx->db->query($sql);


                      better yet is to add an is_numeric check for both these variables before reaching the DB insertion point