返回列表 发帖
楼主: 湖中沉

X3.5简易兼容X3.4及之前的模板方案

 火..

20

主题

442

回帖

911

积分

应用开发者

贡献
23 点
金币
184 个
QQ
发表于 2023-1-17 19:01:07 | 显示全部楼层
科站网 发表于 2023-1-17 13:02
配色模板反而是可以直接兼容

最要命的是之前应用没加单引号,导致页面报错
有偿服务QQ:2050094712
一个主题全部应用  https://addon.dismall.com/?@57900.developer
回复 支持 反对

使用道具 举报

18

主题

3910

回帖

7179

积分

应用开发者

贡献
344 点
金币
1398 个
QQ
 楼主| 发表于 2023-1-17 19:04:39 | 显示全部楼层
onetheme 发表于 2023-1-17 19:01
最要命的是之前应用没加单引号,导致页面报错

这种属于PHP标准要求的问题,PHP的标准越来越严格了
回复 支持 反对

使用道具 举报

2

主题

3

回帖

10

积分

初学乍练

贡献
0 点
金币
5 个
发表于 2023-1-17 19:14:26 | 显示全部楼层
谢谢老大的教程!
回复 支持 反对

使用道具 举报

20

主题

442

回帖

911

积分

应用开发者

贡献
23 点
金币
184 个
QQ
发表于 2023-1-17 19:24:54 | 显示全部楼层
X3.4及以下版块模板common文件中使用了common.css,还应在common.css最下面添加如下css


  1. img, svg { vertical-align: bottom; }
  2.         @font-face { font-family: "dzicon"; src: url('{IMGDIR}/dzicon.eot'); src: url('{IMGDIR}/dzicon.eot?#iefix') format('eot'), url('{IMGDIR}/dzicon.woff2') format('woff2'), url('{IMGDIR}/dzicon.woff') format('woff'); font-weight: normal; font-style: normal; }
  3.         [class^="fico-"]:before, [class*=" fico-"]:before { font-family: "dzicon"; font-style: normal; font-weight: normal; speak: none; display: inline-block; text-decoration: inherit; width: 1em; margin-right: .2em; text-align: center; font-variant: normal; text-transform: none; line-height: 1em; font-size: 120%; }
  4.         /* font icon size */
  5.         .fic4 { font-size: 14px; }.fic6 { font-size: 16px; }.fic8 { font-size: 18px; }
  6.         /* flip x */
  7.         .fifx::before { transform: scale(-1,1); }
  8.         /* font rotate */
  9.         @keyframes dzrotate{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}
  10.         .ficr { margin-right: .2em; }.ficr:before { margin-right: 0; animation: dzrotate 2s infinite linear; }
  11.         .loadicon { background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23999' d='M12.2 12.2L14 14H9V9l1.8 1.8c.7-.7 1.2-1.7 1.2-2.8 0-1.9-1.3-3.4-3-3.9v-2c2.8.4 5 2.9 5 5.9 0 1.6-.7 3.1-1.8 4.2zM3.8 3.8C2.7 4.8 2 6.3 2 8c0 3 2.2 5.4 5 5.9v-2.1c-1.7-.4-3-2-3-3.9 0-1.1.5-2.1 1.2-2.8L7 7V2H2l1.8 1.8z'/%3e%3c/svg%3e"); display: inline-block; width: 16px; height: 16px; animation: dzrotate 1.2s infinite linear; }
  12.         /* font color primary/secondary/notice/light/alarm/valid/invalid */
  13.         .fc-p { color: {MENUBGCOLOR}; } .fc-s { color: #999; } .fc-n { color: #7DA0CC; } .fc-l { color: #FF9C00; } .fc-a { color: #F26C4F; } .fc-v { color: #7CBE00; } .fc-i { color: #FF512C; } .fc-t { color: transparent; }
  14.         /* no margin right */
  15.         .fnmr:before { margin-right: 0; }
  16. /* font icon图标列表,供用户调用 */
  17. .fico-person:before{content:"\f100";}
  18. .fico-search:before{content:"\f101";}
  19. .fico-account_box:before{content:"\f102";}
  20. .fico-account:before{content:"\f102";}
  21. .fico-home:before{content:"\f103";}
  22. .fico-assessment:before{content:"\f104";}
  23. .fico-widthfixed:before{content:"\f105";}
  24. .fico-widthauto:before{content:"\f106";}
  25. .fico-styleselect:before{content:"\f107";}
  26. .fico-add_circle:before{content:"\f108";}
  27. .fico-add:before{content:"\f108";}
  28. .fico-remove_circle:before{content:"\f109";}
  29. .fico-remove:before{content:"\f109";}
  30. .fico-rss_feed:before{content:"\f10a";}
  31. .fico-rss:before{content:"\f10a";}
  32. .fico-refresh:before{content:"\f10b";}
  33. .fico-delete:before{content:"\f10c";}
  34. .fico-comment:before{content:"\f10d";}
  35. .fico-edit:before{content:"\f10e";}
  36. .fico-push:before{content:"\f10f";}
  37. .fico-thumbup:before{content:"\f110";}
  38. .fico-thumbdown:before{content:"\f111";}
  39. .fico-collection:before{content:"\f112";}
  40. .fico-activitysm:before{content:"\f113";}
  41. .fico-share:before{content:"\f114";}
  42. .fico-check_right:before{content:"\f115";}
  43. .fico-error:before{content:"\f116";}
  44. .fico-info:before{content:"\f117";}
  45. .fico-qq:before{content:"\f118";}
  46. .fico-email:before{content:"\f119";}
  47. .fico-task:before{content:"\f11a";}
  48. .fico-scrolltop:before{content:"\f11b";}
  49. .fico-replyfast:before{content:"\f11c";}
  50. .fico-list:before{content:"\f11d";}
  51. .fico-follow:before{content:"\f11e";}
  52. .fico-friendadd:before{content:"\f11f";}
  53. .fico-mypost:before{content:"\f120";}
  54. .fico-interactive:before{content:"\f121";}
  55. .fico-settings:before{content:"\f122";}
  56. .fico-link:before{content:"\f123";}
  57. .fico-up:before{content:"\f124";}
  58. .fico-down:before{content:"\f125";}
  59. .fico-left:before{content:"\f126";}
  60. .fico-right:before{content:"\f127";}
  61. .fico-valid:before{content:"\f128";}
  62. .fico-invalid:before{content:"\f129";}
  63. .fico-stars:before{content:"\f12a";}
  64. .fico-sun:before{content:"\f12b";}
  65. .fico-star3:before{content:"\f12b";}
  66. .fico-moon:before{content:"\f12c";}
  67. .fico-star2:before{content:"\f12c";}
  68. .fico-star:before{content:"\f12d";}
  69. .fico-star1:before{content:"\f12d";}
  70. .fico-checkbox:before{content:"\f12e";}
  71. .fico-checked:before{content:"\f12f";}
  72. .fico-doing:before{content:"\f130";}
  73. .fico-volume:before{content:"\f131";}
  74. .fico-image:before{content:"\f132";}
  75. .fico-attachment:before{content:"\f133";}
  76. .fico-thread:before{content:"\f134";}
  77. .fico-clock:before{content:"\f135";}
  78. .fico-lock:before{content:"\f136";}
  79. .fico-print:before{content:"\f137";}
  80. .fico-help:before{content:"\f138";}
  81. .fico-launch:before{content:"\f139";}
  82. .fico-imgadjust:before{content:"\f13a";}
  83. .fico-vote:before{content:"\f13b";}
  84. .fico-reward:before{content:"\f13c";}
  85. .fico-vs:before{content:"\f13d";}
  86. .fico-group:before{content:"\f13e";}
  87. .fico-cart:before{content:"\f13f";}
  88. .fico-headset:before{content:"\f140";}
  89. .fico-phone:before{content:"\f141";}
  90. .fico-place:before{content:"\f142";}
  91. .fico-camera:before{content:"\f143";}
  92. .fico-voice:before{content:"\f144";}
  93. .fico-bell:before{content:"\f145";}
  94. .fico-loading:before{content:"\f146";}
  95. .fico-poke:before{content:'\f146';}
  96. .fico-profile:before{content:'\f147';}
  97. .fico-dropdown:before{content:'\f148';}
  98. .fico-ban:before{content:'\f149';}
  99. .fico-tag:before{content:'\f14a';}
复制代码
解决多处图标不显示
赞 
发表于 2023-1-17 19:28

评分

参与人数 1金币 +5 收起 理由
老周部落 + 5 很给力!

查看全部评分

有偿服务QQ:2050094712
一个主题全部应用  https://addon.dismall.com/?@57900.developer
回复 支持 2 反对 0

使用道具 举报

TaC

80

主题

480

回帖

605

积分

自成一派

贡献
4 点
金币
11 个
发表于 2023-1-17 19:27:01 | 显示全部楼层
先看看,真是好人呀
回复 支持 反对

使用道具 举报

16

主题

202

回帖

320

积分

炉火纯青

贡献
2 点
金币
57 个
发表于 2023-1-17 19:37:42 | 显示全部楼层
学习一下。
回复

使用道具 举报

TaC

80

主题

480

回帖

605

积分

自成一派

贡献
4 点
金币
11 个
发表于 2023-1-17 19:51:27 | 显示全部楼层
我来跟进一下楼主的修改,升级3.5后,模板适用问题,我折腾了好长时间。根据论坛上高手指点,下面把我遇到的问题,高手指点解决的方法,总结一下。

1,升级3.5后,管理员无法打开论坛板块链接。
根据高手指点,删除了:template\当前使用模板名\forum\discuz.htm(或discuz.php),搜索下面代码删除!
<!--{if $_G['group']['radminid'] == 1}-->
        <!--{eval helper_manyou::checkupdate();}-->
<!--{/if}-->

1.1,后来发现,问题掉了个,管理员能发布内容,可普通会员无法发布内容。论坛onetheme指点:
找到下面文件,备份,删除!如果删除没啥影响就直接删了不用了,如果发现有影响和X3.5的post.htm对比,缺啥代码补啥

  • template\当前使用模板名\forum\post.htm(或post.php)


根据他的思路,对比这二个文件,在文件页大约12行发现少了:

        var postminsubjectchars = parseInt('$_G['setting']['minsubjectsize']');
        var postmaxsubjectchars = parseInt('$_G['setting']['maxsubjectsize']');
就加上了这二行,测试,正常。

2,论坛中无法显示在线会员图像。通过查找复制图片链接时发现,图片地址重复。
     这个问题楼主已讲了,就是去掉{STATICURL}image/common/  这段图片链接


3,会员表态图片不显示。
   科站网给的指点:文件所在目录:template/default或者你使用的模板/home
                                           文件:space_click.htm或space_click.php
   查看后,发现,同样是图片链接错误,对比修正一下,正常。


回复 支持 反对

使用道具 举报

18

主题

3910

回帖

7179

积分

应用开发者

贡献
344 点
金币
1398 个
QQ
 楼主| 发表于 2023-1-17 19:55:06 | 显示全部楼层
本帖最后由 湖中沉 于 2023-1-17 20:00 编辑
TaC 发表于 2023-1-17 19:51
我来跟进一下楼主的修改,升级3.5后,模板适用问题,我折腾了好长时间。根据论坛上高手指点,下面把我遇到 ...

大部分修改是对的,但一些原因不对,你这个最好还是不要轻易指导别人,可能存在引起错误操作的可能。
回复 支持 反对

使用道具 举报

TaC

80

主题

480

回帖

605

积分

自成一派

贡献
4 点
金币
11 个
发表于 2023-1-17 20:06:47 | 显示全部楼层
湖中沉 发表于 2023-1-17 19:55
大部分修改是对的,但一些原因不对,你这个最好还是不要轻易指导别人,可能存在引起错误操作的可能。 ...

呵,看到你发布了模板适配修正方法,所以把近时间折腾的问题总结一下。
模板作者不同,可能出现问题的地方有所不一样,但思路可以给人家根据自己的问题查找。
回复 支持 反对

使用道具 举报

18

主题

3910

回帖

7179

积分

应用开发者

贡献
344 点
金币
1398 个
QQ
 楼主| 发表于 2023-1-17 20:09:52 | 显示全部楼层
TaC 发表于 2023-1-17 20:06
呵,看到你发布了模板适配修正方法,所以把近时间折腾的问题总结一下。
模板作者不同,可能出现问题的地 ...

不,原因不太正确,比如你的第一条,那是漫游残留。

专业的事情交给专业的人去做,不然到时候谁根据你的帖子做了什么,出什么问题,骂的也是你,所以好心建议如果自己不是擅长技术方面且确定的操作,尽量不要轻易推荐。毕竟现在骂娘的人可多了
回复 支持 反对

使用道具 举报

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

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-4-26 21:33 , Processed in 0.044002 second(s), 7 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表