We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22815
    • 1,097 Posts
    And the WebLogin snippet is positioned after the polls in the page? Can you give me the full WebLogin call?
      No, I don't know what OpenGeek's saying half the time either.
      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
      Forum: Where to post threads about add-ons | Forum Rules
      Like MODx? donate (and/or share your resources)
      Like me? See my Amazon wishlist
      MODx "Most Promising CMS" - so appropriate!
      • 16892
      • 107 Posts
      No, WebLogin is positioned before the Polls snippets.

      Here’s the WebLogin snippet:

      [!WebLogin? &loginhomeid=`30` &logouthomeid=`65` &logouttext=`Sign Out` &tpl=`tpl_login_member`!]
      
      • I’m looking into this - I’m not really sure why there should be a conflict at the moment. Seems that the POST values are crossing somewhere along the line ... strange!
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 4178
          • 2 Posts
          Hello While using polls I am getting following error

          Fatal error: Cannot redeclare userip() (previously declared in e:\AppServ\www\modx9\manager\includes\document.parser.class.inc.php(748) : eval()’d code:176) in

          Why this is happending?

          THanks
          Jinendra
          • Hi brutemoon,

            Looks like you either have two polls being called on the same page or another snippet that uses a function called ’userip’. Anyway, I’ve patched the poll voting snippet and attached to this thread (until I get the main package updated) - it should solve the issue for you.

            Cheers,
            Garry

              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 4178
              • 2 Posts
              Hello Gary,

              Thanks for your great suport.
              Script is working great.

              Thanks
              Jinendra
                • 27305
                • 173 Posts
                Any chance someone can explain how to install this poll snippet, I installed the two snippets that come with the zip but I’ve never installed a module before and got an error when I tried to install it


                « Execution of a query to the database failed - You have an error in your SQL syntax near ’; ’ at line 8 »
                SQL: CREATE TABLE IF NOT EXISTS `modx_polls` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) default NULL, `question` varchar(255) default NULL, `votes` int(11) default ’0’, PRIMARY KEY (`id`) );
                  I made my first site with modx
                  ------------------------
                  Shopping blog
                  Sky+ HD
                  • 20751
                  • 122 Posts
                  Found a bug!

                  If you’re using friendly urls and you have the poll voting/results on a document within a folder (i.e http://www.mysite.com/parent/child.html) and you redirect to the same page or another page within a folder the $modx->makeURL function will redirect to http://www.mysite.com/child.html instead of http://www.mysite.com/parent/child.html.

                  To fix this, just pass an empty string in the second parameter of the makeURL function inside the pollvote snippet. Change this:

                  $url = $modx->makeURL($r_id, $r_alias,'');


                  to this:

                  $url = $modx->makeURL($r_id,'','');


                  :)
                    • 20751
                    • 122 Posts
                    Also . . .

                    [+formaction+] in the form action was causing unexpected results when using onevote. Each time it redirected it redirected to page.html then if user tried to vote again it would send to page.html.html then page.html.html.html and so on.

                    so changed

                    <form name="pollvote" method="post" action="[+formaction+]">


                    to

                    <form name="pollvote" method="post" action="'.$modx->makeURL($modx->documentIdentifier).'">


                    in pollvote snippet
                    • Garry Nutting Reply #20, 17 years ago
                      Thanks myan24 smiley I’ll look at getting both these issues fixed in the download package.
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

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