Everything else was successful. When I download the file containing the errors I see thisAdding acp module: acp/info/acp_polls_results.php
Fail
Can you please tell me what I did wrong?Advanced Show Poll Voters
PHP Version: 5.2.17
DBMS: MySQL 5.1.56
phpBB3 Version: 3.0.9
Adding acp module: acp/info/acp_polls_results.php
Fail
Code: Select all
'acl_f_poll_results' => array('lang' => 'You can see who voted in the polls','cat' => 'polls',),
Hello yammi2serenity15 wrote:i find solution
in you database find:
f_poll_results
and change number:
is_global: 1 to 0
and
is_local: o to 1
And you have permission in ACP/ Pools
Code: Select all
foreach ($voted_id as $option)
{
if (in_array($option, $cur_voted_id))
{
continue;
}
$sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
SET poll_option_total = poll_option_total + 1
WHERE poll_option_id = ' . (int) $option . '
AND topic_id = ' . (int) $topic_id;
$db->sql_query($sql);
if ($user->data['is_registered'])
{
$sql_ary = array(
'topic_id' => (int) $topic_id,
'poll_option_id' => (int) $option,
'vote_user_id' => (int) $user->data['user_id'],
'vote_user_ip' => (string) $user->ip,
);
$sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
}
}
Code: Select all
foreach ($voted_id as $option)
{
if (in_array($option, $cur_voted_id))
{
continue;
}
$sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
SET poll_option_total = poll_option_total + 1
WHERE poll_option_id = ' . (int) $option . '
AND topic_id = ' . (int) $topic_id;
$db->sql_query($sql);
if ($user->data['is_registered'])
{
$sql_ary = array(
'topic_id' => (int) $topic_id,
'poll_option_id' => (int) $option,
'vote_user_id' => (int) $user->data['user_id'],
'vote_user_ip' => (string) $user->ip,
'vote_time' => time(), //Aenderungen hier
);
$sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
}
}
Code: Select all
'vote_time' => time("j. M Y, H:i"), //Aenderungen hier
(am 1. Jan 1970 01:00)
Code: Select all
foreach ($voted_id as $option)
{
if (in_array($option, $cur_voted_id))
{
continue;
}
$sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
SET poll_option_total = poll_option_total + 1
WHERE poll_option_id = ' . (int) $option . '
AND topic_id = ' . (int) $topic_id;
$db->sql_query($sql);
if ($user->data['is_registered'])
{
$sql_ary = array(
'topic_id' => (int) $topic_id,
'poll_option_id' => (int) $option,
'vote_user_id' => (int) $user->data['user_id'],
'vote_user_ip' => (string) $user->ip,
'vote_time' => time(), //Aenderungen hier
);
$sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
}
}