How can i find the moderated number of comments on the page/component

StackOverflow https://stackoverflow.com/questions/12037487

  •  27-06-2021
  •  | 
  •  

سؤال

I am getting the number of comments value from the Item Statistics field's numberOfComments, But its return total number of comments.

Could any one please help me, how can i find only moderated number of comments in UGC?

هل كانت مفيدة؟

المحلول

AFAIK currently there is no way to find it directly but you may allow only moderated comments and then count them like

   <ugc:ForEachComment runat="server">
    <% HttpContext.Current.Items["Count"] = Convert.ToInt32(HttpContext.Current.Items["Count"]) + 1; %>
            </ugc:ForEachComment>

Hope it will help you.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top