We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Garry, great work with version 1!

    Unfortunatley the included voting snippet has a major problem.

    action="[*id*]"


    needs to be

    action="[~[*id*]~]" 


    otherwise it just returns the id of the current page and not the current pages URL.
      • 25663 MODX Staff
      • 12,272 Posts
      Ummm... I am the one to blame for that! Sorry Garry... :/
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 10487 MODX Staff
        • 1,535 Posts
        Thanks for pointing that out!

        I’ve uploaded a new version that contains the bug fix in the first post of this thread.

        Cheers, Garry
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 10487 MODX Staff
          • 1,535 Posts
          Hi all,

          I’ve uploaded Version 2 of the Poll Modules/Snippets in the first post of this thread: http://modxcms.com/forums/index.php/topic,2549.msg17378.html#msg17378

          Updates include:

          * New look and feel for the Manager, now fits in with the MODx theme.
          * Addition of a ’One Vote’ option that will stop visitors from voting more than once. This is done by IP logging in to a database table - I’ve added an option in the module to clear the IP log for a poll just in case things get a bit congested.
          * Ability to add a ’Results’ button on the voting form (as long as a &redirect has been specified)
          * An auto-install feature has been added for the database tables. Please remember to run the module as soon as you’ve installed/updated it.

          Please let me know any feedback or comments you have. smiley

          Hope you like it, Garry
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 25663 MODX Staff
            • 12,272 Posts
            Hey Garry,

            Great work. smiley How will large blocks of votes from a single IP be handled, give that many broadband users come from a "single" IP. For example, our traffic here from Sweden exceeds several GB a month from only 4 IPs. And that’s definitely more than one user. (It’s 4 DSL proxies, I think)
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 32241
              • 1,495 Posts
              One other solution will be to use cookie. But it won’t be able to force some people who has cookie disabled. So combining both ip logging and cookie logging will do it works the best I believe.

              Just my two cents
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 10487 MODX Staff
                • 1,535 Posts
                Thanks Ryan and Wendy. smiley

                How will large blocks of votes from a single IP be handled

                The IP logging does attempt to resolve IP addresses behind a proxy, but I’ve found a better, more robust method so I will be including that in the release.

                What I’m finding is that nobody really has a 100% foolproof method of getting accurate IP addresses so I think there’s always going to be a possibility that visitors may get blocked unintentionally. One of my ideas is to introduce a timestamp on the IP log, that way, a time limit could be set for the IP logging and possibly reduce the amount of visitors who are unintentionally blocked.

                So combining both ip logging and cookie logging

                Great idea Wendy, I’ve done a bit of research and have an idea of how to implement this. I hadn’t thought of combining both IP logging and cookies, so thanks again laugh

                I’m not expecting this to be the Fort Knox of web polls, just trying to find a way to limit the damage that could be caused by malicious voters. wink

                Cheers, Garry
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Cookie should be the first and easiest line of defense, then fall back to the IP logging ninja techniques you’ll implement. wink
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 32241
                    • 1,495 Posts
                    Quote from: rthrash at Feb 10, 2006, 01:46 PM

                    Cookie should be the first and easiest line of defense, then fall back to the IP logging ninja techniques you’ll implement. wink

                    That sounds great to me Ryan. Garryn, great job in implementing it.
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 10487 MODX Staff
                      • 1,535 Posts
                      Hi all,

                      Please find attached a new version of the Voting snippet (the main package will also be updated with this).

                      I’ve now implemented Cookie logging for the ’OneVote’ option. The IP logging is still there, and if you wish, you can use one or the other or both. The choice is yours! smiley

                      Important note for anyone already using the IP logging: By default, &onevote will now enable Cookie logging, if you wish to continue using IP logging, then add ’&useip=true’ to your snippet call.

                      The &ovmessage will work for both Cookie and IP logging - the ovmessage can now also be styled by a ’poll_reject’ class in your CSS.

                      The cookies have a default expiry time of one week, but this can be adjusted by using &ovtime (with all times being measured in seconds) For example, to make a cookie expire in a year then use ’&ovtime=31536000’.

                      Please bear in mind that IP logging is a bit hit and miss (as discussed earlier in this thread) and so I would recommend that everybody uses the Cookie option first and only resort to the IP logging if absolutely necessary.

                      Cheers, Garry

                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com

                      This discussion is closed to further replies. Keep calm and carry on.