将博CMS论坛

首页 » 综合 » 技术交流 » 请教,这个是要怎么弄呢。
weiyezh - 2012/5/14 10:38:30
我想把这个弄成可以 发网址的,但是提交的时候冒出这个错误。老大可以帮忙看看不,要咋整呀。
如下图:

11


10
jumbot - 2012/5/15 10:02:03
联系群里的“小野”可进行功能的定制!
weiyezh - 2012/5/16 0:06:36
哎,求爹找娘的!
终于自己意外的给弄了。
就为了这么一句代码。
if (ContentFirstPage.StartsWith("http://") || ContentFirstPage.StartsWith("https://"))
return;
weiyezh - 2012/5/16 0:08:53
解决方法,DAL-->Module-->ArticleDAL.cs
增加下面的红色代码
public virtual void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
        {
            using (DbOperHandler _doh = new Common().Doh())
            {
                _doh.Reset();
                _doh.SqlCmd = "SELECT [Content],[FirstPage] FROM [jcms_module_article] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
                DataTable dtContent = _doh.GetDataTable();
                string ArticleContent = dtContent.Rows[0]["Content"].ToString();
                string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
                dtContent.Clear();
                dtContent.Dispose();
                if (ArticleContent != "")
                {
                    int pageCount = 1;
                    //处理文章内容分页
                    if (ArticleContent.Contains("[Jumbot_PageBreak]"))
                    {
                        string[] ContentArr = ArticleContent.Split(new string[] { "[Jumbot_PageBreak]" }, StringSplitOptions.RemoveEmptyEntries);
                        pageCount = ContentArr.Length;
                    }
                    if (ContentFirstPage.Length == 0)
                    {
                        _doh.Reset();
                        _doh.SqlCmd = "UPDATE [jcms_module_article] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
                        _doh.ExecuteSqlNonQuery();
                    }
                    //weiyezh
                    if (ContentFirstPage.StartsWith("http://") || ContentFirstPage.StartsWith("https://"))
                        return;
                  
                   //weiyezh
                    for (int j = 1; j < (pageCount + 1); j++)
                    {
                        JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
                    }
                }
            }
        }
1
查看完整版本: 请教,这个是要怎么弄呢。