We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25737
    • 62 Posts
    I am trying to add an AJAX star rating system to my website but am having some trouble because I cant include the php snippet into the content of the body. Here is my site with the star rating system working (http://supplement-analysis.com/test/index.php ), this is the version without MODx CMS. Here is the current site with the MODx CMS http://www.supplement-analysis.com/index.php

    The star rating system records the users ip in a database so they cant vote on the same product more then once. The only tricky thing with the rating system is that everytime you include it you need to change it for example for the firs product you would call it out like this
    <?php rating_bar('1',5); ?>
    and for the send product it would be
    <?php rating_bar('2',5); ?>


    Thanks for the help!
      Faithfully using MODx since 2007!
      • 25663 MODX Staff
      • 12,272 Posts
      Did you try the start rating snippet in the repository first?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 25737
        • 62 Posts
        I didnt even know about the Repository. Thanks for pointing it out. I found a star rating system that might just do the trick in there. Thanks.
          Faithfully using MODx since 2007!
          • 42842
          • 12 Posts
          Hi guys!

          My Question is related to this here so I post it here:
          I want to display this content: http://heartandtruelove.com/vimeo.php?id=123456

          So i created the php into a snippet:
          <?php
          $imgid = $_GET['id'] . $id;
          $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php"));
          echo $hash[0]['thumbnail_medium'];
          ?>
          

          and i can load the snippet like this:
          [[!vimeo_thumb? &id=`123456`]]

          BUT, here comes the problem, I don't get the same thumbnail link like here:
          http://heartandtruelove.com/vimeo.php?id=123456

          My guess was, that I am doing something wrong in the php code, what could it be?
          thanks for fast response! =)