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

在数据库中找到 xxx_polloptions表。里面列出的就是你的投票选项。
其中:tid 是该投票贴的id
votes 是投票总数
polloption 是投票选项title
voterids 参与投票人的id
如果嫌一个一个打voterids数值比较麻烦 可以找到论坛根目录下的forumdata/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>

相关文章

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注