Discuz!修改论坛的投票数据的方法

在数据库中找到 xxx_polloptions表

里面列出的就是你的投票选项。
其中:tid 是该投票贴的id
Votes 是投票总数
polloption 是投票选项title
Voterids 参与投票人的id

如果嫌一个一个打Voterids数值比较麻烦 可以找到论坛根目录下的forum/data/templates/1_1_viewthread_poll.tpl.php文件。

将其中的代码删掉即可(还得确定你写的id是否正确。否则页面上的总统计人数还是和Votes 总投票数不符合):

<div class="pollinfo">
<? if($multiple) { ?><strong>多选投票</strong><? if($maxchoices) { ?>: ( 最多可选 <?=$maxchoices?> 项 )<? } } else { ?><strong>单选投票</strong><? } if($visiblepoll && $allowVote) { ?>,投票后结果可见<? } ?>,共有 <?=$Voterscount?> 人参与投票
<? if(!$visiblepoll && ($overt || $adminid == 1)) { ?>
<a href="misc.PHP?action=viewVote&amp;tid=<?=$tid?>" onclick="showWindow('viewVote',this.href);doane(event);">查看投票参与人</a>
<? } ?>
</div>

补充: 另外将模板下面的viewthread_poll.htm一段代码删掉:

<div class="pollinfo">
<!--{if $multiple}--><strong>{lang poll_multiple}{lang thread_poll}</strong><!--{if $maxchoices}-->: ( {lang poll_more_than} )<!--{/if}--><!--{else}--><strong>{lang poll_single}{lang thread_poll}</strong><!--{/if}--><!--{if $visiblepoll && $allowVote}-->,{lang poll_after_result}<!--{/if}-->,{lang poll_Voterscount}
<!--{if !$visiblepoll && ($overt || $adminid == 1)}-->
<a href="misc.PHP?action=viewVote&tid=$tid" onclick="showWindow('viewVote',this.href);doane(event);">{lang poll_view_Voters}</a>
<!--{/if}-->
</div>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索