Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["userid"] = 1; Session["forumid"] = 1;
            if (!(Convert.ToInt32(Session["userid"]) > 0))
            {
                Response.Redirect("../Pages/Registration.aspx?error=1");
            }
            if (IsPostBack)
            {
                return;
            }
            List <string> categories = new List <string>();

            categories = ForumCategory.GetPublishedCategoryNames(Convert.ToInt32(Session["forumid"]));
            categories.Insert(0, "Select a category");
            drpCategory.DataSource = categories;
            drpCategory.DataBind();
            if (Request.QueryString["sec"] != null)
            {
                drpCategory.SelectedValue = Request.QueryString["cat"].ToString();
                if (drpCategory.SelectedIndex > 0)
                {
                    drpSection.DataSource = ForumSection.GetAllSectionNames(drpCategory.SelectedItem.Text);
                    drpSection.DataBind();
                    drpSection.SelectedValue = Request.QueryString["sec"].ToString();
                }
                else
                {
                    drpSection.Items.Clear();
                    drpSection.Items.Add("Select a section");
                }
            }
        }
Exemplo n.º 2
0
 public static void GetLatestPosts(string[] _ForumAddresses, Action <ForumPost> _RetPosts, ForumType _ForumType, bool _OnlyNewest = false) //"http://www.wow-one.com/forum/117-server-updates/"
 {
     if (_OnlyNewest == false)
     {
         foreach (var forumAddress in _ForumAddresses)
         {
             try
             {
                 ForumSection forumSection = GetForumSection(forumAddress);
                 foreach (var threadPost in forumSection.m_ForumPosts)
                 {
                     _RetPosts(threadPost);
                 }
             }
             catch (Exception ex)
             {
                 Logger.LogException(ex);
             }
         }
     }
     foreach (var forumAddress in _ForumAddresses)
     {
         try
         {
             ForumSection forumSection = GetForumSection(forumAddress);
             _GetLatestPosts(forumSection, _RetPosts, _ForumType);
         }
         catch (Exception ex)
         {
             Logger.LogException(ex);
         }
     }
     SaveForumSections();
 }
Exemplo n.º 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int published = 0;

            if (drpPublish.SelectedIndex == 0)
            {
                published = 1;
            }
            bool toggle = false;
            //Session["userid"] = 1;
            ForumThread thread = new ForumThread();

            thread.Published    = published;
            thread.ThreadBody   = txtContent.Text;
            thread.ThreadTitle  = txtTitle.Text;
            thread.DateModified = DateTime.Now;
            thread.ThreadID     = threadid;
            if (!(togglecount % 2 == 0))
            {
                toggle = true;
            }
            else
            {
                toggle = false;
            }
            //thread.DatePublished = DateTime.Now;
            thread.SectionId = ForumSection.GetSectionIdbyName(sec);
            thread.UpdateThreadIntoDb(toggle);
            //thread.CreateThreadintoDb();
        }
        public ActionResult DeleteConfirmed(int id)
        {
            ForumSection forumSection = db.ForumSections.Find(id);

            db.ForumSections.Remove(forumSection);
            db.SaveChanges();
            return(RedirectToAction("Index", "ForumSections"));
        }
Exemplo n.º 5
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     //Session["userid"] = 1;
     int published=0;
     if (drpPublish1.SelectedIndex == 0)
         published = 1;
     ForumSection section = new ForumSection(txtTitle1.Text,Convert.ToInt32(Session["userid"]) , drpCategories.SelectedItem.Text, published, txtDesc1.Text);
     section.CreateSectionintoDb();
 }
 public ActionResult Edit([Bind(Include = "ID,Title,addedBy")] ForumSection forumSection)
 {
     if (ModelState.IsValid)
     {
         db.Entry(forumSection).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", "ForumSections"));
     }
     return(View(forumSection));
 }
Exemplo n.º 7
0
        public ActionResult AddJunba(ForumSection forumssde, HttpPostedFileBase file)
        {
            try
            {
                var forummi = Request["post_nume"];
                var userid  = Convert.ToInt32(Session["User_id"]);

                if (file != null)
                {
                    var foruimg = Request["FsectionImg"];

                    if (foruimg != null)
                    {
                        string filePath     = foruimg;
                        string filename     = filePath.Substring(filePath.LastIndexOf("\\") + 1);
                        string serverpath   = Server.MapPath(@"\Images\essay\") + filename;
                        string relativepath = @"/Images/essay/" + filename;
                        file.SaveAs(serverpath);
                        forumssde.FsectionImg = relativepath;
                    }
                    else
                    {
                        return(Content("<script>;alert('请先上传军吧图片!');history.go(-1)</script>"));
                    }
                    var forubackimg = Request["FsectionbackImg"];
                    if (forubackimg != null)
                    {
                        string filePath     = forubackimg;
                        string filename     = filePath.Substring(filePath.LastIndexOf("\\") + 1);
                        string serverpath   = Server.MapPath(@"\Images\essay\") + filename;
                        string relativepath = @"/Images/essay/" + filename;
                        file.SaveAs(serverpath);
                        forumssde.FsectionbackImg = relativepath;
                    }
                    else
                    {
                        return(Content("<script>;alert('请先军吧背景图片!');history.go(-1)</script>"));
                    }
                }

                if (ModelState.IsValid)
                {
                    forumssde.ForumSectionName = forummi;
                    forumssde.User_id          = userid;
                    PostManage.AddForumsection(forumssde);
                    return(Content("<script>;alert('创建成功!');window.location.href='/Forum/ClassifyPost'</script>"));
                }
            }
            catch (DbEntityValidationException ex)
            {
                return(Content(ex.Message));
            }
            return(View());
        }
Exemplo n.º 8
0
        internal void Save()
        {
            ForumSection section = new ForumSection();

            section.ID           = ID;
            section.Name         = Name;
            section.DisplayOrder = DisplayOrder;

            ForumSectionRepository repository = new ForumSectionRepository();

            repository.Add(section);
        }
        public ActionResult Create([Bind(Include = "ID,Title,Description,addedBy")] ForumSection forumSection)
        {
            if (ModelState.IsValid)
            {
                forumSection.addedBy = User.Identity.Name;
                db.ForumSections.Add(forumSection);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(forumSection));
        }
Exemplo n.º 10
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //Session["userid"] = 1;
            int published = 0;

            if (drpPublish1.SelectedIndex == 0)
            {
                published = 1;
            }
            ForumSection section = new ForumSection(txtTitle1.Text, Convert.ToInt32(Session["userid"]), drpCategories.SelectedItem.Text, published, txtDesc1.Text);

            section.CreateSectionintoDb();
        }
Exemplo n.º 11
0
 protected void drpCategory_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (drpCategory.SelectedIndex > 0)
     {
         drpSection.DataSource = ForumSection.GetAllSectionNames(drpCategory.SelectedItem.Text);
         drpSection.DataBind();
     }
     else
     {
         drpSection.Items.Clear();
         drpSection.Items.Add("Select a section");
     }
 }
Exemplo n.º 12
0
        public static void GetLatestPosts(string _ForumAddress, Action <ForumPost> _RetPosts, ForumType _ForumType, bool _OnlyNewest = false) //"http://www.wow-one.com/forum/117-server-updates/"
        {
            ForumSection forumSection = GetForumSection(_ForumAddress);

            if (_OnlyNewest == false)
            {
                foreach (var threadPost in forumSection.m_ForumPosts)
                {
                    _RetPosts(threadPost);
                }
            }
            _GetLatestPosts(forumSection, _RetPosts, _ForumType);
            SaveForumSections();
        }
        public void Add(ForumSection section)
        {
            OpenConnection();

            DbCommand command = CreateCommand("Insert Into ForumSection Values(@ID, @Name, @DisplayOrder)");

            command.Parameters.Add(CreateParameter("@ID", section.ID));
            command.Parameters.Add(CreateParameter("@Name", section.Name));
            command.Parameters.Add(CreateParameter("@DisplayOrder", section.DisplayOrder));

            command.ExecuteNonQuery();

            CloseConnection();
        }
        // GET: ForumSections/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ForumSection forumSection = db.ForumSections.Find(id);

            if (forumSection == null)
            {
                return(HttpNotFound());
            }
            return(View(forumSection));
        }
Exemplo n.º 15
0
        public async Task <ForumSectionDto> CreateAsync(string name)
        {
            var foundCount = await _forumSectionRepository.CountAsync(x => x.Name == name);

            if (foundCount > 0)
            {
                return(null);
            }
            var model = new ForumSection(name);

            model = await _forumSectionRepository.CreateAsync(model);

            var result = _mapper.Map <ForumSectionDto>(model);

            return(result);
        }
Exemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            thread     = Convert.ToInt32(Request.QueryString["thread"]);
            NThreads   = new List <ForumThread>();
            forumtitle = Request.QueryString["forum"];
            category   = Request.QueryString["category"];
            section    = Request.QueryString["section"];
            sectionid  = Convert.ToInt32(Request.QueryString["sectionid"]);
            SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["globaldb"].ConnectionString);
            string        q1   = "SELECT * FROM f_section where published=1 and SectionId=" + sectionid;;
            SqlCommand    com1 = new SqlCommand(q1, con1);
            SqlDataReader rdr;

            sec = new ForumSection();
            //ForumThread thread = new ForumThread();
            con1.Open();
            rdr = com1.ExecuteReader();

            while (rdr.Read())
            {
                sec              = new ForumSection();
                sec.SectionId    = Convert.ToInt32(rdr["SectionId"]);
                sec.SectionTitle = rdr["SectionTitle"].ToString();
                sec.ThreadCount  = Convert.ToInt32(rdr["ThreadCount"]);
                if (!(rdr["DateCreated"] == DBNull.Value))
                {
                    sec.DateCreated = Convert.ToDateTime(rdr["DateCreated"]);
                }
                if (!(rdr["DateModified"] == DBNull.Value))
                {
                    sec.DateModified = Convert.ToDateTime(rdr["DateModified"]);
                }
                //sec.CategoryId = this.CategoryId;
                sec.published = 1;
                if (!(rdr["DatePublished"] == DBNull.Value))
                {
                    sec.DatePublished = Convert.ToDateTime(rdr["DatePublished"]);
                }
                if (!(rdr["CreatorID"] == DBNull.Value))
                {
                    sec.CreatorId = Convert.ToInt32(rdr["CreatorID"]);
                }
                NThreads = sec.GetNThreads(thread, 30);
            }
            con1.Close();
        }
        private Expander DrawSectionBlock(ForumSection x)
        {
            TextBlock myblock = new TextBlock();

            myblock.FontSize = 25;
            myblock.Padding  = new Thickness(5, 5, 0, 5);
            myblock.Margin   = new Thickness(5, 0, 0, 0);
            myblock.Text     = x.name;

            Expander myexp = new Expander();

            myexp.Header     = x.name;
            myexp.Padding    = new Thickness(5, 0, 0, 0);// Lock at this....
            myexp.FontSize   = 25;
            myexp.Background = GetSectionBrush(x.color);

            myexp.Header = myblock;
            return(myexp);
        }
        public async Task <bool> Create(string title, string description)
        {
            if (title == null || description == null)
            {
                return(false);
            }

            var section = new ForumSection
            {
                Tittle      = title,
                Description = description
            };

            db.Add(section);

            await db.SaveChangesAsync();

            return(true);
        }
Exemplo n.º 19
0
        private static void Initialize()
        {
            if (!_initialized)
            {
                lock (_lock)
                {
                    if (!_initialized)
                    {
                        try
                        {
                            ForumSection section = ConfigurationManager.GetSection("lionsguard/forum") as ForumSection;
                            if (section != null)
                            {
                                _providers = new ForumProviderCollection();
                                ProvidersHelper.InstantiateProviders(section.Providers, _providers, typeof(ForumProvider));
                                _provider = _providers[section.DefaultProvider];
                                if (_provider == null)
                                {
                                    throw new ConfigurationErrorsException("Default ForumProvider not found in application configuration file.", section.ElementInformation.Properties["defaultProvider"].Source, section.ElementInformation.Properties["defaultProvider"].LineNumber);
                                }

                                if (!String.IsNullOrEmpty(section.BoardName))
                                {
                                    _boardName = section.BoardName;
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            _initException = ex;
                        }
                        _initialized = true;
                    }
                }
            }
            if (_initException != null)
            {
                throw _initException;
            }
        }
Exemplo n.º 20
0
        public async Task AllAsyncShouldReturnCorrectAnswerAndOrderedProperly()
        {
            //Arrange
            var dbOptions = new DbContextOptionsBuilder<UndergroundStationDbContext>()
                .UseInMemoryDatabase("UndergroundStationTestDb")
                .Options;

            var db = new UndergroundStationDbContext(dbOptions);

            var sectionsService = new SectionsService(db);

            var firtSection = new ForumSection
            {
                Id = 1,
                Tittle = "b"
            };

            var secondSection = new ForumSection
            {
                Id = 2,
                Tittle = "a"
            };

            db.AddRange(firtSection, secondSection);

            await db.SaveChangesAsync();

            //Act
            var result = await sectionsService
                .AllAsync();

            //Assert
            result
               .Should()
               .Match
               (r => r.ElementAt(0).Id == 2
               && r.ElementAt(1).Id == 1)
               .And
               .HaveCount(2);
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            thread = Convert.ToInt32(Request.QueryString["thread"]);
            NThreads = new List<ForumThread>();
            forumtitle = Request.QueryString["forum"];
            category = Request.QueryString["category"];
            section = Request.QueryString["section"];
            sectionid = Convert.ToInt32(Request.QueryString["sectionid"]);
            SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["globaldb"].ConnectionString);
            string q1 = "SELECT * FROM f_section where published=1 and SectionId="+sectionid; ;
            SqlCommand com1 = new SqlCommand(q1, con1);
            SqlDataReader rdr;
            sec = new ForumSection();
            //ForumThread thread = new ForumThread();
            con1.Open();
            rdr = com1.ExecuteReader();

            while(rdr.Read())
            {
                sec = new ForumSection();
                sec.SectionId = Convert.ToInt32(rdr["SectionId"]);
                sec.SectionTitle = rdr["SectionTitle"].ToString();
                sec.ThreadCount = Convert.ToInt32(rdr["ThreadCount"]);
                if (!(rdr["DateCreated"] == DBNull.Value))
                    sec.DateCreated = Convert.ToDateTime(rdr["DateCreated"]);
                if (!(rdr["DateModified"] == DBNull.Value))
                    sec.DateModified = Convert.ToDateTime(rdr["DateModified"]);
                //sec.CategoryId = this.CategoryId;
                sec.published = 1;
                if (!(rdr["DatePublished"] == DBNull.Value))
                    sec.DatePublished = Convert.ToDateTime(rdr["DatePublished"]);
                if (!(rdr["CreatorID"] == DBNull.Value))
                    sec.CreatorId = Convert.ToInt32(rdr["CreatorID"]);
                NThreads = sec.GetNThreads(thread, 30);
            }
            con1.Close();
        }
Exemplo n.º 22
0
 //增加军吧
 public void AddForumsection(ForumSection forumsess)
 {
     forumsess.ForumSectionTime = DateTime.Now;
     db.ForumSection.Add(forumsess);
     db.SaveChanges();
 }
Exemplo n.º 23
0
 public void UpdateForumsection(ForumSection forumsess)
 {
     db.Entry <ForumSection>(forumsess).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 24
0
 //军吧
 public static void AddForumsection(ForumSection forumsess)
 {
     pos.AddForumsection(forumsess);
 }
Exemplo n.º 25
0
 public static void UpdateForumsection(ForumSection forumsess)
 {
     pos.UpdateForumsection(forumsess);
 }
Exemplo n.º 26
0
 //populate sectionlist attribute from db
 public void GetPublishedSectionsFromDb()
 {
     SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["globaldb"].ConnectionString);
     string q1 = "SELECT * FROM f_section where Published=1 AND CategoryId=" + this.CategoryId;
     SqlCommand com1 = new SqlCommand(q1, con1);
     con1.Open();
     SqlDataReader rdr = com1.ExecuteReader();
     ForumSection sec;
     while (rdr.Read())
     {
         sec = new ForumSection();
         sec.SectionId = Convert.ToInt32(rdr["SectionId"]);
         sec.SectionTitle = rdr["SectionTitle"].ToString();
         sec.ThreadCount = Convert.ToInt32(rdr["ThreadCount"]);
         if (!(rdr["DateCreated"] == DBNull.Value))
             sec.DateCreated = Convert.ToDateTime(rdr["DateCreated"]);
         if (!(rdr["DateModified"] == DBNull.Value))
             sec.DateModified = Convert.ToDateTime(rdr["DateModified"]);
         sec.CategoryId = this.CategoryId;
         sec.published = 1;
         if (!(rdr["DatePublished"] == DBNull.Value))
             sec.DatePublished = Convert.ToDateTime(rdr["DatePublished"]);
         if (!(rdr["CreatorID"] == DBNull.Value))
             sec.CreatorId = Convert.ToInt32(rdr["CreatorID"]);
         SectionList.Add(new ForumSection(sec));
     }
     con1.Close();
 }
Exemplo n.º 27
0
        private static void _GetLatestPosts(ForumSection _ForumSection, Action <ForumPost> _RetPosts, ForumType _ForumType)
        {
            if ((DateTime.Now - _ForumSection.m_LastPollDatTime).TotalMinutes < 5)
            {
                return;
            }

            string website = _GetHTMLFile(_ForumSection.m_ForumSectionURL);

            if (_ForumType == ForumType.FeenixForum)
            {
                string[] websitePart = website.SplitVF("<td class='col_f_content '>");


                for (int i = 1; i < websitePart.Length; ++i)
                {
                    string currContent = websitePart[i].SplitVF("</td>", 2).First();
                    //<h4><a id="tid-link-66240" href="http://www.wow-one.com/forum/topic/66240-maintenance-notification-ed/" title='View topic, started  18 December 2013 - 08:27 AM' class='topic_title'>Maintenance Notification - ED</a></h4>
                    //<br />
                    //<span class='desc lighter blend_links'>
                    //Started by <a hovercard-ref="member" hovercard-id="36033" class="_hovertrigger url fn " href='http://www.wow-one.com/forum/user/36033-danut/'>Danut</a>, 18 Dec 2013
                    //</span>

                    string   topicName      = currContent.SplitVF("class='topic_title'>", 2).Last().SplitVF("</a>").First();
                    DateTime latestPostDate = DateTime.Now;
                    try
                    {
                        string dateStr = websitePart[i].SplitVF("page__view__getlastpost' title='Go to last post'>", 2).Last().SplitVF("</a>").First();
                        if (dateStr.StartsWith("Today") == true)
                        {
                            DateTime refDate = DateTime.Now;
                            latestPostDate = DateTime.Parse(dateStr.Replace("Today,", "" + refDate.Day + " " + refDate.ToString("MMM") + " " + refDate.Year));
                        }
                        else if (dateStr.StartsWith("Yesterday") == true)
                        {
                            DateTime refDate = DateTime.Now.AddDays(-1);
                            latestPostDate = DateTime.Parse(dateStr.Replace("Yesterday,", "" + refDate.Day + " " + refDate.ToString("MMM") + " " + refDate.Year));
                        }
                        else
                        {
                            latestPostDate = DateTime.Parse(dateStr);
                        }
                    }
                    catch (Exception)
                    {
                        latestPostDate = DateTime.Now;
                    }

                    string threadLink = currContent.SplitVF("href=\"", 2).Last().SplitVF("\"").First();
                    //http://www.wow-one.com/forum/topic/66240-maintenance-notification-ed/

                    if (threadLink.StartsWith("http://www.wow-one.com/forum/topic") == false)
                    {
                        continue;
                    }

                    if ((DateTime.Now - latestPostDate).TotalDays < 14)
                    {
                        _ForumSection.UpdateThread(threadLink, threadLink + "page__view__getlastpost", latestPostDate, _RetPosts, _ForumType);
                    }

                    //topics.Add(Tuple.Create(System.Net.WebUtility.HtmlDecode(topicName), topicLink));
                }
            }
            else if (_ForumType == ForumType.KronosForum)
            {
                //Kronos forum is through RSS feed example: http://forum.twinstar.cz/external.php?type=RSS2&forumids=969
                try
                {
                    System.Xml.XmlDocument xmlDocument = new System.Xml.XmlDocument();
                    xmlDocument.LoadXml(website);
                    var rssNode = xmlDocument.DocumentElement;
                    if (rssNode.Name == "rss")
                    {
                        var channelNode = rssNode.FirstChild;
                        if (channelNode.Name == "channel")
                        {
                            for (int i = 0; i < channelNode.ChildNodes.Count; ++i)
                            {
                                if (channelNode.ChildNodes[i].Name == "item")
                                {
                                    ForumPost fPost = new ForumPost();
                                    fPost.m_PosterImageURL = "";
                                    var postNode = channelNode.ChildNodes[i];
                                    foreach (System.Xml.XmlElement node in postNode.ChildNodes)
                                    {
                                        if (node.Name == "title")
                                        {
                                            fPost.m_ThreadName = node.InnerText;
                                        }
                                        else if (node.Name == "content:encoded")
                                        {
                                            fPost.m_PostContent = ParsePostHTMLContent(node.InnerText.Replace("<![CDATA[", "").Replace("]]>", ""));
                                        }
                                        else if (node.Name == "link")
                                        {
                                            fPost.m_PostURL   = node.InnerText.Replace("?goto=newpost", "");
                                            fPost.m_ThreadURL = fPost.m_PostURL;
                                        }
                                        else if (node.Name == "pubDate")
                                        {
                                            fPost.m_PostDate = ParseDateString(node.InnerText, DateTime.MinValue);
                                        }
                                        else if (node.Name == "dc:creator")
                                        {
                                            fPost.m_PosterName = node.InnerText;
                                        }
                                    }

                                    if (fPost.m_ThreadName != "" && fPost.m_PostContent != "" &&
                                        fPost.m_ThreadURL != "" && fPost.m_PosterName != "" && fPost.m_PostDate != DateTime.MinValue)
                                    {
                                        _ForumSection.UpdateThread(fPost, _RetPosts, _ForumType);
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception)
                {}
            }
            else if (_ForumType == ForumType.RSS_RealmPlayersForum || _ForumType == ForumType.RSS_NostalriusForum)
            {
                //RSS example: http://realmplayers.com:5555/feed.php?f=14
                //https://www.phpbb.com/support/docs/en/3.1/kb/article/faq-phpbb-atom-feeds/
                try
                {
                    System.Xml.XmlDocument xmlDocument = new System.Xml.XmlDocument();
                    xmlDocument.LoadXml(website);
                    var rssNode = xmlDocument.DocumentElement;
                    if (rssNode.Name == "feed")
                    {
                        for (int i = 0; i < rssNode.ChildNodes.Count; ++i)
                        {
                            if (rssNode.ChildNodes[i].Name == "entry")
                            {
                                var entryNode = rssNode.ChildNodes[i];

                                ForumPost fPost = new ForumPost();
                                foreach (System.Xml.XmlElement node in entryNode.ChildNodes)
                                {
                                    if (node.Name == "author")
                                    {
                                        if (node.FirstChild.Name == "name")
                                        {
                                            fPost.m_PosterName = node.FirstChild.InnerText.Replace("<![CDATA[", "").Replace("]]>", "");
                                        }
                                    }
                                    else if (node.Name == "published")
                                    {
                                        fPost.m_PostDate = ParseDateString(node.InnerText, DateTime.MinValue);
                                    }
                                    else if (node.Name == "link")
                                    {
                                        fPost.m_PostURL   = node.Attributes["href"].Value;
                                        fPost.m_ThreadURL = fPost.m_PostURL;
                                    }
                                    else if (node.Name == "title")
                                    {
                                        fPost.m_ThreadName = node.InnerText.Replace("<![CDATA[", "").Replace("]]>", "");
                                        fPost.m_ThreadName = fPost.m_ThreadName.SplitVF(" • ").Last();
                                    }
                                    else if (node.Name == "content")
                                    {
                                        fPost.m_PostContent = ParsePostHTMLContent(node.InnerText.Replace("<![CDATA[", "").Replace("]]>", ""));
                                    }
                                }

                                if (fPost.m_ThreadName != "" && fPost.m_PostContent != "" &&
                                    fPost.m_ThreadURL != "" && fPost.m_PosterName != "" && fPost.m_PostDate != DateTime.MinValue)
                                {
                                    _ForumSection.UpdateThread(fPost, _RetPosts, _ForumType);
                                }
                            }
                        }
                    }
                }
                catch (Exception)
                { }
            }
            else
            {
                string forumBaseURL = "http://forum.realmplayers.com/";
                if (_ForumType == ForumType.NostalriusForum)
                {
                    forumBaseURL = "http://forum.nostalrius.org/";
                }

                string[] websitePart = website.SplitVF("<dt title=\"");

                for (int i = 1; i < websitePart.Length; ++i)
                {
                    //string topicName = websitePart[i].SplitVF("class=\"topictitle\">", 2).Last().SplitVF("</a>").First();
                    string   dateStr        = websitePart[i].SplitVF("\"View the latest post\" /></a> <br />", 2).Last().SplitVF("</span>").First();
                    DateTime latestPostDate = ParseDateString(dateStr, DateTime.MinValue);

                    string threadLink = websitePart[i].SplitVF("<a href=\"", 2).Last().SplitVF("\" class", 2).First().SplitVF("&amp;sid=").First();

                    if (threadLink.StartsWith("./viewtopic.php?") == false)
                    {
                        continue;
                    }

                    DateTime createdThreadDate = ParseDateString(websitePart[i].SplitVF("&raquo; ", 2).Last().SplitVF("\n", 2).First(), DateTime.MinValue);

                    string lastPostLink = threadLink + websitePart[i].SplitVF("<dd class=\"lastpost\"", 2).Last().SplitVF(threadLink).Last().SplitVF("\"><img src=", 2).First();
                    if ((DateTime.Now - createdThreadDate).TotalDays < 14)
                    {
                        _ForumSection.UpdateThread(System.Net.WebUtility.HtmlDecode(threadLink.Replace("./viewtopic.php", forumBaseURL + "viewtopic.php")), System.Net.WebUtility.HtmlDecode(threadLink.Replace("./viewtopic.php", forumBaseURL + "viewtopic.php")), createdThreadDate, _RetPosts, _ForumType);
                    }
                    if ((DateTime.Now - latestPostDate).TotalDays < 14)
                    {
                        _ForumSection.UpdateThread(System.Net.WebUtility.HtmlDecode(threadLink.Replace("./viewtopic.php", forumBaseURL + "viewtopic.php")), System.Net.WebUtility.HtmlDecode(lastPostLink.Replace("./viewtopic.php", forumBaseURL + "viewtopic.php")), latestPostDate, _RetPosts, _ForumType);
                    }
                }
            }
            _ForumSection.m_LastPollDatTime = DateTime.Now;
        }
 public void Edit(ForumSection section)
 {
 }
 public void Delete(ForumSection section)
 {
 }