Due to the large amount of article content, dede has a very practical function in the system which is to automatically paginate articles. This function can be said to be very thoughtfully set up.
However, a problem occurred while using it. How to solve the problem? Generally speaking, I first go to the dede forum and search to see if there are any relevant solutions. I searched a lot of articles related to automatic paging, but the problem has not been completely solved. Maybe there are some version problems or patches.
I am using the 4.0 rcl version. The complete solution is as follows:
First, insert this code in the content page template (if it does not exist in the content page template) {dede:pagebreak/}, directly insert it in {dede:field name='body'/}.
Then you can try using the automatic paging function to see if the problem is solved (probably not, hehe). If not, go to the next step
Modify the file dede/article_description_action.php. Open the file and find the following code
The following is the quoted content:
/----------------------------
//Update automatically Pagination
//---------------------------------
if($dojob=='page'){
require_once(dirname( __FILE__)."/inc/inc_archives_functions.php");
//Total number of statistical records
if($totalnum==0){
$addquery = " where ID>0 ";
if($sid!=0) $ addquery = " And ID>='$sid' ";
if($eid!=0) $addquery = " And ID $row = $dsql->GetOne("Select count (*) as dd From $table $addquery");
$totalnum = $row['dd'];
}
//Get records and analyze
if($totalnum > $startdd+$pagesize) $limitSql = " limit $startdd,$pagesize";
else if(($totalnum-$startdd)>0) $limitSql = " limit $startdd,".($totalnum - $startdd);
else $limitSql = "";
$tjnum = $startdd;
if($limitSql!=""){
$addquery = " where ID>0 ";
if($sid!=0) $addquery = " And ID>='$sid' "; F if ($ EID! = 0) $ addqury =" and ID & lt; = '$ EID' ";
$ FQuery =" Select Aid, $ Field from $ table $ limitsql; ""; & gt ;SetQuery($fquery);
$dsql->Execute(); $aid = $row['aid'];
if(strlen($body) //Update automatic paging
//------------------ ----------
if($dojob=='page'){
require_once(dirname(__FILE__)."/inc/inc_archives_functions.php");
//统计记录总数
if($totalnum==0){
$addquery = " where aID>0 ";
if($sid!=0) $addquery .= " And aID>='$sid' ";
if($eid!=0) $addquery .= " And aID $row = $dsql->GetOne("Select count(*) as dd From $table $addquery");
$totalnum = $row['dd'];
}
//获取记录,并分析
if($totalnum > $startdd+$pagesize) $limitSql = " limit $startdd,$pagesize";
else if(($totalnum-$startdd)>0) $limitSql = " limit $startdd,".($totalnum - $startdd);
else $limitSql = "";
$tjnum = $startdd;
if($limitSql!=""){
$addquery = " where aID>0 ";
if($sid!=0) $addquery .= " And aID>='$sid' ";
if($eid!=0) $addquery .= " And aID $fquery = "Select aid,$field From $table $addquery $limitSql ;";
$dsql->SetQuery($fquery);
$dsql->Execute();
while($row=$dsql->GetArray())
{
$tjnum++;
$body = $row[$field];
$aid = $row['aid'];
if(strlen($body) if(!preg_match("/#P#/iU",$body)){
$body = SpLongBody($body,$cfg_arcautosp_size*1024,"#P#分页标题#E#");
$body = addslashes($body);
$dsql->ExecuteNoneQuery("Update $table set $field='$body' where aid='$aid' ; ");
}
}
}//end if limit
然后保存上传。问题应该可以完全解决。
看了某些网友写的出现此问题的原因是在数据表中没有发现id字段。只有aid字段,修改即可。
更多相关文章请关注PHP中文网(www.php.cn)!

dedecms增加多语言的方法:1、进入dedecms后台,创建封面栏目;2、将封面栏目“常规选项”的文件保存目录设置为cn或者en;3、将封面栏目“高级选项”的列表模板设置为“cn_index.htm”或者“en_index.htm”;4、单独调用每种语言的封面栏目和每种语言下的导航栏目即可。

织梦cms是用PHP语言写的。织梦CMS(DedeCMS)是一个PHP开源网站管理系统,作用是构建中小型网站;它采用PHP+MySQL技术开发,可同时使用于windows、linux、unix平台。

dedecms是PHP语言开发的;dedecms中文全称是织梦内容管理系统,是一个PHP开源网站管理系统;dedecms基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms删除栏目的方法:1、登录后台管理;2、进入“栏目管理”,可以看到当前网站所有栏目;3、选择要删除的栏目;4、将鼠标悬停在栏目名称上,删除栏目;5、点击“确认”按钮以继续删除操作;6、删除成功。

织梦内容管理系统(DedeCMS) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步。

dedecms有移动端,其移动端安装方法是:1、将DATA移到根目录外的安全设置,修改“/m/index.php”代码;2、在“更新主页HTML”中,将“选择主页模板”改为“default/index_m.htm”;3、将首页“图文资讯”的url修改为移动端链接;4、设置移动站可通过二级域名访问即可。

火车头dedecms出现乱码解决方法:1、检查数据库编码;2、修改dedecms配置文件;3、检查浏览器编码设置;4、清理缓存和临时文件;5、寻求专业帮助。

dedecms是指织梦内容管理系统,是一个PHP开源网站管理系统,用于个人网站或中小型门户的构建;dedecms是基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
