Seite 4 von 5

Verfasst: 03.06.2005 11:18
von Mänu
Ne, immer noch dasselbe mit dem Umfragen beantworten...

Verfasst: 03.06.2005 11:43
von Markus67
Hi ...

letzter Versuch ... danach streck ich die Flügel ...

suche in der posting.php:

Code: Alles auswählen

         if ( !($row = $db->sql_fetchrow($result2)) ) 
         { 

           for($i = 0; $i < $max_voting; $i++) 
           { 
             $vote_option_id = $vbn[$i]; 


            $sql = "UPDATE " . VOTE_RESULTS_TABLE . " 
               SET vote_result = vote_result + 1 
               WHERE vote_id = $vote_id 
                  AND vote_option_id = $vote_option_id"; 
            $vote_option_id = '' 
            if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) 
            { 
               message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql); 
            } 

           } 
ersetze mit:

Code: Alles auswählen

           for($i = 0; $i < $max_voting; $i++) 
           { 
             $vote_option_id = $vbn[$i]; 

            $sql = "UPDATE " . VOTE_RESULTS_TABLE . " 
               SET vote_result = vote_result + 1 
               WHERE vote_id = $vote_id 
                  AND vote_option_id = $vote_option_id"; 
            $vote_option_id = '' 
            if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) 
            { 
               message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql); 
            } 
		   }
          } 
Markus

Verfasst: 03.06.2005 11:47
von Mänu
Ich finde diese Zeilen in der posting.php nicht?


edit: hatte noch ne falsche posting.php
Parse error: parse error, unexpected T_IF in /home/www/web291/html/forum/posting.php on line 865
bekomme immer noch die fehlermeldung, kannst deine flügel ausbreiten,
ich bau den heute nochmal aus und wieder ein...melde mich wieder, sonst lass ichs... :(

Verfasst: 03.06.2005 13:21
von Markus67
Hi ...

du kannst auch den hier mal versuchen
Multiple Choice Voting

Markus

Verfasst: 03.06.2005 14:04
von Mänu
Okay, danke, werd den bei gelegenheit mal versuchen einzubauen...

Verfasst: 03.06.2005 14:39
von Mänu
Nachdem ich den SQL Befehl ausgeführt habe, bekam ich folgende Fehlermeldung beim Einbau des Multiple Choice Voting Hacks

SQL-Befehl
ALTER TABLE phpbb_vote_desc ADD vote_choice tinyint(1) not null;
INSERT INTO phpbb_config VALUES ('multiple_voting', '0');


Fehlermeldung
Fehler
SQL-Befehl:

ALTER TABLE phpbb_vote_desc ADD vote_choice tinyint( 1 ) NOT NULL
MySQL meldet:

#1060 - Duplicate column name 'vote_choice'

Verfasst: 03.06.2005 15:38
von Mänu
Okay, hab die zeile in der phpbb_config manuell hinzugefügt...
jetzt habe ich ein weiteres problem (war ja nichts anderes zu erwarten)
ich kann noch keine mehrfachen auswahlen machen...
wenn ich im acp auf die konfiguration gehe und die Zeile:
"Erlaube mehrere Antworten in Umfragen" auf "Ja" setze, behält er das "Ja" nicht, sondern schaltet nach dem speichern wieder auf das "Nein" zurück...

Verfasst: 06.06.2005 08:58
von Mänu
Weiss einer weiter? :(

Verfasst: 06.06.2005 09:19
von Markus67
Hi ...

schau mal in der entsprechenden tpl-Datei nach ob da alles stimmt.
Vermutlich die board_config_body.tpl

Markus

Verfasst: 06.06.2005 09:32
von Mänu
Das hier ist das einzige was ich ändern musste und das ist auch geändert...


#
#-----[ OPEN ]----------------------------------------------
#

templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]----------------------------------------------
#

<tr>
<td class="row1">{L_MAX_POLL_OPTIONS}</td>
<td class="row2"><input class="post" type="text" name="max_poll_options" size="4" maxlength="4" value="{MAX_POLL_OPTIONS}" /></td>
</tr>

#
#-----[ AFTER, ADD ]----------------------------------------------
#

<tr>
<td class="row1">{L_MULTIPLE_VOTING}</td>
<td class="row2"><input type="radio" name="multiple_voting" value="1" {S_VOTE_MULTIPLE} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="multiple_voting" value="0" {S_VOTE_SINGLE} /> {L_NO}</td>
</tr>
Kann es sein dass ich den SQL-Eintrag in der phpbb_config falsch eingetragen habe, so dass es mir dies nicht auf dem Wert "ja" speichern kann?