We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2912
    • 315 Posts
    Thanks coroico.

    It’s a great snippet. I was looking through the database for the votes and I just wish I could stop those crawl bots from hitting them and skewing the results. I don’t want it to be a log-in vote only. Oh well. Thanks again. smiley
      BBloke
      • 1841
      • 141 Posts
      @BBloke

      You can stop the Bots from Crawling the votes by adding a rel="nofollow" in the code.

      You must edit the file "anythingRating.class.inc.php" which by default is located in the folder "anythingRating/classes"

      The line you need to edit is nearly half way down the file and the cunk of code can be seen below:
      /**
      * anythingRating::showStars
      *
      * display the current rating
      *
      */

      function showStars(){

      $grp = $this->config[’atrGrp’];
      $id = $this->config[’atrId’];
      $nbs = $this->config[’nbStars’];

      $rating = $this->getRating();
      $avgRating = $rating[’totalNbIP’] > 0 ? $rating[’totalRating’]/$rating[’totalNbIP’] : 0;

      $stars = $this->percentToStars($avgRating);
      $percent = round($avgRating, 0)."%";

      $onestar_outof = $this->lang[’atr_onestar_outof’];
      $stars_outof = $this->lang[’atr_stars_outof’];
      $tplLi = ’<li><a onclick="[+atr.onclick+]" href="[+atr.href+]" title="[+atr.title+]" class="[+atr.class+]" [glow=red,2,300]rel="nofollow"[/glow] >[+atr.lnk+]</a></li>’."\n";

      Adding the "rel="nofollow" where I have shown. This will stop any earch engine bot from following the link and I have tested this and know it works.

      Afterwards you may get notification in Google webmaster tools that there were restricted URL’s it couldnt access, but this is good and proves it is working.



        • 2912
        • 315 Posts
        Great. Thanks for that. I’ll watch google. It’s been a pain for a while but at least the IP’s have been easy to sift through and the votes have been few. smiley
          BBloke
          • 36416
          • 589 Posts
          Is it me or &atrTpl parameter doesn’t support chunks (by name)?
          Usually CChunkie based templating does that and more...
            • 5811
            • 1,717 Posts
            AnythingRating version 1.0 has been delivered in the repository and has now his own support/comment thread.

            Thanks to use this thread.
              • 15116
              • 12 Posts
              Greetings,

              Does this snippet allows you to rate the comments? each of em.

              I really hope it does.. i have been banging my keyboard lately due to this rating per comment requirement sad

              Any help will be appreciated.
                Juz

                Failure is not falling down, it is not getting up again. - Mary Pickford
                • 7923
                • 4,213 Posts
                I think you should simply call it like this in custom jot comments template:

                [[AnythingRating? &atrGrp=`comments` &atrId=`[+comment.id+]`]]


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 15116
                  • 12 Posts
                  Quote from: doze at Sep 26, 2009, 05:33 PM

                  I think you should simply call it like this in custom jot comments template:

                  [[AnythingRating? &atrGrp=`comments` &atrId=`[+comment.id+]`]]

                  Cool, thank you very much. seriously smiley

                  by the way, do you happens to come across any modx thumbs rating snippet? it will be brilliant if it could work it jot.
                    Juz

                    Failure is not falling down, it is not getting up again. - Mary Pickford
                    • 5644
                    • 78 Posts
                    I can’t to connect maxigallery and anyrating. I have 2 documents 47 (main document, it collected document 49 with gallery). When I define document 49 as a group and call the snippet in document 47 I can rate only one image but not all images. How to fix?
                      • 5811
                      • 1,717 Posts
                      @Collst

                      Did you follow the example of the demo site ? http://www.modx.wangba.fr/index.php?id=166

                      What are you meaning when you say: I define document 49 as a group ? the atrGrp parameter should be a string not a document number. This string should be reused in the maxigallery templates.

                      To get any help, thanks to post:
                      - the anythingRating snippet call which define the atrGrp parameter
                      - the maxigallery snippet called on the same page
                      - the details of the maxigallery templates modified