dedecms列表页分页效果变形的问题解决
我们在dedecms做模板时候,列表页有<li>代码,会引起页面变形
这个修改具体是要修改arc.archives.class.php于arc.listview.class.php文件
以下附件是V5.6UTF8版本修改后的文件
arc.archives.class.php
<?php
if(!defined('DEDEINC'))
{
exit("Request Error!");
}
require_once(DEDEINC."/typelink.class.php");
require_once(DEDEINC."/channelunit.class.php");
require_once(DEDEINC."/downmix.inc.php");
require_once(DEDEINC.'/ftp.class.php');
@set_time_limit(0);
class Archives
{
var $TypeLink;
var $ChannelUnit;
var $dsql;
var $Fields;
var $dtp;
var $ArcID;
var $SplitPageField;
var $SplitFields;
var $NowPage;
var $TotalPage;
var $NameFirst;
var $ShortName;
var $FixedValues;
var $TempSource;
var $IsError;
var $SplitTitles;
var $PreNext;
var $addTableRow;
var $ftp;
var $remoteDir;
//php5构造函数
function __construct($aid)
{
global $dsql,$ftp;
$this->IsError = false;
$this->ArcID = $aid;
$this->PreNext = array();
$this->dsql = $dsql;
$query = "Select channel,typeid from `zuimoban_arctiny` where id='$aid' ";
$arr = $this->dsql->GetOne($query);
if(!is_array($arr))
{
$this->IsError = true;
}
else
{
if($arr['channel']==0) { $arr['channel']=1; }
$this->ChannelUnit = new ChannelUnit($arr['channel'],$aid);
$this->TypeLink = new TypeLink($arr['typeid']);
if($this->ChannelUnit->ChannelInfos['issystem']!=-1)
{
$query = "Select arc.*,tp.reid,tp.typedir,ch.addtable
from `zuimoban_archives` arc
left join zuimoban_arctype tp on tp.id=arc.typeid
left join zuimoban_channeltype as ch on arc.channel = ch.id
where arc.id='$aid' ";
$this->Fields = $this->dsql->GetOne($query);
}
else
{
$this->Fields['title'] = '';
$this->Fields['money'] = $this->Fields['arcrank'] = 0;
$this->Fields['senddate'] = $this->Fields['pubdate'] = $this->Fields['mid'] = $this->Fields['adminid'] = 0;
$this->Fields['ismake'] = 1;
$this->Fields['filename'] = '';
}
if($this->TypeLink->TypeInfos['corank'] > 0 && $this->Fields['arcrank']==0)
{
$this->Fields['arcrank'] = $this->TypeLink->TypeInfos['corank'];
}
$this->Fields['tags'] = GetTags($aid);
$this->dtp = new DedeTagParse();
$this->dtp->SetRefObj($this);
$this->SplitPageField = $this->ChannelUnit->SplitPageField;
$this->SplitFields = '';
$this->TotalPage = 1;
$this->NameFirst = '';
$this->ShortName = 'html';
$this->FixedValues = '';
$this->TempSource = '';
$this->ftp = &$ftp;
$this->remoteDir = '';
if(empty($GLOBALS['pageno']))
{
$this->NowPage = 1;
}
else
{
$this->NowPage = $GLOBALS['pageno'];
}
//特殊的字段数据处理
$this->Fields['aid'] = $aid;
$this->Fields['id'] = $aid;
$this->Fields['position'] = $this->TypeLink->GetPositionLink(true);
$this->Fields['typeid'] = $arr['typeid'];
//设置一些全局参数的值
foreach($GLOBALS['PubFields'] as $k=>$v)
{
$this->Fields[$k] = $v;
}
//为了减少重复查询,这里直接把附加表查询记录放在 $this->addTableRow 中,在 ParAddTable() 不再查询
if($this->ChannelUnit->ChannelInfos['addtable']!='')
{
$query = "SELECT * FROM `{$this->ChannelUnit->ChannelInfos['addtable']}` WHERE `aid` = '$aid'";
$this->addTableRow = $this->dsql->GetOne($query);
}
//issystem==-1 表示单表模型,单表模型不支持redirecturl这类参数,因此限定内容普通模型才进行下面查询
if($this->ChannelUnit->ChannelInfos['addtable']!='' && $this->ChannelUnit->ChannelInfos['issystem']!=-1)
{
if(is_array($this->addTableRow))
{
$this->Fields['redirecturl'] = $this->addTableRow['redirecturl'];
$this->Fields['templet'] = $this->addTableRow['templet'];
$this->Fields['userip'] = $this->addTableRow['userip'];
}
$this->Fields['templet'] = (empty($this->Fields['templet']) ? '' : trim($this->Fields['templet']));
$this->Fields['redirecturl'] = (empty($this->Fields['redirecturl']) ? '' : trim($this->Fields['redirecturl']));
$this->Fields['userip'] = (empty($this->Fields['userip']) ? '' : trim($this->Fields['userip']));
}
else
{
$this->Fields['templet'] = $this->Fields['redirecturl'] = '';
}
}//!error
}
//php4构造函数
function Archives($aid)
{
$this->__construct($aid);
}
//解析附加表的内容
function ParAddTable()
{
//读取附加表信息,并把附加表的资料经过编译处理后导入到$this->Fields中,以方便在模板中用 {dede:field name='fieldname' /} 标记统一调用
if($this->ChannelUnit->ChannelInfos['addtable']!='')
{
$row = $this->addTableRow;
if($this->ChannelUnit->ChannelInfos['issystem']==-1)
{
$this->Fields['title'] = $row['title'];
$this->Fields['senddate'] = $this->Fields['pubdate'] = $row['senddate'];
$this->Fields['mid'] = $this->Fields['adminid'] = $row['mid'];
$this->Fields['ismake'] = 1;
$this->Fields['arcrank'] = 0;
$this->Fields['money']=0;
$this->Fields['filename'] = '';
}
if(is_array($row))
{
foreach($row as $k=>$v) $row[strtolower($k)] = $v;
}
if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields))
{
foreach($this->ChannelUnit->ChannelFields as $k=>$arr)
{
if(isset($row[$k]))
{
if(!empty($arr['rename']))
{
$nk = $arr['rename'];
}
else
{
$nk = $k;
}
$cobj = $this->GetCurTag($k);
if(is_object($cobj))
{
foreach($this->dtp->CTags as $ctag)
{
if($ctag->GetTagName()=='field' && $ctag->GetAtt('name')==$k)
{
//带标识的专题节点
if($ctag->GetAtt('noteid') != '') {
$this->Fields[$k.'_'.$ctag->GetAtt('noteid')] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag);
}
//其它字段
else {
$this->Fields[$nk] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag);
}
}
}
}
else
{
$this->Fields[$nk] = $row[$k];
}
if($arr['type']=='htmltext' && $GLOBALS['cfg_keyword_replace']=='Y' && !empty($this->Fields['keywords']))
{
$this->Fields[$nk] = $this->ReplaceKeyword($this->Fields['keywords'],$this->Fields[$nk]);
}
}
}//End foreach
}
//设置全局环境变量
$this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];
@SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives');
}
//完成附加表信息读取
unset($row);
//处理要分页显示的字段
$this->SplitTitles = Array();
if($this->SplitPageField!='' && $GLOBALS['cfg_arcsptitle']='Y'
&& isset($this->Fields[$this->SplitPageField]))
{
$this->SplitFields = explode
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ(984818011)进行交流。
- 织梦dede首页列表页获取文章对应的tag标签
- 织梦dede导航栏目顶级和二级判断二级输出不同url
- 织梦dede标签array runphp静态生成乱码BUG解决方法
- 织梦dede如何禁止会员发布文章内容带超链接
- 织梦ajax跨域提交自定义表单和跨域验证码问题
- 织梦CMS MIP文章内容页图片适配百度MIP规范
- 织梦CMS时间格式实现XX秒前、XX分钟前、XX天前
- 织梦DedeCMS更新系统缓存增加清理沉余缓存的功能
- 织梦CMS让channelartlist标签支持currentstyle属性的
- 织梦dede自带编辑器替换百度ueditor编辑器
- 织梦DEDECMS整站动态化或整站静态化设置方法
- 织梦dede 模板路径templets目录都有什么?