Skip to content

Instantly share code, notes, and snippets.

@charleshimmer
Last active August 14, 2020 12:48
Show Gist options
  • Select an option

  • Save charleshimmer/5134440 to your computer and use it in GitHub Desktop.

Select an option

Save charleshimmer/5134440 to your computer and use it in GitHub Desktop.

Revisions

  1. charleshimmer revised this gist Jun 24, 2013. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,19 @@
    });
    </script> -->

    <!-- If product IDs have spaces, periods, or special characters, you will need to specify the containerId like the GLK 80 product below. -->
    <!-- $BV.ui('rr', 'inline_ratings', {
    productIds : {
    'GLK 80' : {
    url : 'http://wherever-whatever.com/products/glk80',
    containerId : 'BVRRInlineRating-GLK-80'
    },
    'SK25' : {
    url : 'http://wherever-whatever.com/products/sk25'
    }
    },
    containerPrefix : 'BVRRInlineRating'
    }); -->
    </head>
    <body>
    <h1>Inline Rating integration code demo</h1>
  2. charleshimmer revised this gist Jun 12, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>

    <!-- Inline Ratings with links -->
    <!-- Product IDs must be alphanumeric at the moment and not contain spaces -->
    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : {
  3. charleshimmer revised this gist May 20, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@
    <!-- Meat and Potatoes of BV Integration Code-->
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>

    <!-- Inline Ratings with links -->
    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : {
    @@ -22,7 +23,7 @@
    });
    </script>

    <!-- If you dont need the stars to be links-->
    <!-- Just stars and text, no links-->
    <!-- <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product1', 'product2', 'product3', 'product4'],
  4. charleshimmer revised this gist May 9, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -34,16 +34,16 @@
    <body>
    <h1>Inline Rating integration code demo</h1>

    <!-- Contents of this div will be the star rating for product-id-1. Make sure to lowercase the productid for the div id -->
    <!-- Contents of this div will be the star rating for product-id-1. -->
    <div id="BVRRInlineRating-productid1"></div>

    <!-- Contents of this div will be the star rating for product-id-2. Make sure to lowercase the productid for the div id -->
    <!-- Contents of this div will be the star rating for product-id-2. -->
    <div id="BVRRInlineRating-productid2"></div>

    <!-- Contents of this div will be the star rating for product-id-3. Make sure to lowercase the productid for the div id -->
    <!-- Contents of this div will be the star rating for product-id-3. -->
    <div id="BVRRInlineRating-productid3"></div>

    <!-- Contents of this div will be the star rating for product-id-4. Make sure to lowercase the productid for the div id -->
    <!-- Contents of this div will be the star rating for product-id-4. -->
    <div id="BVRRInlineRating-productid4"></div>
    </body>
    </html>
  5. charleshimmer revised this gist May 9, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@
    productIds : {
    productId1: {url: 'http://example.com/products/product1' },
    productId2: {url: 'http://example.com/products/product2' },
    productId3: {url: 'http://example.com/products/product3' }
    productId3: {url: 'http://example.com/products/product3' },
    productId4: {url: 'http://example.com/products/product4' }
    },
    containerPrefix : 'BVRRInlineRating'
  6. charleshimmer revised this gist May 9, 2013. 1 changed file with 23 additions and 9 deletions.
    32 changes: 23 additions & 9 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -9,27 +9,41 @@

    <!-- Meat and Potatoes of BV Integration Code-->
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>

    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product1', 'product2', 'product3', 'product4'],
    productIds : {
    productId1: {url: 'http://example.com/products/product1' },
    productId2: {url: 'http://example.com/products/product2' },
    productId3: {url: 'http://example.com/products/product3' }
    productId4: {url: 'http://example.com/products/product4' }
    },
    containerPrefix : 'BVRRInlineRating'
    });
    </script>

    <!-- If you dont need the stars to be links-->
    <!-- <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product1', 'product2', 'product3', 'product4'],
    containerPrefix : 'BVRRInlineRating'
    });
    </script> -->

    </head>
    <body>
    <h1>Inline Rating integration code demo</h1>

    <!-- Contents of this div will be the star rating for product-id-1. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product1"></div>
    <!-- Contents of this div will be the star rating for product-id-1. Make sure to lowercase the productid for the div id -->
    <div id="BVRRInlineRating-productid1"></div>

    <!-- Contents of this div will be the star rating for product-id-2. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product2"></div>
    <!-- Contents of this div will be the star rating for product-id-2. Make sure to lowercase the productid for the div id -->
    <div id="BVRRInlineRating-productid2"></div>

    <!-- Contents of this div will be the star rating for product-id-3. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product3"></div>
    <!-- Contents of this div will be the star rating for product-id-3. Make sure to lowercase the productid for the div id -->
    <div id="BVRRInlineRating-productid3"></div>

    <!-- Contents of this div will be the star rating for product-id-4. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product4"></div>
    <!-- Contents of this div will be the star rating for product-id-4. Make sure to lowercase the productid for the div id -->
    <div id="BVRRInlineRating-productid4"></div>
    </body>
    </html>
  7. charleshimmer revised this gist Apr 12, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>
    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product-id-1', 'product-id-2', 'product-id-3', 'product-id-4'],
    productIds : ['product1', 'product2', 'product3', 'product4'],
    containerPrefix : 'BVRRInlineRating'
    });
    </script>
    @@ -21,15 +21,15 @@
    <h1>Inline Rating integration code demo</h1>

    <!-- Contents of this div will be the star rating for product-id-1. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-1"></div>
    <div id="BVRRInlineRating-product1"></div>

    <!-- Contents of this div will be the star rating for product-id-2. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-2"></div>
    <div id="BVRRInlineRating-product2"></div>

    <!-- Contents of this div will be the star rating for product-id-3. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-3"></div>
    <div id="BVRRInlineRating-product3"></div>

    <!-- Contents of this div will be the star rating for product-id-4. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-4"></div>
    <div id="BVRRInlineRating-product4"></div>
    </body>
    </html>
  8. charleshimmer revised this gist Mar 11, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,9 @@
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>
    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product-id-1', 'product-id-2', 'product-id-3', 'product-id-4'],
    containerPrefix : 'BVRRInlineRating'
    });
    productIds : ['product-id-1', 'product-id-2', 'product-id-3', 'product-id-4'],
    containerPrefix : 'BVRRInlineRating'
    });
    </script>

    </head>
  9. charleshimmer created this gist Mar 11, 2013.
    35 changes: 35 additions & 0 deletions inlineRatings.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <!-- Meat and Potatoes of BV Integration Code-->
    <script src="//display-stg.ugc.bazaarvoice.com/static/ClientName/bvapi.js"></script>
    <script>
    $BV.ui( 'rr', 'inline_ratings', {
    productIds : ['product-id-1', 'product-id-2', 'product-id-3', 'product-id-4'],
    containerPrefix : 'BVRRInlineRating'
    });
    </script>

    </head>
    <body>
    <h1>Inline Rating integration code demo</h1>

    <!-- Contents of this div will be the star rating for product-id-1. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-1"></div>

    <!-- Contents of this div will be the star rating for product-id-2. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-2"></div>

    <!-- Contents of this div will be the star rating for product-id-3. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-3"></div>

    <!-- Contents of this div will be the star rating for product-id-4. Can optionally display the average rating and number of reviews. -->
    <div id="BVRRInlineRating-product-id-4"></div>
    </body>
    </html>