/// <summary> /// Photoes the rate clicked. /// </summary> /// <returns>The rate clicked.</returns> private static bool PhotoRateClicked() { /* // Analytic * AnalyticsTracker analyticsTracker = AnalyticsTracker.Current; * if (analyticsTracker != null && analyticsTracker.CurrentPage != null) * { * analyticsTracker.TriggerEvent("Rate photo", "User rated a photo"); * }*/ return(PhotoAlbumReviewHelper.SafeRequest("PhotoRateButton").Equals("PhotoRateButton")); }
/// <summary> /// Hides the review form for owner. /// </summary> /// <param name="albumItm">The album itm.</param> private void HideReviewFormForOwner(Item albumItm) { // If current user is owner of this album then he can't rate it if (PhotoAlbumReviewHelper.IsCurrentUserOwner(this.albumInst, this) || PhotoAlbumHelper.IsAlreadyRatedByUser(albumItm.ID.ToString(), this.albumInst.CurrUserName)) { this.reviewForm.Visible = false; } else { this.reviewForm.Visible = true; } }
/// <summary> /// Posts the review. /// </summary> private void PostReview() { string s1 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_title"); string s2 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_text"); string s3 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_rate"); Item photoForRating = this.currPhoto;// this.paginator.GetPageItems()[0]; if (photoForRating != null) { PhotoAlbumObject.AddPhotoRatingComment(s1, s2, s3, photoForRating); PhotoAlbumHelper.AddPhotoToSessionNonRateable(photoForRating.ID.ToString(), Request.QueryString["CurrentUser"]);//this.albumInst.CurrUserName); } // Triger goal Rate Photo // AnalyticsTrackerHelper.TriggerEvent("Rate photos", "Photo was rated", string.Empty, string.Empty, "CurrentPage"); }
/// <summary> /// Posts the review. /// </summary> /// <param name="albumForRating">The album for rating.</param> private void PostReview(Item albumForRating) { string s1 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_title"); string s2 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_text"); string s3 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_rate"); if (albumForRating != null) { PhotoAlbumObject.AddPhotoRatingComment(s1, s2, s3, albumForRating); // register session when user already rated image PhotoAlbumHelper.AddPhotoToSessionNonRateable(albumForRating.ID.ToString(), this.albumInst.CurrUserName); } // Triger goal Rate Photo //AnalyticsTrackerHelper.TriggerEvent("Rate photos", "Album was rated", string.Empty, string.Empty, "CurrentPage"); }
/// <summary> /// Shows the reviews. /// </summary> /// <param name="albumItm">The album itm.</param> private void ShowReviews(Item albumItm) { this.reviewList.InnerHtml = PhotoAlbumReviewHelper.BuildReviewsHtml(albumItm); }
/// <summary> /// Hides the review form for owner. /// </summary> private void HideReviewFormForOwner() { // If current user is owner of this album then he can't rate it this.reviewForm.Visible = !PhotoAlbumReviewHelper.IsCurrentUserOwner(this.albumInst, this); }
/// <summary> /// Shows the reviews. /// </summary> private void ShowReviews() { this.reviewList.InnerHtml = PhotoAlbumReviewHelper.BuildReviewsHtml(this.currPhoto);//this.paginator.GetPageItems()[0]); }