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

    I display many documents in a page and i shall want to know if i can put css star rating for each element in the same page or if i must display the snippet in only one page ?
    Because, when I display many css star rating on my page, i get an error message : "You may only vote once"...

    Thx for your replies and sorry for my english... wink
      TylerD - In MODx we trust
      [Derni
      • 10487 MODX Staff
      • 1,535 Posts
      Hi TylerD, multiple calls on one page isn’t supported in the current version of the snippet. The next version will allow the star rating to be have multiple instances on a page, e.g. as part of a Ditto call.

      (Just don’t ask me when that next version will roll off the press, I’m pretty pushed for time at the moment - hopefully I can get back to updating the snippet soon enough smiley )
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 30897
        • 311 Posts
        Thx...

        Problem :

        My vote page is here :

        http://www.mysite.com/folder1/folder2/vote_page.php

        When I vote with css star rating, the url is :

        http://www.mysite.com/vote_page.php?starvote=2&pid=141

        It doesn’t work cause the good URL is :

        http://www.mysite.com/folder1/folder2/vote_page.php?starvote=2&pid=141

        Solution :

        We can replace :

        $modx->makeUrl($modx->documentObject[’id’], $modx->documentObject[’alias’], ’starvote=1&pid=’ . $docID)

        by

        [~[*id*]~]?starvote=1&pid=" . $docID . "
          TylerD - In MODx we trust
          [Derni
          • 10076
          • 1,024 Posts
          are there any known issues with starrating and Jot? I have one. Once i use Jot the starrating stars double, half colored star with 0 votes in the third star? Did not find much.
            • 24731 ☆ A M B ☆
            • 211 Posts
            Hi all, has anyone been able to fix the cookie problem? I upgraded to 0.9.6 and since whenever I vote I get the cookie problem some people have reported before. I am using the Beta. The only way I managed to make it work was by manually setting the cookie parameter in the snippet to false always, but when I do that, I loose the view only ability sad

            Thanks.

            Jose R. Lopez
              • 34162
              • 1 Posts
              Hi guys i just installed this and put it on this page: http://www.insideyork.co.uk/ashlinghouses.html

              to test it out, but doesn’t look great cos when you vote you get some text saying you’re only allowed to vote once but it doesn’t show you the current vote, this is the call i have on the page:

              [!star_rating? &useSession=1 &onevote=1!]
              [+starRating+]
              [+totalVotes+]

              not sure if i’m using this right or not. also the template variable box has appeared now on my pages but it’s empty, what is this for?
                • 34162
                • 1 Posts
                ok seems to displaying ok now, but it looks a bit of an afterthought, is there a better way i can add it to the comments posting rather than just sticking it in after, here is my code:

                <div id="commentsAnchor">
                [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`4` &badwords=`dotNet` &captcha=`1` &moderated=`1` &notify=`2` &canmoderate=`Site Admins` !]
                </div>
                You can also rate this restaurant, place or attraction by awarding it stars below:
                [!star_rating? &amp;useSession=1 &amp;onevote=1!]
                [+starRating+]
                [+totalVotes+]
                  • 24731 ☆ A M B ☆
                  • 211 Posts
                  I found this really nice rating script and I though it would be awesome if we could have this as a modx snippet sometime:

                  http://widgets.rabidlabs.net/ratings/v1.2/

                  Cheers.

                  Jose
                    • 11041
                    • 82 Posts
                    Love this snippet and it works a treat.

                    But I do have a couple of questions. Currently the only method of allowing single votes needs cookies, but it would appear that some users are wise to this and are deleting cookies and abusing the system.

                    Is there anyway of configuring it so that it logs the IP from which the vote was made, showing the rating to a user but not letting them vote whilst allowing a registered and logged in user to vote but only once and that the vote is then marked against their account thus not allowing further votes period?

                    Regards,

                    Tom.
                      • 10487 MODX Staff
                      • 1,535 Posts
                      Hi all, I am (finally!) working on getting version 2 out of the door. I have snagged the issues regarding the cookies and I’m just tidying up a few other areas before I push the release out. There’s some great feature requests been mentioned in this thread and I think what I will do is tackle each one in the subsequent patch releases.

                      @redstormj: I like rabidlabs’ rating a lot - I will add it on my list as a feature request to build in some of the cool stuff they’ve done with their code.

                      @goldeagle: There’s no functionality at the moment, but that’s one feature I’m working on building into the snippet straight after the next release.
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

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