BlogEngine.NET部署日志

本文修正了CategoryList.cs中的日历显示问题,并调整了CommentView.ascx.cs中的文本框初始文本。同时,还进行了URL验证更新及部分界面汉化工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

修正CategoryList.cs日历正常显示“一二三四五六日”

      private System.Threading.Thread t;
      
private System.Globalization.CultureInfo oldCulture;

在OnPreRender中添加如下代码
        t = System.Threading.Thread.CurrentThread;
        oldCulture 
= t.CurrentCulture;
        System.Globalization.CultureInfo newci 
= (System.Globalization.CultureInfo)oldCulture.Clone();
        newci.DateTimeFormat.DayNames 
= new string[] {"" , """"""""""""};
        newci.DateTimeFormat.FirstDayOfWeek 
= DayOfWeek.Sunday;
        t.CurrentCulture 
= newci;

在RaiseCallbackEvent中添加如下代码
          t = System.Threading.Thread.CurrentThread;
          oldCulture 
= t.CurrentCulture;
          System.Globalization.CultureInfo newci 
= (System.Globalization.CultureInfo)oldCulture.Clone();
          newci.DateTimeFormat.DayNames 
= new string[] { """""""""""""" };
          newci.DateTimeFormat.FirstDayOfWeek 
= DayOfWeek.Sunday;
          t.CurrentCulture 
= newci;

修正User controls/ConmmentView.ascx.cs网站文本框初始显示文本
txtWebsite.Text = Request.Url.Host;

Request.Url.Host 
+ "/author/" + user.UserName + BlogSettings.Instance.FileExtension;

修正User controls/ConmmentView.ascx  URL验证
(http://|https://|)([\w-]+\.)+[\w-]+(/[\w- ./?%&=;~]*)?

(http
://|https://|)[\w-]+(/[\w- ./?%&=;~]*)?

汉化LoginStatus为『登陆』『注销』,将LoginStatus添加到主菜单

<asp:LoginStatus ID="LoginStatus1" runat="Server" LoginText="Sign in" LogoutText="Sign out" EnableViewState="false" />

<asp:LoginStatus ID="LoginStatus1" runat="Server" LoginText="登录" LogoutText="注销" EnableViewState="false" />
汉化菜单项『Extensions』 『Change password』为『常用链接』『修改密码』
修正labels.zh-CN.resx中Changepassword,添加Extensions
去掉About the author
site.master
<href="<%=Utils.FeedUrl %>" class="feed"><img src="~/pics/rssButton.gif" alt="Feed" runat="server" />
<%
=Resources.labels.subscribe %></a>
去掉SidePanel『最新文章』
<div class="box recent">
  
<h1><%=Resources.labels.recentPosts %></h1>
  
<blog:RecentPosts runat="Server" />
</div>
二级菜单
CSS+JavaScript
<script type="text/javascript">
window.onload
=  function() {
    
if (document.all&&document.getElementById) {
        navRoot 
= document.getElementById("menu");
            
for (i=0; i<navRoot.childNodes.length; i++) {
                node 
= navRoot.childNodes[i];
                
if (node.nodeName=="LI") {
                    node.onmouseover
=function() {
                    
this.className+=" over";
                }
                node.onmouseout
=function() {
                    
this.className=this.className.replace(" over""");
                }
            }
        }
    }
}
</script>
<style type="text/css" media="all">
ul#menu,ul#menu ul
{
    margin
: 0 auto;
    text-align
:left;
    padding
: 0;
    list-style
: none;
    background
:#fff;
    z-index
:99;
}

ul#menu 
{
    width
:100%;
    display
:block;
    height
:24px;
    clear
:both;
    
    border
: 1px solid silver;
    margin-bottom
: 20px;
}
 
ul#menu li 
{
    position
: relative;
    z-index
:999;
    float
:left;
}

ul#menu ul li
{
    display
:block;
}

ul#menu ul 
{
    width
:170px;
    height
:auto;
    position
: absolute;
    text-align
:left;
    left
: 0px;
    display
: none;
    border
:solid 1px #ccc;
}
 
/* Styles for Menu's hover */
ul#menu li.over a,ul#menu li:hover a
{
    color
:#069; 
    font-weight
:bold;
    text-decoration
:none;
}

/* Clear Submenu's Styles */
ul#menu li.over ul a,ul#menu li:hover ul a
{
    background
:#fff;
    font-weight
:normal;
    color
:#777;
}
/* Styles for Submenu's Hover */
ul#menu li.over ul a:hover,ul#menu li:hover ul a:hover
{
    background
:white;
    font-weight
:normal;
    color
: #069;
}
 
/* Styles for Menu Items */
ul#menu a 
{
    font-size
:12px;
    line-height
:17px;
    display
: block;
    padding
:0 0 0 10px;
    width
:58px;
    color
: #5c80b1;
    height
:17px;
    background
: #fff;
    border-left
:solid 1px #fff;
    border-top
:solid 1px #fff;
    border-right
:solid 1px #fff;
    border-bottom
:solid 1px #fff;
    text-decoration
:none;
}
 
ul#menu ul li
{
    width
:100px;
    border
:0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul#menu li 
{ float: left; height: 17px; }
* html ul#menu li a 
{  height: 17px; }
/* End */
 
ul#menu ul a 
{ padding: 2px 0px 2px  10px; border:0; width:160px;     } /* Sub Menu Styles */
        
ul#menu li:hover ul,ul#menu  li.over ul 
{ display: block; } /* The magic */

</style>
未来计划
  • 有回复时,发送邮件至作者
  • 发布随笔时,发送邮件至所有注册用户
  • 阅读计数
  • Tag页面
  • 显示登录用户名
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值