PHPWIND[民间论坛]数据搬迁导致丢失严重,用户数据基本全部损坏,十分遗憾来自phpwind.me的远古记忆

9.0手机Wap版论坛版块默认图标+文章分享

爱黎平网 离线 9.2K阅读 12回复 于 2014-07-01 16:39 发布在 技术文献
昨天装上PW9.0 Wap版后,发现版块图标没法显示,后看了篇帖子http://www.phpwind.me/r/173的解决方案,还是没法解决我的问题,因为我的版块没有自定义的图标,想延续web版的样式,有新回复,为蓝色,否则为灰色图标。
1、默认图标修改
(1)、修改template\3g\forum_list_table.htm
源码为:
<hook-action name="one_across" args="cateForum,forumList">
  <ul class="list">
    <!--#foreach ($forumList as $_id => $_item) {
$_class = $_item['icon'] ? '' : ($_item['todayposts'] > 0 ? 'new' : 'old');
#-->
    <li><a href="{@url:3g/thread/run?fid=$_id}"><img alt="forumlogo" src="{@Pw::getPath($_item['icon'])}" class="forumlogo"> <b class="tit">{@$_item['name']|html}</b>
    <span class="count">主题:{$_item['threads']} | 帖子:<!--#echo $_item['threads'] + $_item['posts'];#--></span>
    <!--#if ($_item['todayposts']) {#-->
      <span class="num">{$_item['todayposts']}</span><!--#}#--></a> </li>
    <!--#}#-->
  </ul>
</hook-action>
修改后:

<hook-action name="one_across" args="cateForum,forumList">
  <ul class="list">
    <!--#foreach ($forumList as $_id => $_item) {
$_class = $_item['icon'] ? '' : ($_item['todayposts'] > 0 ? 'new' : 'old');
#-->
    <li class="{$_class}"><a href="{@url:3g/thread/run?fid=$_id}">
    <!--#if($_item['icon']) {#-->
    <img alt="forumlogo" src="{@Pw::getPath($_item['icon'])}" class="forumlogo">
    <!--#}#-->
    <b class="tit">{@$_item['name']|html}</b>
    <span class="count">主题:{$_item['threads']} | 帖子:<!--#echo $_item['threads'] + $_item['posts'];#--></span>
    <!--#if ($_item['todayposts']) {#-->
      <span class="num">{$_item['todayposts']}</span><!--#}#--></a> </li>
    <!--#}#-->
  </ul>
</hook-action>

(2)、修改themes\site\default\css\build\3g.css themes\site\default\css\dev\3g.css
在87行后面
.forum_group .list li { height: 50px; border-bottom: 1px dashed #ccc; padding: 5px 0; }
加入下面的样式代码
.forum_group .list li.old, .forum_group .list li.new {padding:0 0 0 35px; height:50px;}
.forum_group .list li.new {background:url(../../images/3g/new.gif) 0 center no-repeat}
.forum_group .list li.old {background:url(../../images/3g/old.gif) 0 center no-repeat}

(3)上传布标new.gif和old.gif到themes\site\default\images\3g
这个两个文件在这个路径下可以找到themes\site\default\images\forum

(4)覆盖更新以上修改的文件,后端更新网站缓存,刷新就可以看到下面的效果了

图片:20140701155117.jpg




2、文章分享
加这个功能的原因是,为了方便分享一些文章到微信的朋友圈,也许可以通过检测是移动终端访问自动跳转到wap版来实现,没去研究,就用最直接的方式吧,这个方法之前在官方论坛也写过一篇帖子,这里就简单写一点,详细的请看这个教程http://www.phpwind.net/read/3150900
(1)、从加网获取到代码(uid=xxxx,这个xxxx是在加网注册的账号ID),例如:
<!-- JiaThis Button BEGIN -->
<div class="jiathis_style_24x24">
    <a class="jiathis_button_qzone"></a>
    <a class="jiathis_button_tsina"></a>
    <a class="jiathis_button_tqq"></a>
    <a class="jiathis_button_weixin"></a>
    <a class="jiathis_button_renren"></a>
    <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
    <a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=xxxx" charset="utf-8"></script>
<!-- JiaThis Button END -->
(2)把这段代码添加到文件template\3g\read_floor.htm 的126行下面,记得在128行加上这两个样式clearfix mb5
<!--# if ($read['lou'] == 0) { #-->
  <!-- JiaThis Button BEGIN -->
  <div class="jiathis_style_24x24 clearfix mb5">
      <a class="jiathis_button_qzone"></a>
      <a class="jiathis_button_tsina"></a>
      <a class="jiathis_button_tqq"></a>
      <a class="jiathis_button_weixin"></a>
      <a class="jiathis_button_renren"></a>
      <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
      <a class="jiathis_counter_style"></a>
  </div>
  <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=xxxx" charset="utf-8"></script>
  <!-- JiaThis Button END -->
  <div class="read_appbtn_wrap"> 
    <!--# if (!$read['pid']) { #-->
    <a role="button" rel="nofollow" href="{@url:like/mylike/doLike}" data-tid="{$tid}" data-pid="{$read['pid']}" data-fid="{$fid}" class="icon_read_like J_like_btn J_qlogin_trigger" data-role="main" data-typeid="1" data-fromid="{$read['tid']}"> <span>喜欢</span><em class="J_like_count">{$read['like_count']}</em> </a> 
    <!--# } #-->
    <hook class='$threadDisplay' name='createHtmlContentBottom' args="array($read)" />
  </div>
(3)覆盖更新文件,清缓存,刷新,就会看到下面效果图了

图片:20140701161101.jpg

图片:20140701161140.jpg




图片:mmexport1404203590437.jpg

图片:mmexport1404202970183.jpg





附件是更新包,只包括修改版块图标的,分享如果需要的请安教程修改,很简单的

标签

附件

评论

12 最热 最新
游客
网赚之家
网赚之家
9年前 河南省新乡市
0
好棒好棒的。
cybo0o
cybo0o
9年前 山西省运城市
0
Willis
Willis
10年前 中国
0
好,牛人
yufeng52011
yufeng52011
10年前 重庆市
0
楼主能做个包直接出一个WAP版本方便我们这些小菜鸟安装么?
x891547912
x891547912
10年前 河北省邢台市
0
很不错
茶叶蛋
茶叶蛋
11年前 山西省太原市
0
这个功能太强大
phper163
phper163
11年前 安徽省合肥市
0
感谢分享,支持
celebrity99
celebrity99
11年前 广东省广州市番禺区
0
二级目录不能显示,楼主大人能改进下吗
yankunlin
yankunlin
11年前 福建省福州市
0
能改个8.7 就更好了。。。稀缺。。。
董宝中
董宝中
11年前 中国
0
感谢你对PW的大力支持!
叫你调皮
叫你调皮
11年前 河北省张家口市
0
NB 必须支持! 更加完善了手机客户端。。
D.J.
D.J.
11年前 山西省太原市
0
优秀风格\插件,送分~~!