网站建设设为首页收藏本站

二亩地专业建站/网站制作建设公司

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 2653|回复: 0
打印 上一主题 下一主题

做网站如何使arc支持也支持current [复制链接]

跳转到指定楼层
楼主
孟思 发表于 2016-12-14 10:31:34 |只看该作者 |倒序浏览
  目前,网站建设行业中,用织梦做网站的人也越来越多。当中可能会遇到很多问题。今天说一下

  当网站建设类似于关于我们多篇文章时,需要高亮功能的话如何实现。
  $channelid = $ctag->GetAtt('channelid');
  在下面插入:
  $currentstyle = $ctag->GetAtt('currentstyle');
  2、查找:
  return lib_arclistDone
  (
  $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
  $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
  $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
  $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
  $tagid,$pagesize,$isweight
  );
  替换为:
  return lib_arclistDone
  (
  $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
  $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
  $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
  $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
  $tagid,$pagesize,$isweight,$currentstyle
  );
  其实就是在调用函数的最后加了一个$currentstyle实参
  3、查找
  function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
  $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
  $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N')
  替换为:
  function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
  $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
  $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='',$order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0,$isweight='N',$currentstyle='')
  其实就是在函数后面加了一个$currentstyle=''形参
  4、查找
  $row['textlink'] = "[url=file:///D:/Users/Administrator/Desktop/%E7%BD%91%E7%BB%9C%E7%BC%96%E8%BE%91%E8%B6%85%E7%BA%A7%E5%B7%A5%E5%85%B7%E7%AE%B1/lib/%22.$row[]".$row['title']."[/url]";
  在下面插入:
  if($currentstyle && $row['id']==$arcid){
  $currentstyle = str_replace('~typelink~', $row['filename'], $currentstyle);
  $row['currentstyle'] = str_replace('~typename~', $row['title'], $currentstyle);
  }
  保存,即可。
  调用方法:
  {dede:arclist titlelen='42' row='10' currentstyle="
~typename~"}
  [field:array runphp='yes']
  if(@me['currentstyle']){
  @me = @me['currentstyle'];
  }else{
  @me = "
[url=file:///D:/Users/Administrator/Desktop/%E7%BD%91%E7%BB%9C%E7%BC%96%E8%BE%91%E8%B6%85%E7%BA%A7%E5%B7%A5%E5%85%B7%E7%AE%B1/lib/%7B@me[]{@me['title']}[/url]";
  }
  [/field:array]
  {/dede:arclist}

分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏0

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册


扫描添加微信

Archiver|手机版|二亩地专业建站/网站制作建设公司 ( 冀ICP备13016078号-2 )  网站地图 冀公网安备 13010402001120号

GMT+8, 2024-5-7 06:33 , Processed in 0.015513 second(s), 19 queries .

回顶部