欢迎光临建材之家JC68.COM
用户未登陆,请先 登录/注册!
分享好友 服务中心首页 服务中心分类 切换频道

论坛帖子列表页面调取帖子摘要

2014-02-250yao建材之家学院
打開/source/module/forum/forum_forumdisplay

  1. $threadids[$threadindex] = $thread['tid'];
复制代码


底下放
      

  1.         include_once libfile('function/post');
  2.         include_once libfile('function/attachment');
  3.         // $thread['post'] = C::t('forum_post')->fetch_all_by_tid($thread['posttableid'],$thread['tid'],true,'',0,0,true);
  4.         $thread['post'] = C::t('forum_post')->fetch_all_by_tid_position($thread['posttableid'],$thread['tid'],1);
  5.         $thread['post'] = array_shift($thread['post']);
  6.         // var_dump($thread['post']);
  7.         $thread['preview'] = messagecutstr($thread['post']['message'], 230);
复制代码


PS:數字可調整
打開/template/default/forum/forumdisplay_list.htm



  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} "atarget(this)"{/if} class="s xst">$thread[subject]</a>
复制代码



更改为
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else}"atarget(this)"{/if} class="s xst"><font color="#0033ff">$thread[subject]</font></a>
    <p class="thread_preview" style="padding-top: 10px; padding-bottom: 10px;">{$thread['preview']}【<a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else}"atarget(this)"{/if} class="s xst">阅读全文</a>】</p>
复制代码
【温馨提示】本文内容和观点为作者所有,本站只提供信息存储空间服务,如有涉嫌抄袭/侵权/违规内容请联系QQ:727533600删除!
举报
收藏 0
打赏 0
评论 0
更多您可能感兴趣的资讯
防止注册机批量发布信息的代码
修正步骤:1: 修正根目录下的config,增加一行:$pupu6date=md5(date('z')); 2:修改member模板header.htm找到发布,修改成: ahref={$MODULE[2][linkurl]}{$DT[file_my]}?mid={$v}action=addpupu6sid={$pupu6date}class=m发布/a 3:继续修改member模板中的my_sell.htm 在form之后加入一个inputname=pupu6sidtype=hidd

9482017-04-020评论

手机端mobileurl函数增加城市分类参数
mobileurl函数在include/global.func.php 858行共四个参数,moduleid-模型id,catid-分类id,itemid -文章id,page-页码function mobileurl($moduleid, $catid = 0, $itemid = 0, $page = 1) {if(RE_WRITE) return $moduleid.-.$catid.-.$itemid.-.$page..html;if($itemid) { return index.php?mod

9192017-03-100评论

建材之家各频道的功能和简介
网站频道 名称功能简介备注核心jc68.com基于PHP+MySQL,采用标准化开发,易用性、扩展性、标准性强会员member会员注册、登录,在线销售,企业推广,结交商友,获取商机公司companyVIP等级体系、实名认证体系、自动二级、顶级域名精美商铺商城mall支持购物车、在线购买,卖家评论打分、交易记录,订单管理暂未启用供应sell产

9812017-01-060评论

如何控制微信分享网页时,展示的标题,描述和图片
如何控制微信分享网页时,展示的标题,描述和图片在需要被微信分享的页面中,加入下面这一段JS代码就可以进行控制了。var imgUrl = 'http://xxx/share_ico.png';// 分享后展示的一张图片var lineLink = 'http://xxx'; // 点击分享后跳转的页面地址var descContent = xx!;// 分享后的描述信息var shareTitle = 'xx';// 分享

18262016-03-310评论

LuManager 经验总结大汇
☆ 当安装失败时,用以下方法卸载,再安装rm -rf /usr/local/php* /usr/local/LuNamp然后再用源码装一次☆ 删除单个组件先删除旧的PHP:rm -rf /usr/local/php然后再执行一下LuNamp/code/php/php.sh文件便可(该文件从LuNamp_last.tar.gz解压得到)☆ 查看文件夹大小 du -sh ./pgsql_data☆ 用以下命令查看访问IP及端口情况

24362015-11-080评论

JC68系统多表联合标签的写法
Destoon B2B建站系统多表联合标签的写法在使用Destoon B2B建站系统开发网站时,很多时候会遇到写标签的时候需要调用多个表的内容,

11522014-10-060评论

更多相关产品信息

0成交¥0.00

南京市鼓楼区中北交通设施销售中心道路划线南京道路划线公路标线各种道路划线

0成交¥1.00

南京市鼓楼区中北交通设施销售中心南京停车场车位划线

0成交¥1.00

南京市鼓楼区中北交通设施销售中心南京地下车库交通器材 地库交通设施 设计出图安装全服务

0成交¥8.00

南京达尊道路标线有限公司南京达尊道路标线公司提供交通标线的划分咨询

0成交¥0.00

南京市鼓楼区中北交通设施销售中心道路划线南京道路划线公路标线各种道路划线

0成交¥1.00

南京市鼓楼区中北交通设施销售中心南京停车场车位划线

0成交¥1.00

南京市鼓楼区中北交通设施销售中心南京地下车库交通器材 地库交通设施 设计出图安装全服务

0成交¥8.00

南京达尊道路标线有限公司南京达尊道路标线公司提供交通标线的划分咨询
输入关键词搜索更多
更多城市地区全国城市联盟