aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/ecml/graphics/dailymotion.pngbin0 -> 179131 bytes
-rw-r--r--mod/ecml/graphics/googlemaps.pngbin0 -> 150177 bytes
-rw-r--r--mod/ecml/graphics/redlasso_1.pngbin0 -> 178296 bytes
-rw-r--r--mod/ecml/graphics/redlasso_2.pngbin0 -> 162730 bytes
-rw-r--r--mod/ecml/graphics/slideshare.pngbin0 -> 149631 bytes
-rw-r--r--mod/ecml/graphics/vimeo.pngbin0 -> 174545 bytes
-rw-r--r--mod/ecml/graphics/youtube.pngbin0 -> 158669 bytes
-rw-r--r--mod/ecml/languages/en.php24
-rw-r--r--mod/ecml/start.php24
-rw-r--r--mod/ecml/views/default/ecml/help/blip.tv.php12
-rw-r--r--mod/ecml/views/default/ecml/help/dailymotion.php12
-rw-r--r--mod/ecml/views/default/ecml/help/googlemaps.php12
-rw-r--r--mod/ecml/views/default/ecml/help/livevideo.php12
-rw-r--r--mod/ecml/views/default/ecml/help/redlasso.php13
-rw-r--r--mod/ecml/views/default/ecml/help/slideshare.php12
-rw-r--r--mod/ecml/views/default/ecml/help/vimeo.php12
-rw-r--r--mod/ecml/views/default/ecml/help/youtube.php12
-rw-r--r--mod/ecml/views/default/ecml/keyword_help.php18
-rw-r--r--mod/ecml/views/default/ecml/keywords/googlemaps.php2
-rw-r--r--mod/ecml/views/default/ecml/keywords/livevideo.php3
-rw-r--r--mod/ecml/views/default/embed/web_services/content.php11
21 files changed, 172 insertions, 7 deletions
diff --git a/mod/ecml/graphics/dailymotion.png b/mod/ecml/graphics/dailymotion.png
new file mode 100644
index 000000000..67950f81c
--- /dev/null
+++ b/mod/ecml/graphics/dailymotion.png
Binary files differ
diff --git a/mod/ecml/graphics/googlemaps.png b/mod/ecml/graphics/googlemaps.png
new file mode 100644
index 000000000..6e4d2f490
--- /dev/null
+++ b/mod/ecml/graphics/googlemaps.png
Binary files differ
diff --git a/mod/ecml/graphics/redlasso_1.png b/mod/ecml/graphics/redlasso_1.png
new file mode 100644
index 000000000..caf3ae4f6
--- /dev/null
+++ b/mod/ecml/graphics/redlasso_1.png
Binary files differ
diff --git a/mod/ecml/graphics/redlasso_2.png b/mod/ecml/graphics/redlasso_2.png
new file mode 100644
index 000000000..2c7ba64a0
--- /dev/null
+++ b/mod/ecml/graphics/redlasso_2.png
Binary files differ
diff --git a/mod/ecml/graphics/slideshare.png b/mod/ecml/graphics/slideshare.png
new file mode 100644
index 000000000..19ecd6b75
--- /dev/null
+++ b/mod/ecml/graphics/slideshare.png
Binary files differ
diff --git a/mod/ecml/graphics/vimeo.png b/mod/ecml/graphics/vimeo.png
new file mode 100644
index 000000000..ae8b4086f
--- /dev/null
+++ b/mod/ecml/graphics/vimeo.png
Binary files differ
diff --git a/mod/ecml/graphics/youtube.png b/mod/ecml/graphics/youtube.png
new file mode 100644
index 000000000..ed31af05a
--- /dev/null
+++ b/mod/ecml/graphics/youtube.png
Binary files differ
diff --git a/mod/ecml/languages/en.php b/mod/ecml/languages/en.php
index dfe6b3f50..41172f2fd 100644
--- a/mod/ecml/languages/en.php
+++ b/mod/ecml/languages/en.php
@@ -17,18 +17,38 @@ $english = array(
'ecml:views:annotation_generic_comment' => 'Comments',
// keywords
+ 'ecml:keywords:googlemaps' => 'Google Maps',
'ecml:keywords:googlemaps:desc' => 'Embed a Google Map.',
'ecml:keywords:googlemaps:usage' => '[googlemaps src="URL"] Use the link code from Google Maps as the src.',
+ 'ecml:keywords:slideshare' => 'Slide Share',
'ecml:keywords:slideshare:desc' => 'Embed a Slideshare slide.',
'ecml:keywords:slideshare:usage' => '[slideshare id="slideshare_id"] Use the Wordpress.com embed code.',
+ 'ecml:keywords:vimeo' => 'Vimeo',
'ecml:keywords:vimeo:desc' => 'Embed a Vimeo video.',
'ecml:keywords:videmo:usage' => '[videmo src="URL"] Use a standard Vimeo URL as the source.',
+ 'ecml:keywords:youtube' => 'YouTube',
'ecml:keywords:youtube:desc' => 'Embed a YouTube video.',
'ecml:keywords:youtube:usage' => '[youtube src="URL"] Use a standard YouTube URL as the source.',
+ 'ecml:keywords:blip.tv' => 'blip.tv',
+ 'ecml:keywords:blip.tv:desc' => 'Embed a blip.tv video.',
+ 'ecml:keywords:blip.tv:usage' => '[blip.tv ID] use the Wordpress.com embed code.',
+
+ 'ecml:keywords:dailymotion' => 'Daily Motion',
+ 'ecml:keywords:dailymotion:desc' => 'Embed a Daily Motion video.',
+ 'ecml:keywords:dailymotion:usage' => '[dailymotion src="URL"] Use a standard Daily Motion URL as the source.',
+
+ 'ecml:keywords:livevideo' => 'Live Video',
+ 'ecml:keywords:livevideo:desc' => 'Embed a Live Video video.',
+ 'ecml:keywords:livevideo:usage' => '[livevideo src="URL"] Use a standard livevideo URL as the source.',
+
+ 'ecml:keywords:redlasso' => 'Red Lasso',
+ 'ecml:keywords:redlasso:desc' => 'Embed a Red Lasso video.',
+ 'ecml:keywords:redlasso:usage' => '[redlasso id="URL"] Use the Wordpress.com embed code.',
+
// keyword help
'ecml:keywords_title' => 'Keywords',
'ecml:keywords_instructions' =>
@@ -65,6 +85,10 @@ grid below.
'ecml:admin:cannot_save_permissions' => 'Cannot save ECML permissions!',
'ecml:admin:restricted' => 'Restricted',
+ // embed support
+ 'ecml:embed:web_services' => 'Web Services',
+ 'ecml:embed:instructions' => 'Select a service for instructions on how to get embed code or paste the code in directly.',
+
);
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 1c1bbd3fd..68b9f7360 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -86,9 +86,25 @@ function ecml_init() {
* @param array $page
*/
function ecml_help_page_handler($page) {
- $content = elgg_view('ecml/help');
- $body = elgg_view_layout('one_column_with_sidebar', $content);
- echo page_draw(elgg_echo('ecml:help'), $body);
+ if (!isset($page[0]) || empty($page[0])) {
+ $content = elgg_view('ecml/help');
+ $body = elgg_view_layout('one_column_with_sidebar', $content);
+ echo page_draw(elgg_echo('ecml:help'), $body);
+ } else {
+ // asking for detailed help about a keyword
+ $keyword = $page[0];
+ $content = elgg_view('ecml/keyword_help', array('keyword' => $keyword));
+
+ if (get_input('ajax', FALSE)) {
+ echo $content;
+ exit;
+ } else {
+ $body = elgg_view_layout('one_column_with_sidebar', $content);
+ echo page_draw(elgg_echo('ecml:help'), $body);
+ }
+ }
+
+ return TRUE;
}
/**
@@ -261,7 +277,7 @@ function ecml_embed_web_services_hook($hook, $type, $value, $params) {
// we're using a view override for this section's content
// so only need to pass the name.
$value['web_services'] = array(
- 'name' => elgg_echo('embed:web_services')
+ 'name' => elgg_echo('ecml:embed:web_services')
);
return $value;
diff --git a/mod/ecml/views/default/ecml/help/blip.tv.php b/mod/ecml/views/default/ecml/help/blip.tv.php
new file mode 100644
index 000000000..f462ab1e0
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/blip.tv.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for blip.tv
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:blip.tv') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:blip.tv:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:blip.tv:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/blip.tv.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/dailymotion.php b/mod/ecml/views/default/ecml/help/dailymotion.php
new file mode 100644
index 000000000..de4add4ff
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/dailymotion.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for dailymotion
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:dailymotion') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:dailymotion:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:dailymotion:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/dailymotion.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/googlemaps.php b/mod/ecml/views/default/ecml/help/googlemaps.php
new file mode 100644
index 000000000..4e99b4c73
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/googlemaps.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for googlemaps
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:googlemaps') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:googlemaps:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:googlemaps:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/googlemaps.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/livevideo.php b/mod/ecml/views/default/ecml/help/livevideo.php
new file mode 100644
index 000000000..6f3244c45
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/livevideo.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for livevideo
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:livevideo') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:livevideo:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:livevideo:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/livevideo.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/redlasso.php b/mod/ecml/views/default/ecml/help/redlasso.php
new file mode 100644
index 000000000..ec51cbcd2
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/redlasso.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * ECML help for redlasso
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:redlasso') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:redlasso:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:redlasso:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/redlasso_1.png" />
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/redlasso_2.png" />
diff --git a/mod/ecml/views/default/ecml/help/slideshare.php b/mod/ecml/views/default/ecml/help/slideshare.php
new file mode 100644
index 000000000..860c70cfc
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/slideshare.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for youtube
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:slideshare') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:slideshare:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:slideshare:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/slideshare.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/vimeo.php b/mod/ecml/views/default/ecml/help/vimeo.php
new file mode 100644
index 000000000..24fd35e31
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/vimeo.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for vimeo
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:vimeo') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:vimeo:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:vimeo:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/vimeo.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/help/youtube.php b/mod/ecml/views/default/ecml/help/youtube.php
new file mode 100644
index 000000000..42febde2c
--- /dev/null
+++ b/mod/ecml/views/default/ecml/help/youtube.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * ECML help for youtube
+ */
+
+echo '<h3>' . elgg_echo('ecml:keywords:youtube') . '</h3>';
+echo '<p>' . elgg_echo('ecml:keywords:youtube:desc') . '</p>';
+echo '<p>' . elgg_echo('ecml:keywords:youtube:usage') . '</p>';
+
+?>
+
+<img src="<?php echo $vars['url']?>mod/ecml/graphics/youtube.png" /> \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keyword_help.php b/mod/ecml/views/default/ecml/keyword_help.php
new file mode 100644
index 000000000..6f9021fdd
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keyword_help.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Specific keyword help.
+ *
+ * Looks for a view ecml/help/keyword
+ *
+ */
+
+$keyword = elgg_get_array_value('keyword', $vars);
+$content = elgg_view("ecml/help/$keyword");
+
+if (!$keyword || !ecml_is_valid_keyword($keyword)) {
+ echo elgg_echo('ecml:help:invalid_keyword');
+} elseif (!$content) {
+ echo elgg_echo('ecml:help:no_help');
+} else {
+ echo $content;
+} \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keywords/googlemaps.php b/mod/ecml/views/default/ecml/keywords/googlemaps.php
index 4f31a4531..7e6608592 100644
--- a/mod/ecml/views/default/ecml/keywords/googlemaps.php
+++ b/mod/ecml/views/default/ecml/keywords/googlemaps.php
@@ -14,6 +14,8 @@ $width = (isset($vars['width'])) ? $vars['width'] : 425;
$height = (isset($vars['height'])) ? $vars['height'] : 350;
if ($src) {
+ $src = html_entity_decode($src);
+
$embed_src = elgg_http_add_url_query_elements($src, array('output' => 'embed'));
$link_href = elgg_http_add_url_query_elements($src, array('source' => 'embed'));
diff --git a/mod/ecml/views/default/ecml/keywords/livevideo.php b/mod/ecml/views/default/ecml/keywords/livevideo.php
index b067b1ab6..47e132aac 100644
--- a/mod/ecml/views/default/ecml/keywords/livevideo.php
+++ b/mod/ecml/views/default/ecml/keywords/livevideo.php
@@ -16,7 +16,8 @@ $height = (isset($vars['height'])) ? $vars['height'] : 369;
if ($src) {
$parts = explode('/', $src);
- $vid = $parts[1];
+ $vid = $parts[0];
+
// it automatically autostarts, but not passing it causes control issues
$url = "http://www.livevideo.com/flvplayer/embed/$vid&autoStart=1";
diff --git a/mod/ecml/views/default/embed/web_services/content.php b/mod/ecml/views/default/embed/web_services/content.php
index 42e9279c9..0f3fa330d 100644
--- a/mod/ecml/views/default/embed/web_services/content.php
+++ b/mod/ecml/views/default/embed/web_services/content.php
@@ -49,6 +49,8 @@ $embed = elgg_view('input/button', array(
'disabled' => TRUE
));
+echo '<p>' . elgg_echo('ecml:embed:instructions') . '</p>';
+echo '<div id="embed_ecml_keyword_help"></div>';
echo $input;
echo '<p>ECML: <span id="ecml_code"></span></p>';
echo $keywords_html;
@@ -70,7 +72,8 @@ $(function() {
// counter for paused input to try to validate/generate a preview.
var rest_timeout_id = null;
var rest_min_time = 750;
- var embed_generate_ecml_url = '<?php echo $vars['url']; ?>/pg/ecml_generate';
+ var embed_generate_ecml_url = '<?php echo $vars['url']; ?>pg/ecml_generate';
+ var embed_ecml_keyword_help_url = '<?php echo $vars['url']; ?>pg/ecml/';
var internal_name = '<?php echo addslashes($internal_name); ?>';
var web_services_ecml_update = function() {
@@ -161,8 +164,12 @@ $(function() {
// manually specify the service
$('.ecml_web_service a').click(function() {
- select_service($(this).attr('class'));
+ select_service($(this).attr('class').split(' ')[0]);
manual_selected_service = true;
+
+ // show tip
+ var help_url = embed_ecml_keyword_help_url + selected_service + '?ajax=true';
+ $('#embed_ecml_keyword_help').load(help_url);
});
$('#embed_submit').click(function() {