BlogEngine.Web/User controls/CommentView.ascx
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CommentView.ascx.cs" Inherits="User_controls_CommentView" %>
<%@ Import Namespace="BlogEngine.Core" %>
<% if (Post.Comments.Count > 0){ %>
<h1 id="comment"><%=Resources.labels.comments %></h1>
<%} %>
<div id="commentlist" style="display:none">
<asp:PlaceHolder runat="server" ID="phComments" />
</div>
<% if (Post.Comments.Count > 0){ %>
<script type="text/javascript">$('commentlist').style.display='block';</script>
<%} %>
<asp:PlaceHolder runat="Server" ID="phAddComment">
<img src="<%=Utils.RelativeWebRoot %>pics/ajax-loader.gif" alt="Saving the comment" style="display:none" id="ajaxLoader" />
<span id="status"></span>
<div class="commentForm">
<h1 id="addcomment"><%=Resources.labels.addComment %></h1>
<label for="<%=txtName.ClientID %>"><%=Resources.labels.name %>*</label>
<asp:TextBox runat="Server" ID="txtName" TabIndex="1" ValidationGroup="AddComment" />
<asp:CustomValidator runat="server" ControlToValidate="txtName" ErrorMessage=" <%$Resources:labels, chooseOtherName %>" Display="dynamic" ClientValidationFunction="CheckAuthorName" EnableClientScript="true" ValidationGroup="AddComment" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtName" ErrorMessage="<%$Resources:labels, required %>" Display="dynamic" ValidationGroup="AddComment" /><br />
<label for="<%=txtEmail.ClientID %>"><%=Resources.labels.email %>*</label>
<asp:TextBox runat="Server" ID="txtEmail" TabIndex="2" ValidationGroup="AddComment" />
<span id="gravatarmsg">
<%if (BlogSettings.Instance.Avatar != "none" && BlogSettings.Instance.Avatar != "monster"){ %>
(<%=string.Format(Resources.labels.willShowGravatar, "<a href=\"http://www.gravatar.com\" target=\"_blank\">Gravatar</a>")%>)
<%} %>
</span>
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtEmail" ErrorMessage="<%$Resources:labels, required %>" Display="dynamic" ValidationGroup="AddComment" />
<asp:RegularExpressionValidator runat="server" ControlToValidate="txtEmail" ErrorMessage="<%$Resources:labels, enterValidEmail %>" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="AddComment" /><br />
<label for="<%=txtWebsite.ClientID %>"><%=Resources.labels.website %></label>
<asp:TextBox runat="Server" ID="txtWebsite" TabIndex="3" ValidationGroup="AddComment" />
<asp:RegularExpressionValidator runat="Server" ControlToValidate="txtWebsite" ValidationExpression="(http://|https://|)([\w-]+\.)+[\w-]+(/[\w- ./?%&=;~]*)?" ErrorMessage="<%$Resources:labels, enterValidUrl %>" Display="Dynamic" ValidationGroup="AddComment" /><br />
<% if(BlogSettings.Instance.EnableCountryInComments){ %>
<label for="<%=ddlCountry.ClientID %>"><%=Resources.labels.country %></label>
<asp:DropDownList runat="server" ID="ddlCountry" onchange="SetFlag(this.value)" TabIndex="4" EnableViewState="false" ValidationGroup="AddComment" />
<asp:Image runat="server" ID="imgFlag" AlternateText="Country flag" Width="16" Height="11" EnableViewState="false" /><br /><br />
<%} %>
<span class="bbcode" title="BBCode tags"><%=BBCodes() %></span>
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtContent" ErrorMessage="<%$Resources:labels, required %>" Display="dynamic" ValidationGroup="AddComment" /><br />
<% if (BlogSettings.Instance.ShowLivePreview) { %>
<ul id="commentMenu">
<li id="compose" class="selected" onclick="ToggleCommentMenu(this)"><%=Resources.labels.comment%></li>
<li id="preview" onclick="ToggleCommentMenu(this)"><%=Resources.labels.livePreview%></li>
</ul>
<% } %>
<div id="commentCompose">
<asp:TextBox runat="server" ID="txtContent" TextMode="multiLine" Columns="50" Rows="10" TabIndex="5" ValidationGroup="AddComment" />
</div>
后面还有 51 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
