1、安装点赞插件


2、选择某个模块,安装到具体的模块里面,如news模块

image.png

3、然后发布一篇文章,在访问文章详情页面,就可以点赞了

image.png


自定义模板show.html调用代码可以在默认模板中复制:

 <a href="javascript:dr_module_digg('{MOD_DIR}', '{$id}', 1);" class="icon-btn">
                                                <i class="fa fa-thumbs-o-up"></i>
                                                <div> 有帮助 </div>
                                                <span class="badge badge-danger" id="module_digg_{$id}_1"> {intval($support)} </span>
                                            </a>
                                            <a href="javascript:dr_module_digg('{MOD_DIR}', '{$id}', 0);" class="icon-btn">
                                                <i class="fa fa-thumbs-o-down"></i>
                                                <div> 没帮助 </div>
                                                <span class="badge badge-danger" id="module_digg_{$id}_0"> {intval($oppose)} </span>
                                            </a>

需要提前引入模板关键js文件