将博CMS论坛

注册

 

发新话题 回复该主题

请教,这个是要怎么弄呢。 [复制链接]

1#
我想把这个弄成可以 发网址的,但是提交的时候冒出这个错误。老大可以帮忙看看不,要咋整呀。
如下图:




分享 转发
TOP
2#

联系群里的“小野”可进行功能的定制!
TOP
3#

哎,求爹找娘的!
终于自己意外的给弄了。
就为了这么一句代码。
if (ContentFirstPage.StartsWith("http://") || ContentFirstPage.StartsWith("https://"))
return;
TOP
4#

解决方法,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));
                    }
                }
            }
        }
TOP
发新话题 回复该主题