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

    First of all, thx for this great addition.

    Is there anyway to allow votes from List view build with ditto (star_rating is called from the ditto tpl chunk).
    For now, if you vote for an item in the list, it will be counted several times (equal to &summarize parameter in ditto call)

    Any clue ?

    thx smiley
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
    • Hi heliotrope, it should work okay with Ditto listings as it should unset all the vote values on the first pass of the update routine. I’m not really sure why that isn’t the case.

      Could you post your Ditto tpl chunk that you’re using and I’ll try and run a few tests on the snippet.

      Cheers, Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 11975
        • 2,542 Posts
        Hi garryn,

        thx for replying.

        Here are my elements

        ditto tpl:(starRating call inside)

        <div class="photoVig">
        <h4><a href="[~[+id+]~]">[+title+]</a></h4>
        <a href="[~[+id+]~]">[+tvthumbImg+]</a>
        <p>
        [+date+]
        [[StarRating? &docID=[+id+] &useSession=1 &onevote=1 ]]
        [+starRating+]
        [+totalVotes+]
        </p>
        </div>


        ditto snippet call:

        [!Ditto? &startID=`[*id*]` &summarize=9 &paginate=1 &tpl=`photolist` &debug=0 &datetype=createdon &dateFormat=`%a-%e-%b` &multiLevel=1 &mode=`production` &filter=`parent,[*id*],=|isfolder,0,=` &hiddenTVs=`thumbImg` !]


        Thx for your help

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • Well, I tried the Ditto call above, and apart having to remove the Ditto filter settings (couldn’t get them to work for some reason) the CSS Star Rating worked as it should.

          I will try on a different setup but won’t be able to do it until tomorrow evening now. If anybody else wants to give it a blast as well to see if it works then it would be appreciated.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 11975
            • 2,542 Posts
            I was trying on local environment (OSX/Apache).
            Everything works fine on a remote server.

            :-)


            EDIT:
            The snippet has to be called cached from the ditto chunk to work. But you have to disallow vote from the list view or else it will be added as many times as you &summarize param in ditto call.
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 4295
              • 98 Posts
              Nice snippet. I have it working but two questions that I couldn’t find answers to...

              1) Is there a parameter to allow only logged-in users to vote? I’d like all users to be able to view the stars and count but only registered logged-in users to actually be able to vote.

              Resolved, see below 2) I’m using FURLs with the "index.php?q=" thing and voting with FURLs turned on causes a 404 because of the second "?" in the URL before "starvote" (?starvote=2&pid=). I tried adding "&amp;" before starvote in the MakeURL but the question mark still appears. I also tried using ’’ in place of ’alias’ as you mentioned in an earlier post, but that didn’t work either. Can you tell me what I’m doing wrong?
                • 7923
                • 4,213 Posts
                Quote from: bullrat at Oct 22, 2006, 06:42 PM

                2) I’m using FURLs with the "index.php?q=" thing and voting with FURLs turned on causes a 404 because of the second "?" in the URL before "starvote" (?starvote=2&pid=). I tried adding "&amp;" before starvote in the MakeURL but the question mark still appears. I also tried using ’’ in place of ’alias’ as you mentioned in an earlier post, but that didn’t work either. Can you tell me what I’m doing wrong?
                This is fixed in 0.9.5 betas


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 20498
                  • 21 Posts
                  I have a question, I’m trying to implement the star rating snippet and I am wondering how i should call it if i want more than one rating on a page. I want like 5 ratings for different items all on one page. So far when i have put the basic call [!star_rating!] it has a universal rating (or all the same rating) I know this is probably a simple fix, I’m still learning modx snippet calls and appreciate any help thanks
                  matthew
                  • Hi mschroeder, this is currently not possible. The star rating snippet is centred on document IDs at the moment (rather than items on a page) - it’s one of the things I want to add in the next release of the snippet but I currently don’t have an ETA on that, I’m pretty tied up with a few other things at the moment.

                    It is on my to-do list though, so watch this space! (but not just yet wink )
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 13923
                      • 39 Posts
                      Hello!
                      Anybody know how to null the rating?