Hi Leute
Ich habe mal zum Einbau des Mods ne Frage :
So wie in folgender Anleitung zu ersehen , funzt das bei mir nicht
Huchinotte hat geschrieben:Hi ..........
styles\subsilver2\template\viewtopic_body.html
Find:
Replace with:
Code: Alles auswählen
<!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{poll_option.POLL_OPTION_PERCENT}
<!-- ELSE -->
<span>
<select style="font-size: xx-small;">
<option>{poll_option.POLL_OPTION_PERCENT}</option>
<option>--------------------</option>";
{poll_option.POLL_OPTION_VOTERS}
</select>
</span>
<!-- ENDIF -->
Ich habe in meiner Viewtopic_body.html folgendes stehen :
Code: Alles auswählen
<!-- BEGIN poll_option -->
<dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
<!-- IF S_CAN_VOTE --><dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS --><dd class="resultbar"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
<dd><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
</dl>
<!-- END poll_option -->
Setze ich es an die richtige Stelle lt. Anleitung hier, passiert nichts.
Das einzige er zeigt mir : db/sql Fehler an.
Dasselbe bei der viewtopic.php ,da steht folgendes :
Huchinotte hat geschrieben:Hi ........
Hab hier noch einen kleinen Mod, woher kann ich aber nicht mehr sagen ... glaub war auf phpbb.com. Einfach versuchen und deshalb gilt wie immer ..... vorher euere Daten zu sichern.
Mit diesem Snippet werden die User angezeigt die bei einer Umfrage abgestimmt haben. Übers ACP gibts damit nix einzustellen, ausserdem sehen nur Admins wer für was seine Stimme abgegeben hat, lässt sich aber ändern...
Alternativ gibts noch den
Code: Alles auswählen
Ö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 */
.
Bei mir sieht die Zeile folgendermaßen aus :
Code: Alles auswählen
$poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']); A
}
B
$topic_data['poll_title'] = censor_text($topic_data['poll_title']);
C
if ($poll_bbcode !== false)
D
Setze ich sie an die Stellen A,B,C oder D ??
Ich habe alle 4 ausprobiert und es geht nicht
Ich benutze die akt. Version : 3.0.8
Akt. Style : Chronicles ( basiert auf Subsilver 2 )
Würde mich freuen wenn mir da jemand helfen könnte..
Vielen Dank im Voraus
Lg DarkDevil