Subtext--博客基本配置

       Subtext博客配置分两种,一种是存在数据库中的,可以修改,一种则是存在web.config文件中,暂时还没有实现可修改。

看下图



BlogConfigurationSettings类为blog默认设置,其中包括一些集合属性,如AllowedHtmlTags还有Tracking对象等,

Config包含了BlogConfigurationSettings对象,作为站点配置,这里应该说明一下 Subtext并非个人版博客,其也可以创建多博客,只是由于URL的原因,让你产生了幻觉:),你看Config就提供了CreateBlog方法,对于我们个人使用可能不太常用.但UpdateConfigData方法绝对很常用.他会更新BlogInfo对象大部分的属性,不管你需要不需要更新,如blog用户名和密码等.

SkinConfig你可以不用去管他,它作为BlogInfo的子属性而存在,当刚创建blog的时候会给出一个默认的skin

数据库可改的属性就不看了,我们来看下web.config里的配置

     < BlogConfigurationSettings type = " Subtext.Framework.Configuration.BlogConfigurationSettings, Subtext.Framework " >
        
< Tracking enableAggBugs = " true "  enableWebStats = " true "  queueStats = " true "  queueStatsCount = " 5 "  enableTrackBacks = " true "  enablePingBacks = " true "  pingWeblogs = " true " />

        
<!--     
            Checkout Subtext.Framework.Security 
for  hashing passwords.  
            This should be 
set  when first installing the application 
            and really shouldn
' t be changed afterwards.    
         -->
        
< UseHashedPasswords > true </ UseHashedPasswords >

        
<!--  Globally control access to web services  -->
        
< AllowServiceAccess > true </ AllowServiceAccess >

        
< AllowImages > true </ AllowImages >

        
<!--  Globally control use of XHTML  -->
        
< UseXHTML > true </ UseXHTML >

        
<!--  Default Item Count  -->
        
< ItemCount > 25 </ ItemCount >

        
<!--  Default Number of Posts to Show on Category Pages. Use  0  to show all.  -->
        
< CategoryListPostCount > 0 </ CategoryListPostCount >

        
<!--  Default Server Time Zone Offset  -->
        
< ServerTimeZone >- 8 </ ServerTimeZone >

        
<!--  Whether or not to GZIP the RSS and / or atom feeds.  -->
        
< UseSyndicationCompression > true </ UseSyndicationCompression >
    
</ BlogConfigurationSettings >

另外还有AllowableCommentHtml用于过滤评论的html语言,其中集合中的是允许使用的标签

     < AllowableCommentHtml >
        
< add key = " a "  value = " href,title " />
        
< add key = " b "  value = "" />
        
< add key = " strong "  value = "" />
        
< add key = " blockquote "  value = " cite " />
        
< add key = " i "  value = "" />
        
< add key = " em "  value = "" />
        
< add key = " u "  value = "" />
        
< add key = " strike "  value = "" />
        
< add key = " super "  value = "" />
        
< add key = " sub "  value = "" />
        
< add key = " code "  value = "" />
    
</ AllowableCommentHtml >

结合代码和配置的话,应该马上就可以看明白.

web.config文件的配置是相当多的,由于此系统主要是个人博客使用为多,所以配置多点也无所谓,一次性搞清楚就好.
另外其他的还有appSetting节点下的一些配置,如UI Text,其由 Subtext.Web.UI.UIText读取,这几个是直接显示在页面上的,你可以把它改成中文也可以.
  <!-- UI Text  -->
        
< add key = " PostCollection "  value = " Post Categories " />
        
< add key = " ArticleCollection "  value = " Article Categories " />
        
< add key = " ImageCollection "  value = " Image Galleries " />
        
< add key = " Archives "  value = " Archives " />


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值