/// <summary>
 /// 装载WebSite信息
 /// </summary>
 private void LoadWebSiteConfig()
 {
     #region 装载主题信息
     XmlDocumentExtender doc = new XmlDocumentExtender();
     doc.Load(configPath);
     XmlNodeList topiclistNode = doc.SelectNodes("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist/Topic");
     XmlNodeList website_spacelistnode = doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist/Topic");
     XmlNodeInnerTextVisitor topicvisitor = new XmlNodeInnerTextVisitor();
     XmlNodeInnerTextVisitor pagetopicvisitor = new XmlNodeInnerTextVisitor();
     forumlist.Text = "";
     int i = 0;
     foreach (XmlNode topic in topiclistNode)
     {
         topicvisitor.SetNode(topic);
         bool isCheck = false;
         foreach (XmlNode index in website_spacelistnode)
         {
             pagetopicvisitor.SetNode(index);
             if (topicvisitor["topicid"].ToString() == pagetopicvisitor["topicid"].ToString())
             {
                 isCheck = true;
                 break;
             }
         }
         forumlist.Text += "<div class='mo' id='m" + i + "' flag='f" + i + "'><h1><input type='checkbox' name='tid' " + (isCheck ? "checked" : "") + " value='" + topicvisitor["topicid"] + "'>" + topicvisitor["title"] + "</h1></div>\n";
         i++;
     }
     topnumber.Text = doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Topnumber");
     showtype.SelectedValue = doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Showtype");
     #endregion
 }
Пример #2
0
 private void LoadWebSiteConfig()
 {
     #region 绑定自动推荐相册
     //装载配置文件
     XmlDocumentExtender doc = new XmlDocumentExtender();
     doc.Load(configPath);
     XmlNode albumconfig = doc.SelectSingleNode("/Aggregationinfo/Aggregationpage/Albumindex/Albumconfig");
     focusphotoshowtype.SelectedIndex =  Convert.ToInt32(doc.GetSingleNodeValue(albumconfig, "Focusphotoshowtype"));
     focusphotodays.Text = doc.GetSingleNodeValue(albumconfig, "Focusphotodays");
     focusphotocount.Text = doc.GetSingleNodeValue(albumconfig, "Focusphotocount");
     recommendalbumtype.SelectedIndex = Convert.ToInt32(doc.GetSingleNodeValue(albumconfig, "Focusalbumshowtype"));
     focusalbumdays.Text = doc.GetSingleNodeValue(albumconfig, "Focusalbumdays");
     focusalbumcount.Text = doc.GetSingleNodeValue(albumconfig, "Focusalbumcount");
     weekhot.Text = doc.GetSingleNodeValue(albumconfig, "Weekhot");
     #endregion
 }
Пример #3
0
 /// <summary>
 /// 获取聚合首页自动推荐主题列表的排序规则
 /// </summary>
 /// <returns></returns>
 public TopicOrderType GetForumAggregationTopicListOrder()
 {
     if (topicOrderType == null)
     {
         XmlDocumentExtender doc = new XmlDocumentExtender();
         doc.Load(Utils.GetMapPath(BaseConfigs.GetForumPath + "config/aggregation.config"));
         topicOrderType = (TopicOrderType)TypeConverter.ObjectToInt(doc.GetSingleNodeValue(doc.SelectNodes("/Aggregationinfo/Aggregationpage/Website/Forum")[0], "Bbs/Showtype"));
     }
     return (TopicOrderType)topicOrderType;
 }