Discuz!大师网

搜索
查看: 1032|回复: 0

第三方模板门户文章页面添加文章tag显示修改方法

[复制链接]
发表于 2022-1-1 10:54:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
前言:由于Discuz!本身手机版没有门户文章页面,因此也就没有统一的文章页面手机版嵌入点,很多第三方模板实现了手机版文章页面,但是无法被插件作用到,因此需要手动修改一下模板;
本教程针对插件:https://addon.dismall.com/plugins/zqlj_arctag.html
其他插件问题,请自行咨询插件作者!
修改文件:template/你用的手机模板/touch/portal/view.htm (也有可能是view.php)
找到你想要加tag显示的位置,添加如下代码:

  1. <!-- tag start -->
  2. {eval
  3. $filepath=DISCUZ_ROOT.'./data/sysdata/cache_zqlj_arctag_'.$article[aid].'.php';
  4. if(file_exists($filepath))        @include_once $filepath;
  5. }
  6. <!--{if $list}-->
  7. <style>
  8. .ptg{padding-left: 20px;background: url(static/image/common/tag.gif) no-repeat 0 2px;}
  9. .ptg a {
  10.         font: 12px/1.5 Tahoma,Helvetica,'SimSun',sans-serif;
  11.     color: #369;
  12. }
  13. </style>
  14. <div class="ptg mbm mtn">
  15.         <!--{loop $list $k $tag}-->
  16.         <!--{eval $tagurl=$_G['siteurl'].'arctag-'.$tag['tagid'].'-1.html';}-->
  17.         <a title="{$tag['tagname']}" href="{$tagurl}" target="_blank">{$tag['tagname']}</a><!--{if $k!=count($list)-1}-->,<!--{/if}-->  
  18.         <!--{/loop}-->
  19. </div>
  20. <!--{/if}-->
  21. <!-- tag end -->
复制代码


回复 马甲回复

使用道具 举报

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

本版积分规则

QQ|网站地图|小黑屋|展会网|Discuz站长论坛 |天天打卡

GMT+8, 2024-4-29 19:45 , Processed in 0.024430 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表