destoon 首页怎么调用内容里的信息及图片

第一步:

打开 /include/tag.func.php

找到 isset($showpage) or $showpage = 0; 这句。

在其上行或其下行添上

(isset($showcontent) && $MODULE[$moduleid]['module']=='article') or $showcontent = 0; 

找到 $query = "SELECT ".$fields." FROM ".$table." WHERE ".$condition.$order." LIMIT ".$offset.",".$pagesize;这句。

第二步:

替换成:

if($showcontent){  $query = "SELECT t.".preg_replace('/,\s*/im','t.',$fields).",c.`content` FROM ".$table." as t left join ".preg_replace('/(\d+)$/','data_$1',$table)." as c on t.itemid=c.itemid WHERE ".$condition.$order." LIMIT ".$offset.",".$pagesize;}else{  $query = "SELECT ".$fields." FROM ".$table." WHERE ".$condition.$order." LIMIT ".$offset.",".$pagesize;}

第三步:

<!--{php $tags=tag("moduleid=".$m['moduleid']."&condition=status=3&length=40&showcontent=1&showcat=1&pagesize=20&order=addtime desc&template=null");}--> 

添加:

showcontent=1

第四步:

<ul>{loop $tags $i $t}<li><a title="{$t[title]}" src="" style="{$t[css]}">{$t[title]}<br/>{$t[content]}</a></li>{/loop}</ul>

{$t[content]} 就能调出来了

猜你喜欢

转载自blog.csdn.net/weixin_42694072/article/details/83784916
今日推荐