HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/vintagedoorknobs/inc-template-reviews.asp
<%
' (SS,15/02/12) New for recent reviews and reviews page, product reviews are held in inc-template-other.asp
' (SS,23/05/12) Minor change to ShowReviewsPageItem
' (SS,28/08/14) Bootstrap version, version 2 of ShowRecentReviewsItem has more parameters, Recent Reviews link more to fotter and named More Reviews
' (SS,17/02/16) Changes to Sub ShowRecentReviewsItem to add Rich Snippets /  Microdata
' (SS,13/05/21) Added for Trustpilot: ShowRecentReviewsEmptyTP, ShowRecentReviewsHeaderTP, ShowRecentReviewsItemTP, ShowRecentReviewsFooterTP
' (SS,14/05/21) Modified layout (Sub ShowRecentReviewsItem and styles.css) to look more like Trustpilot reviews, changed star colour from FFB500 to #f8b805 i.e. same as Google Stars
' (SS,14/06/24) Modified Sub ShowReviewsPageItem to add additional parameter "" to ShowReviewRatingStars

' --- START OF RECENT REVIEWS TEMPLATES --- '
Sub ShowRecentReviewsEmpty
' html to show if no recent reviews to go here '
%>
<%
End Sub

Sub ShowRecentReviewsHeader
%>
<div id="recent-reviews">
  <div id="recent-reviews-header">

  </div>
<%
End Sub

' (SS,26/8/14) new parameters AReviewTitle, AProductRating, AReviewerName, AReviewText 
' (SS,15/2/16) added rich snippets for reviews
' (SS,16/4/17) replaced <i> tag with <span> for review stars due to <i> being deprecated
' (SS,22/10/19) new version with snippets removed due to Google now complaining about missing values (added to separate localbusiness snippet)
' removed itemscope itemtype="http://schema.org/Review" 
' itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product" 
' itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"
'<span itemprop="name">
' meta itemprop="ratingValue"
' <span itemprop="reviewBody" 
' <span itemprop="datePublished">
' <span itemprop="author" itemscope itemtype="http://schema.org/Person"
' <span itemprop="name">
' (SS,11/12/19) Replaced link to recent reviews page with link product page itself (decided not to use #reviews anchor, due to most recent reviews shown in the main description)
' (SS,14/5/21) modified layout to look more like Trustpilot reviews, changed star colour from FFB500 to #f8b805 i.e. same as Google Stars
Sub ShowRecentReviewsItem(ANumber, AReviewID, AProductCode, AProductName, ADateInfo, AReviewTitle, AProductRating, AReviewerName, AReviewText) 
  Dim i
%>
<!-- START OF RECENT REVIEWS ITEM -->
  <div class="recent-reviews-item">

<%For i = 1 To AProductRating%>    
    <span class="glyphicon glyphicon-star" style="color: #f8b805; font-size:18px"></span>
<%Next%>
 
    
    
    <div class="recent-reviews-date">
      <%=AReviewerName%>,&nbsp; <%=ADateInfo%>
    </div>       

    <div class="recent-reviews-title">
      <strong><%=AReviewTitle%></strong>
    </div>

    <div class="recent-reviews-text">
      <span><%=AReviewText%></span>
    </div>    
    
    
    <div class="recent-reviews-name"><a href="<%=GetProductLinkWithName(AProductCode, AProductName)%>"><%=AProductName%></a></div>
<!-- END OF RECENT REVIEWS ITEM -->
  </div>
<%
End Sub

Sub ShowRecentReviewsFooter
%>
  <div id="recent-reviews-footer">
    <a href="<%=GetPageLink("reviews")%>">More Reviews</a>
  </div>
  <div class="clear"></div>
</div>
<%
End Sub

' (SS,24/10/19) to show count and average of all reviews in structured data, only run on home page
Sub ShowReviewAggregateRatingStructuredData
  ' exist if not home page or GetReviewAggregateRating returns false
  If Not IsHomePage Then
    Exit Sub
  End If
  Dim LReviewCount, LAverageRating
  If Not GetReviewAggregateRating(LReviewCount, LAverageRating) Then
    Exit Sub
  End If
%>,
    "aggregateRating": {
      "@type": "AggregateRating",
      "ratingValue": "<%=LAverageRating%>",
      "ratingCount": "<%=LReviewCount%>",
      "bestRating": "5",
      "worstRating": "1"
     }
<%
End Sub

' --- END OF RECENT REVIEWS TEMPLATES --- '


' --- START OF RECENT REVIEWS TEMPLATES FOR TRUSTPILOT --- '

Sub ShowRecentReviewsEmptyTP
' html to show if no recent reviews to go here '
%>
<%
End Sub

Sub ShowRecentReviewsHeaderTP(AAverageRating, ARatingTitle, AReviewCount)
  Dim LAverageRating, LRatingTitle
  If AAverageRating = 0 Then
    LAverageRating = 5
  Else
    LAverageRating = Round(AAverageRating)
  End If
  LRatingTitle = ARatingTitle
  If LRatingTitle = "" Then LRatingTitle = "Excellent"  
%>
<div id="recent-reviews-tp">
  <div id="recent-reviews-header-tp">
    <div>
    <a href="https://uk.trustpilot.com/review/<%=GetTrustpilotSiteName%>" target="_blank">
      <%=LRatingTitle%>&nbsp;
      <img src="images/trustpilot/stars-<%=LAverageRating%>.svg" height="30" alt="<%=LAverageRating%>  stars">
      &nbsp;on
      <img src="images/trustpilot/trustpilot-logo.png" height="30">
    </a>
    </div>
  </div>
<%
End Sub

' (SS,26/8/14) new parameters AReviewTitle, AProductRating, AReviewerName, AReviewText 
' (SS,15/2/16) added rich snippets for reviews
' (SS,16/4/17) replaced <i> tag with <span> for review stars due to <i> being deprecated
' (SS,19/11/20) used for Trustpilot reviews, added Trustpilot's own stars
' also removed the rich snippets, imnproved layout
Sub ShowRecentReviewsItemTP(ANumber, AReviewID, AProductCode, AProductName, ADateInfo, AReviewTitle, AProductRating, AReviewerName, AReviewText)
  Dim i
%>
<!-- START OF RECENT REVIEWS ITEM -->
  <div class="recent-reviews-item-tp">

    <img src="images/trustpilot/stars-<%=AProductRating%>.svg" height="20" alt="<%=AProductRating%> stars">

    <div class="recent-reviews-date-tp">
      <%=AReviewerName%>,&nbsp; <%=ADateInfo%>
    </div>       

    <div class="recent-reviews-title-tp">
      <strong><%=AReviewTitle%></strong>
    </div>

    <div class="recent-reviews-text-tp">
      <span><%=AReviewText%></span>
    </div>

<!-- END OF RECENT REVIEWS ITEM -->
  </div>
<%
End Sub

Sub ShowRecentReviewsFooterTP
%>
  <div id="recent-reviews-footer-tp">
    <a href="https://uk.trustpilot.com/review/<%=GetTrustpilotSiteName%>" target="_blank">More Trustpilot Reviews</a>
  </div>
  <div class="clear"></div>
</div>
<%
End Sub

' --- END OF RECENT REVIEWS TEMPLATES FOR TRUSTPILOT --- '

' --- START OF REVIEWS PAGE TEMPLATES --- '

Sub ShowReviewsPageHeader
  ShowPageTitle "Reviews", "", "" ' (SS,3/10/20) added 2 extra parameters
%>
<div id="other-pages2" style="padding: 0">
<%
End Sub

Sub ShowReviewsPageEmpty
%>
  No reviews yet.
<%
End Sub

' (SS,23/5/12) removed bold tags from product name which was resulting in extra bold via different font in IE and FireFox
' (SS,12/9/14) replaced ShowReviewRatingImage with ShowReviewRatingStars for Bootstrap
' (SS,14/6/24) added additional parameter "" to ShowReviewRatingStars
Sub ShowReviewsPageItem(ANumber, AReviewID, AProductCode, AProductName, AProductDisabled, ADate, ATitle, ARating, AText, AReviewedBy)
  Dim LProductLinkStart, LProductLinkEnd, i
  If AProductDisabled Then
    LProductLinkStart = ""
    LProductLinkEnd = ""
  Else
    LProductLinkStart = "<a href=""" + GetProductLink(AProductCode) + """>"
    LProductLinkEnd = "</a>"
  End If
%>
<!-- START OF REVIEWS PAGE ITEM -->
  <div class="reviews-page-item">
      <div class="reviews-page-item-header">        
        <div class="reviews-page-item-name"><a name="reviewid<%=AReviewID%>"></a>
          <h4><%=LProductLinkStart%><%=AProductName%><%=Iif(AProductDisabled, " (discontinued)", "")%><%=LProductLinkEnd%><h4>
        </div>
      </div>
    <div class="row">
      <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">    
        <div class="reviews-page-item-left">
          <%=LProductLinkStart%><img class="reviews-page-image" src="<%=GetProductImageLink(AProductCode, "s")%>" alt="<%=AProductName%>" /><%=LProductLinkEnd%>      
        </div>
      </div>
      <div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
        <div class="reviews-page-item-right">
          <div class="reviews-page-item-right-header">
            <div class="reviews-page-item-rating">
            <%ShowReviewRatingStars ARating, ""%>
              <!--<div class="reviews-page-item-title"-->&nbsp;<big><b><%=ATitle%></b></big><!--</div>-->
            </div>            
            <!--<div class="reviews-page-item-date"><%=ADate%></div>-->
            <div class="reviews-page-item-review-by">Review by&nbsp;<%=AReviewedBy%> on <%=ADate%></div>        
          </div>
          <div class="reviews-page-item-body">        
            <p><i><%=AText%></i></p>
          </div>
        </div>
      </div>
    </div><!--row-->
  </div>
  <hr>
<!-- END OF REVIEWS PAGE ITEM -->  
<%
End Sub

Sub ShowReviewsPageFooter
%>
</div> <!-- end #other-pages2 -->
<%
End Sub

' --- END OF REVIEWS PAGE TEMPLATE --- '


%>