关于DZ专题触屏版访问的一些疑问-Discuz教程下载

关于DZ专题触屏版访问的一些疑问

开通本站Svip会员,全站资源免费下
  1. $file = 'portal/portal_topic_content:'.$topicid;
  2. $tpldirectory = '';
  3. $primaltplname = $topic['primaltplname'];
  4. if(strpos($primaltplname, ':') !== false) {
  5.         list($tpldirectory, $primaltplname) = explode(':', $primaltplname);
  6. }
  7. $topicurl = fetch_topic_url($topic);
  8. include template('diy:'.$file, NULL, $tpldirectory, NULL, $primaltplname);

  9. function portaltopicgetcomment($topcid, $limit = 20, $start = 0) {
  10.         global $_G;
  11.         $topcid = intval($topcid);
  12.         $limit = intval($limit);
  13.         $start = intval($start);
  14.         $data = array();
  15.         if($topcid) {
  16.                 $query = C::t('portal_comment')->fetch_all_by_id_idtype($topcid, 'topicid', 'dateline', 'DESC', $start, $limit);
  17.                 foreach($query as $value) {
  18.                         if($value['status'] == 0 || $value['uid'] == $_G['uid'] || $_G['adminid'] == 1) {
  19.                                 $data[$value['cid']] = $value;
  20.                         }
  21.                 }
  22.         }
  23.         return $data;
  24. }
复制代码
上面的的代码是portal_topic.php截取的,专题页面怎么改能访问到相应的手机页面而不改变原来的机制
关键就在于这一句:
  1. include template('diy:'.$file, NULL, $tpldirectory, NULL, $primaltplname);
复制代码
如果需要手机版也能访问专题,那就需要根据专题ID来判断写法:
亲爱的游客您好,请 登录 后进行 回复

全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部