Abstimmung wordpress

Aus Wikizone
Wechseln zu: Navigation, Suche

verwendet bei Mascha im Blog intern:

yop poll


da bei einem custom text field bei der fragsestellung nur en einzeiliger text möglich war, musst die datei /wp-content/plugins/yop-poll/inc/yop_poll_model.php


angepasst werden.


In Zeile 2877

orginal: $temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-TEXT-INPUT%', '<input type="text" value="" name="yop_poll_customfield['.$custom_field['id'].']" id="yop-poll-customfield-'.$custom_field['id'].'" />', $temp_string );


ersetzten durch:

$temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-TEXT-INPUT%', '<textarea rows="4" cols="50" type="text" value="" name="yop_poll_customfield['.$custom_field['id'].']" id="yop-poll-customfield-'.$custom_field['id'].'"></textarea>', $temp_string );


In der datenbank die Tabelle:


== Abfrage für Antworten mit Kommentar


SELECT * FROM `kas_wp_yop_poll_logs` LEFT OUTER JOIN `kas_wp_yop_poll_votes_custom_fields` ON `kas_wp_yop_poll_logs`.`vote_id` = `kas_wp_yop_poll_votes_custom_fields`.`vote_id` WHERE `kas_wp_yop_poll_logs`.`poll_id` =13 kas_wp_yop_poll_votes_custom_fields

Feld: custom_field_value

von varchar (255) auf Text geändert.