添加手机版淘帖插件按钮
mz
./template/rtj1009_app/touch/forum/viewthread.php
搜索
<!--{if $rtj1009_m_config['ren_view_topxx'] ==2 && !$post['anonymous']}-->
<!--{if (($_G['forum']['ismoderator'] && $_G['group']['alloweditpost'] && (!in_array($post['adminid'], array(1, 2, 3)) || $_G['adminid'] <= $post['adminid'])) || ($_G['forum']['alloweditpost'] && $_G['uid'] && ($post['authorid'] == $_G['uid'] && $_G['forum_thread']['closed'] == 0) && !(!$alloweditpost_status && $edittimelimit && TIMESTAMP - $post['dbdateline'] > $edittimelimit)))}-->其上添加
{if $post['first']}
<a href="#" class="open-popup ren_lc_gl" id="k_collect" style="width:auto">{lang pn_mobile_collection:collection}</a>
<script>
$('#k_collect').on('click', function() {
var obj = $(this);
$.ajax({
type:'GET',
url:'forum.php?mod=collection&action=edit&op=addthread&tid=$_G[tid]&mobile=2&handlekey=favbtn&inajax=1',
data:'',
dataType:'xml',
})
.success(function(s) {
popup.open(s.lastChild.firstChild.nodeValue);
})
.error(function(s) {
return false;
});
return false;
});
</script>
{/if}gy
viewthread_node.php里,找到
<span class="comiis_ordertype y">
其下添加
{if $post['first']}
<a href="#" class="popup blue" id="k_collect" style="width:auto;padding:0 10px;">{lang pn_mobile_collection:collection}</a>
<script>
$('#k_collect').on('click', function() {
var obj = $(this);
$.ajax({
type:'GET',
url:'forum.php?mod=collection&action=edit&op=addthread&tid=$_G[tid]&mobile=2&handlekey=favbtn&inajax=1',
data:'',
dataType:'xml',
})
.success(function(s) {
popup.open(s.lastChild.firstChild.nodeValue);
})
.error(function(s) {
return false;
});
return false;
});
</script>
{/if}