We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27302
    • 154 Posts
    I keep getting an "Undefined’ message when I try to vote. Also nothing happens unless I click on the 5th star. If I try to rate 3 stars for example nothing happens.

    I am trying to get it to work with Jot.

    My first call is [[AnythingRating? &define=`1` &atrGrp=`[*id*]` &nbStars=`5`]]

    Then in my Jot user comment form tpl I have [[AnythingRating? &atrGrp=`[*id*]` &atrId=`[+comment.id+]`]]

    Then on my Jot comment display tpl I have [[AnythingRating? &atrGrp=`[*id*]` &atrId=`[+comment.id+]` &noVotes=`1` ]]

    Would this be correct to get each individual user to be able to rate a page using Jot?
      • 5811
      • 1,717 Posts
      I am trying to get it to work with Jot.
      Simon which item would like rate ?

      1/ For an integration with maxigallery and Jot like a photo contest, look at : http://www.modx.wangba.fr/howto-maxigallery.html

      2/ For an integration with ditto and Jot like a book review, look at : http://www.modx.wangba.fr/howto-ditto.html

      You could also get information on the wiki documentation

      My first call is [[AnythingRating? &define=`1` &atrGrp=`[*id*]` &nbStars=`5`]]
      Here you define as many contest (group of rating) as many [*id*] !!! and nbStars = 5 by default

      Then on my Jot comment display tpl I have [[AnythingRating? &atrGrp=`[*id*]` &atrId=`[+comment.id+]` &noVotes=`1` ]]

      Would this be correct to get each individual user to be able to rate a page using Jot?
      To rate a single page you need to define a global group of rating. e.g: &atGrp=`products` and then for each page to rate use &atrId=[*id*]
      Look to the how-to with Ditto explanations, which is probably the near example for you.

      And keep in mind that it still remains some display issue with IE6.
        • 27302
        • 154 Posts
        Simon which item would like rate ?

        Basically what I am looking to do is to create a similar system to user/purchaser reviews on Amazon.com. I would like to use Jot for each user to leave a review, and also a star rating. I would then like the individual star rating that the user gave to appear next to their Jot comment. I wouldn’t need Ditto because I would like the star rating to be displayed on each of the individual Jot comments.

        So I’m not sure if the book review example does what I need it to do.
          • 19164
          • 1,215 Posts
          Quote from: SimonMW at May 09, 2008, 01:19 PM

          I keep getting an "Undefined’ message when I try to vote.

          I have the same error and found that i have no "index-ajax.php" in site root. I copy that file and all working good.
            DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

            Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

            [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I’ve got a page with a list of URLs. How could I give each URL an ID so users can rate the site the URL points to? I can use weblinks and Ditto, but that’s pretty heavy for what may become several different pages with lists of URLs to rate.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Here’s a Hebrew utf-8 language file!
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well poo! I was definitely being dense... anythingRating works a lot better in the snippet calls than AnythingRating! That’s what I get for copy/pasting snippet calls without paying attention!

                I’m just being dense I know, but which snippet calls go where?

                I have presumed that the first snippet call, setting the configuration, would go at the beginning of the content of the page that will show the items to be rated. Then the individual items would have the second snippet call (in a Ditto template, perhaps?).

                I tried it this way, and get an error that the database table does not exist. I am presuming this is my fault, since MODx installed just fine it must be able to create tables on the database.

                Ok, got that sorted (somehow the first snippet call hadn’t been saved correctly; the Internet connection is fading in and out badly this evening)

                But now in each item I just get the second snippet call displayed, although it’s been processed once, the [! tags have been converted to [[ tags and the ID is set correctly.

                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Ok, I’m back...
                  Warning: Cookie names can not contain any of the folllowing ’=,; \t\r\n\013\014’ (groupOne_ ) in /home/domain/domains/domain.com/public_html/assets/snippets/anythingRating/classes/anythingRating.class.inc.php on line 450
                  Is there something wrong with groupOne as the group name? Or does the itemId have to just be a number? I have it set to item[+id+], which shows up as item56 or whatever the document’s ID is.

                  Yep, looks like the itemId needs to just be the id, no added text. Working like a champ now... trial and error works wonders!
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 5811
                    • 1,717 Posts
                    Hi Sottwell

                    Thanks for the Hebrew utf-8 language file.

                    does the itemId have to just be a number?
                    Usually you get the Itemid from an another snippet as a number. For instance as &atrId=`[+maxigallery.picture.id+]` for a picture with Maxigallery or &atrId=`[+id+]` with ditto. So yes, a number is better.

                    With which other snippet do you use AnythingRating ?

                    Keep in mind that it remains an issue with IE6 and maxigallery, this is the only reason why I haven’t published in the repository this snippet.
                    As I am a newbie in css, and not enought time to investigate more, I you find the solution, I will be pleased to implement it.

                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      I’m using it with Ditto.

                      I got the warning about the cookie name when I used item[+id+], and not when I just use [+id+] so I’m presuming it doesn’t like having text added to the [+id+] value for itemId. On the other hand, I did set it to allow multiple votes, so I guess the cookie isn’t being set anyway. But it works, and this is being paid for by the hour, so I’m not going to mess around with it any more.

                      I’m thinking if it’s AJAX, it should be able to work with a simple list of items on a page (not generated by a snippet or anything) and have the javascript pick out which item is being rated from something in the DOM; perhaps it can make an array of all the <div class="item"> tags, and assign the array key ID as the ID of the item being rated. I am not all that fond of javascript programming, though, so I probably will stick with using a container full of weblinks and Ditto.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org