En las versiones anteriores a la 2.0.7 <- Recien liberada, existe un BUG al momento de crear una encuesta con mas de 4 opciones. El problema consiste en que si borramos algunas opciones, por ejemplo la 1ra y la 3ra, y si luego agreamos 2 nuevas opciones se desencaja cada una de las opciones.
Pues bien, lo he testeado y aplicando este fixe se soluciona este problema quedando todo perfecto.
Para aplicarlo tienen que editar el archivo posting.php, Buscar la linea 281 o bien buscar esta cadena de codigo:
Código: [Ocultar]
- if ( $post_data['first_post'] && $post_data['has_poll'] )
- {
- $sql = "SELECT *
- FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
- WHERE vd.topic_id = $topic_id
- AND vr.vote_id = vd.vote_id
- ORDER BY vr.vote_option_id";
- if ( !($result = $DB->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
- }
- $poll_options = array();
- $poll_results_sum = 0;
- if ( $row = $DB->sql_fetchrow($result) )
- {
- $poll_title = $row['vote_text'];
- $poll_id = $row['vote_id'];
- $poll_length = $row['vote_length'] / 86400;
- do
- {
- $poll_options[$row['vote_option_id']] = $row['vote_option_text'];
- $poll_results_sum += $row['vote_result'];
- }
- while ( $row = $DB->sql_fetchrow($result) );
- }
- $post_data['edit_poll'] = ( ( !$poll_results_sum || $is_auth['auth_mod'] ) && $post_data['first_post'] ) ? true : 0;
- }
Y reemplazarlo por este otro:
Código: [Ocultar]
- //solucion al BUG en el orden de las encuestas al editarlas
- if ( $post_data['first_post'] && $post_data['has_poll'] )
- {
- $sql = "SELECT *
- FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
- WHERE vd.topic_id = $topic_id
- AND vr.vote_id = vd.vote_id
- ORDER BY vr.vote_option_id";
- if ( !($result = $DB->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
- }
- $poll_options = array();
- $poll_results_sum = 0;
- if ( $row = $DB->sql_fetchrow($result) )
- {
- $poll_title = $row['vote_text'];
- $poll_id = $row['vote_id'];
- $poll_length = $row['vote_length'] / 86400;
- do
- {
- $poll_options[$row['vote_option_id']] = $row['vote_option_text'];
- $poll_results_sum += $row['vote_result'];
- }
- while ( $row = $DB->sql_fetchrow($result) );
- }
- $DB->sql_freeresult($result);
- $post_data['edit_poll'] = ( ( !$poll_results_sum || $is_auth['auth_mod'] ) && $post_data['first_post'] ) ? true : 0;
- }
- //fin solucion al BUG en el orden de las encuestas al editarlas
Saludos a todos, la informacion fue extraida de la web oficial.
Y luego fue testeada, aplicada y traducida por Debe estar registrado para ver este enlace.












