请选择 进入手机版 | 继续访问电脑版

Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 732021|回复: 1

帖子点赞相关钩子不存在的解决方法

[复制链接]

主题

帖子

0

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
0
发表于 2015-11-10 21:24:54 | 显示全部楼层 |阅读模式
PC
viewthread_postbottom
template/default/forum/viewthread_node_body.htm
大概是287行,也就是
<!--{else}-->
                <div id="post_rate_div_$post[pid]"></div>
        <!--{/if}-->
        <!--{/if}-->
        <!--{hook/viewthread_postbottom $postcount}-->  <==这就是钩子
</div>

viewthread_title_extra
template/default/forum/viewthread.htm
大概是224行
<!--{/if}-->
                                        <a href="forum.php?mod=viewthread&tid=$_G[tid]$fromuid" {if $fromuid}title="{lang share_url_copy_comment}"{/if}>[{lang share_url_copy}]</a>
                                </span>
                                <!--{hook/viewthread_title_extra}-->  <==这就是钩子
                        </td>
                </tr>
        </table>

forumdisplay_thread_subject
template/default/forum/forumdisplay_list.htm
大概211行
                                                                                        - <span class="xi1">[{lang replycredit} <strong> $thread['replycredit']</strong> ]</span>
                                                                                <!--{/if}-->
                                                                                <!--{hook/forumdisplay_thread_subject $key}-->  <==这就是钩子
                                                                                <!--{if $thread[multipage]}-->
                                                                                        <span class="tps">$thread[multipage]</span>

forumdisplay_thread
template/default/forum/forumdisplay_list.htm
两处,分别是157和290行
                                                                                        <!--{/if}-->
                                                                                <!--{/if}-->
                                                                                <!--{hook/forumdisplay_thread $key}-->  <==这就是钩子
                                                                                $thread[typehtml] $thread[sorthtml]
                                                                                <!--{if $thread['moved']}-->


<h3 class="xw0">
                                                                        <!--{hook/forumdisplay_thread $key}-->  <==这就是钩子
                                                                        <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else}{/if} title="$thread[subject]">$thread[subject]</a>



手机/触屏版
viewthread_postbottom_mobile
template/default/touch/forum/viewthread.htm
大概是193行
                        <!--{/if}-->
       </div>
   </div>
   <!--{hook/viewthread_postbottom_mobile $postcount}-->  <==这就是钩子
   <!--{eval $postcount++;}-->
   <!--{/loop}-->

        <!--{subtemplate forum/forumdisplay_fastpost}-->


viewthread_bottom_mobile
template/default/touch/forum/viewthread.htm
大概是204行
</div>
<!-- main postlist end -->

$multipage

<!--{hook/viewthread_bottom_mobile}-->   <==这就是钩子

<script type="text/javascript">

+11181

最近谁赞过

回复

使用道具 举报

主题

帖子

0

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
0
 楼主| 发表于 2015-12-21 23:45:52 | 显示全部楼层
今天新发现一个用户论坛出现手机版无点赞图标,逐一分析代码后,发现为
template/*****_mobile_simple/touch/forum/viewthread.php   
第 71行附近的代码如下,缺少红色那一行,造成  在解析插件的时候,因为$postcount 默认为 null,所以无法匹配索引为0的插件内容,所以不能显示
<!-- more pagelist start -->
   <!--{eval $postcount = 0;}-->
<!--{loop $postlist $post}-->
+1412

最近谁赞过

回复 支持 412 反对 0

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|Comsenz Inc.  

GMT+8, 2024-4-19 02:40 , Processed in 0.093800 second(s), 34 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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