[問題] 限制投票
版主: 版主管理群
暫時性的解決方式
這樣一來, 使用者的發文數需大於等於50篇才能投票\r
若發文數量少於設定值, 則會直接導回主題
話說回來, 這個想法可以拿來開發一個新mod
稍加擴充一下就可以針對每一個投票主題設定所需的文章數量
代碼: 選擇全部
#
#--------[ OPEN ]----------------
#
posting.php
#
#--------[ FIND ]----------------
#
//
// Vote in a poll
//
if ( !empty($HTTP_POST_VARS['vote_id']) )
#
#--------[ REPLACE WITH ]----------------
#
//
// Vote in a poll
//
if ( !empty($HTTP_POST_VARS['vote_id']) && $userdata['user_posts'] >= 50)
#
#--------[ CLOSE/SAVE ALL FILES ]----------------
#
# EoM若發文數量少於設定值, 則會直接導回主題
話說回來, 這個想法可以拿來開發一個新mod
稍加擴充一下就可以針對每一個投票主題設定所需的文章數量
那請先將上述的修改拆掉, 並改成底下的程式to_to 寫:謝謝你, 成功了, 但如困想加一個信息給用戶 "要五十個文章才可投票" 要怎樣改...
代碼: 選擇全部
#
#--------[ OPEN ]----------------
#
posting.php
#
#--------[ FIND ]----------------
#
//
// Vote in a poll
//
#
#--------[ AFTER ADD ]----------------
#
if ( $userdata['user_posts'] < 50 )
{
$message .= '您的發文數量必須超過 50 篇才能進行投票<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_ERROR, $message);
}
#
#--------[ SAVE/CLOSE ALL FILES ]----------------
#
# EoM不是很清楚有沒有這種modbc010843 寫:有辦法改成限定文章數達到多少才能進入某版面發文及回文嗎?
之前有找過mod不過該連結壞死了
抱歉離題了
不過你可以用auto_group及版面權限來達到相同的目的
MOD Name: auto group
Author: Niels Chr. Denmark
MOD Description: This mod will make it posible to add member to a user group, depending on there post count
This makes it posible to make a group "Everyone" (0 posts) where all members are members by default.
or a group like "Posters" (1 posts) where all users witch have posted are a member
this version also support MAX post count, so the users will be removed if they have more posts than required

