Seite 1 von 1

Umfrageabstimmende anzeigen

Verfasst: 11.07.2011 21:17
von Die Mathematik
Hallo gibt es einen Mod mit dem man als Administrator sehen kann, wer bei einer Umfrage was abgestimmt hat?

Re: Umfrageabstimmende anzeigen

Verfasst: 12.07.2011 18:52
von DreamPromise
Öffne viewtopic.php

suche:
#########################################################################################################################
$poll_info[$i]['poll_option_text'] = bbcode_nl2br($poll_info[$i]['poll_option_text']);
$poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
#########################################################################################################################



danach einfügen
#########################################################################################################################
/* Begin 'Show voters' MOD by Ernst Vaarties */
$sql_voters = '
SELECT username, vote_user_id
FROM ' . POLL_VOTES_TABLE . ', ' . USERS_TABLE . '
WHERE topic_id = ' . $topic_id . '
AND poll_option_id = ' . $poll_info[$i]['poll_option_id'] . '
AND ' . POLL_VOTES_TABLE . '.vote_user_id = ' . USERS_TABLE . '.user_id
ORDER BY username ASC, vote_user_id ASC';

$results_voters = $db->sql_query($sql_voters);
$voters_total = 0;
$voters_string = "";

// Add all voters to a string.
while ($row_voters = $db->sql_fetchrow($results_voters))
{
$voters_total = $voters_total + 1;
$voters_string = $voters_string . ", " . $row_voters['username'];
}

// Is the total nr of voters <> the nr of votes for the poll? Add this to the same string.
if ($voters_total <> $poll_info[$i]['poll_option_total'])
{
$voters_string = $voters_string . ", <> " . ($poll_info[$i]['poll_option_total'] - $voters_total);
}

$voters_string = ltrim($voters_string, ", ");

// Add the string to the list.
$poll_info[$i]['poll_option_voters'] = $voters_string;
$db->sql_freeresult($results_voters);
/* End 'Show voters' MOD by Ernst Vaarties */
#########################################################################################################################




suche:
#########################################################################################################################
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false)
#########################################################################################################################

davor einfügen:
#########################################################################################################################
'POLL_OPTION_VOTERS' => $poll_option['poll_option_voters'],
#########################################################################################################################



ÖFFNE viewtopic_body.html

SUCHE:
#########################################################################################################################
<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF -->
#########################################################################################################################


Ersetze mit:
#########################################################################################################################
<!-- ELSEIF U_ACP -->
{poll_option.POLL_OPTION_PERCENT}
<dd class="resultbar">
{poll_option.POLL_OPTION_VOTERS}
</dd>
<!-- ENDIF -->

Re: Umfrageabstimmende anzeigen

Verfasst: 12.07.2011 18:54
von Die Mathematik
Das werde ich bald mal ausprobieren. Erst mal warten bis die Serverprobleme bei meinem Anbieter vorbei sind und, dann kann ich mich arum kümmern. Ich wollte sowieso den Annieter wechseln. :evil: :ugeek:

Re: Umfrageabstimmende anzeigen

Verfasst: 15.07.2011 13:40
von EagleEye
Hallo,

hat das nun einer mal getestet?
Wenn das funktioniert,würde ich das bei mir auch einbauen.

Gruß EagleEye

Re: Umfrageabstimmende anzeigen

Verfasst: 15.07.2011 13:47
von DreamPromise
klar hab ich das bei mir eingebaut .. funktioniert super.

Re: Umfrageabstimmende anzeigen

Verfasst: 15.07.2011 14:36
von Die Mathematik
Gut, ich bin gerade im Urlaub und kann nur auf das IPad zugreifen. Das mache ich, dann zu Hause, da muss ich mir keine Gedanken machen.