From 0434beb429700116e45c962b3a519116c28281f2 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 16 Aug 2009 16:54:11 -0400 Subject: [PATCH 1/2] work on queued transcripts --- classes/WhatDidTheySay.php | 6 ++++++ classes/WhatDidTheySayAdmin.php | 15 +++++++++++++++ what-did-they-say.php | 26 ++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/classes/WhatDidTheySay.php b/classes/WhatDidTheySay.php index 4e8758f..c6ec807 100644 --- a/classes/WhatDidTheySay.php +++ b/classes/WhatDidTheySay.php @@ -251,6 +251,12 @@ class WhatDidTheySay { return false; } } + + function get_languages() { + $options = get_option('what-did-they-say-options'); + + return $options['languages']; + } } ?> diff --git a/classes/WhatDidTheySayAdmin.php b/classes/WhatDidTheySayAdmin.php index bbfdc40..3e832bf 100644 --- a/classes/WhatDidTheySayAdmin.php +++ b/classes/WhatDidTheySayAdmin.php @@ -133,6 +133,21 @@ class WhatDidTheySayAdmin { } } } + + function handle_update_queue_transcript($queue_transcript_info) { + $updated = false; + if (current_user_can('submit_transcriptions')) { + var_dump($queue_transcript_info); + switch ($queue_transcript_info['action']) { + case 'submit_queued_transcript': + $result = $this->what_did_they_say->add_queued_transcription_to_post($queue_transcript_info['post_id'], $queue_transcript_info); + if ($result) { + $updated = __('Transcript added to queue.', 'what-did-they-say'); + } + } + } + return $updated; + } function handle_update_post_transcripts($post_transcript_info) { $updated = false; diff --git a/what-did-they-say.php b/what-did-they-say.php index 91942d0..b195443 100644 --- a/what-did-they-say.php +++ b/what-did-they-say.php @@ -112,4 +112,30 @@ function the_media_transcript_select_and_display($dropdown_message = null, $sing } } +function the_media_transcript_queue_editor() { + global $post, $what_did_they_say; + + if (current_user_can('submit_transcriptions')) { ?> +
+ + + +

+
+ + +
+ \ No newline at end of file From 1f5799f659c2ff5d489f19a0e519eb1d1c012923 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 18 Aug 2009 21:17:57 -0400 Subject: [PATCH 2/2] working on queueing transcripts --- classes/WhatDidTheySayAdmin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/WhatDidTheySayAdmin.php b/classes/WhatDidTheySayAdmin.php index 3e832bf..a0846e3 100644 --- a/classes/WhatDidTheySayAdmin.php +++ b/classes/WhatDidTheySayAdmin.php @@ -137,9 +137,9 @@ class WhatDidTheySayAdmin { function handle_update_queue_transcript($queue_transcript_info) { $updated = false; if (current_user_can('submit_transcriptions')) { - var_dump($queue_transcript_info); switch ($queue_transcript_info['action']) { case 'submit_queued_transcript': + var_dump($queue_transcript_info); $result = $this->what_did_they_say->add_queued_transcription_to_post($queue_transcript_info['post_id'], $queue_transcript_info); if ($result) { $updated = __('Transcript added to queue.', 'what-did-they-say');