Abstimmung wordpress: Unterschied zwischen den Versionen
Aus Wikizone
| Zeile 1: | Zeile 1: | ||
| − | verwendet bei Mascha im Blog intern: | + | Wordpress Extension Yop Poll - verwendet bei Mascha im Blog intern: |
| − | |||
| − | |||
| − | |||
| − | |||
| + | == yop poll Anpassungen == | ||
| + | Da bei einem custom text field bei der fragesstellung nur einzeiliger text möglich war, musst die datei | ||
| + | /wp-content/plugins/yop-poll/inc/yop_poll_model.php | ||
angepasst werden. | angepasst werden. | ||
| − | |||
In Zeile 2877 | In Zeile 2877 | ||
| − | + | Orginal: | |
| + | <pre> | ||
$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 ); | $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 ); | ||
| + | </pre> | ||
| + | ersetzten durch: | ||
| + | <pre> | ||
| + | $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 ); | ||
| + | </pre> | ||
| − | |||
| − | + | In der datenbank die Tabelle: | |
| + | kas_wp_yop_poll_votes_custom_fields | ||
| + | Feld: custom_field_value | ||
| − | + | von varchar (255) auf Text geändert. | |
== Abfrage für Antworten mit Kommentar == | == Abfrage für Antworten mit Kommentar == | ||
| − | + | <pre> | |
SELECT * | SELECT * | ||
FROM `kas_wp_yop_poll_logs` | 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` | 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 | WHERE `kas_wp_yop_poll_logs`.`poll_id` =13 | ||
| − | + | </pre> | |
| − | |||
| − | + | == Neue Umfrage Erstellen == | |
| + | === Vorlagen für Mascha === | ||
| + | Vorlagen erstellen: | ||
| + | === Ablauf der Umfrage === | ||
| + | === Auswertung der Umfrage === | ||
Version vom 15. Juli 2014, 09:59 Uhr
Wordpress Extension Yop Poll - verwendet bei Mascha im Blog intern:
yop poll Anpassungen
Da bei einem custom text field bei der fragesstellung nur 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:
kas_wp_yop_poll_votes_custom_fields
Feld: custom_field_value
von varchar (255) auf Text geändert.
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
Neue Umfrage Erstellen
Vorlagen für Mascha
Vorlagen erstellen: