summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStein Magne Bjorklund2014-10-11 14:11:13 (GMT)
committerStein Magne Bjorklund2014-10-11 16:22:02 (GMT)
commita2d1804c0acec9a718e5f141f78723ba9e468f89 (patch)
tree7a4b55b6e41319f5d23d67267b2aecab9202b9e8
parent371657dc19792e10d4f93bfefa57e6d529cbf3b0 (diff)
Issue #2333409 by steinmb: Avoid browsers blocking content in mixed-mode.6.x-1.136.x-1.x
All of Flicker data sources are now https. Embedding content from non https sources on a SSL enabled site will in most modern browsers be blocked (mixed mode blocking).
-rw-r--r--README.txt14
-rw-r--r--media_flickr.module6
-rw-r--r--providers/emimage/flickr.inc8
-rw-r--r--providers/emvideo/flickr_sets.inc8
4 files changed, 17 insertions, 19 deletions
diff --git a/README.txt b/README.txt
index 2285c01..6ee3ff1 100644
--- a/README.txt
+++ b/README.txt
@@ -1,17 +1,15 @@
-Readme for Media: Flicker
+Readme for Media: Flickr
The Media: Flickr project currently offers Flickr Photoset capabilities to the
-Embedded Media Field module, available at http://drupal.org/project/emfield.
+Embedded Media Field module, available at https://drupal.org/project/emfield.
To use it, enable the Embedded Video Field module, and add a Third Party Video
field to a content type. For Thumbnails, you'll also need to apply for a Flickr
-API key, from http://www.flickr.com/services/api/keys.
+API key, from https://www.flickr.com/services/api/keys.
After that, editors will be able to paste a URL or the embed code for a Flickr
Photoset or Slideshow into the field, and it will be displayed automatically.
-Additionally, that URL will be parsed automatically, so the module will know the
-difference between a Flickr Photoset URL and another supported provider, such as
-a YouTube video.
+Additionally, that URL will be parsed automatically, so the module will know the difference between a Flickr Photoset URL and another supported provider, such as a YouTube video.
Configuration:
@@ -31,8 +29,8 @@ Content Creation:
----------------
(3) If you want a single image from Flickr, then use the "Embedded Image" CCK
field.
-Example Flickr URL: http://www.flickr.com/photos/thusthought/5156938698/in/set-72157625220814125/
+Example Flickr URL: https://www.flickr.com/photos/thusthought/5156938698/in/set-72157625220814125/
(4) If you want to use a set from Flickr, then use the "Embedded Video" CCK
field.
-Example Flickr URL: http://www.flickr.com/photos/thusthought/sets/72157625220814125/show/
+Example Flickr URL: https://www.flickr.com/photos/thusthought/sets/72157625220814125/show/
diff --git a/media_flickr.module b/media_flickr.module
index 019ed55..8f62cd3 100644
--- a/media_flickr.module
+++ b/media_flickr.module
@@ -1,8 +1,8 @@
<?php
define('MEDIA_FLICKR_RESTPOINT', 'https://api.flickr.com/services/rest/');
-define('MEDIA_FLICKR_API_APPLICATION_URL', 'http://www.flickr.com/services/api/keys');
-define('MEDIA_FLICKR_MAIN_URL', 'http://www.flickr.com/');
+define('MEDIA_FLICKR_API_APPLICATION_URL', 'https://www.flickr.com/services/api/keys');
+define('MEDIA_FLICKR_MAIN_URL', 'https://www.flickr.com/');
/**
* @file
@@ -176,7 +176,7 @@ function media_flickr_error_check() {
if (variable_get('emimage_flickr_api_key', '') == '') {
global $user;
$error = 'You do not yet have a Flickr API key set. You will need to !apply and enter your key at the !settings before Flickr images may be displayed.';
- $arguments = array('!apply' => l(t('apply for a Flickr API key'), MEDIA_FLICKR_API_APPLICATION_URL), '!settings' => l(t('Embedded Media Field administration page'), 'admin/content/emfield'));
+ $arguments = array('!apply' => l(t('apply for a Flickr API key'), MEDIA_FLICKR_API_APPLICATION_URL), '!settings' => l(t('Embedded Media Field administration page'), 'admin/content/emfield/emvideo'));
if (user_access('administer site configuration')) {
drupal_set_message(t($error, $arguments), 'error');
}
diff --git a/providers/emimage/flickr.inc b/providers/emimage/flickr.inc
index 5d65013..132546c 100644
--- a/providers/emimage/flickr.inc
+++ b/providers/emimage/flickr.inc
@@ -5,9 +5,9 @@
* This include processes flickr.com image files for use by emfield.module.
*/
-define('EMIMAGE_FLICKR_MAIN_URL', 'http://www.flickr.com/');
-define('EMIMAGE_FLICKR_API_INFO', 'http://flickr.com/services/api');
-define('EMIMAGE_FLICKR_API_APPLICATION_URL', 'http://www.flickr.com/services/api/keys');
+define('EMIMAGE_FLICKR_MAIN_URL', 'https://www.flickr.com/');
+define('EMIMAGE_FLICKR_API_INFO', 'https://flickr.com/services/api');
+define('EMIMAGE_FLICKR_API_APPLICATION_URL', 'https://www.flickr.com/services/api/keys');
define('EMIMAGE_FLICKR_REST_ENDPOINT', 'https://api.flickr.com/services/rest/');
define('EMIMAGE_FLICKR_DATA_VERSION', 1);
@@ -207,7 +207,7 @@ function emimage_flickr_embedded_link($code, $data = array()) {
$xml = emimage_flickr_request('flickr.photos.getInfo', array('photo_id' => $code));
$owner = $xml['photo']['owner']['nsid'];
}
- return 'http://www.flickr.com/photos/'. $owner .'/'. $code;
+ return 'https://www.flickr.com/photos/'. $owner .'/'. $code;
}
/**
diff --git a/providers/emvideo/flickr_sets.inc b/providers/emvideo/flickr_sets.inc
index a71bfa7..739cf6c 100644
--- a/providers/emvideo/flickr_sets.inc
+++ b/providers/emvideo/flickr_sets.inc
@@ -48,7 +48,7 @@ function emvideo_flickr_sets_info() {
*/
function emvideo_flickr_sets_settings() {
if (!function_exists('emfield_imagerotator_url')) {
- drupal_set_message(t('You should upgrade to a newer version of !emfield if you wish support for the !player or !imagerotator.', array('!emfield' => l(t('Embedded Media Field'), 'http://drupal.org/project/emfield'), '!player' => l(t('JW Flash Media Player'), 'http://www.longtailvideo.com/players/jw-flv-player/'), '!imagerotator' => l(t('JW Image Rotator'), 'http://www.longtailvideo.com/players/jw-image-rotator/'))), 'error');
+ drupal_set_message(t('You should upgrade to a newer version of !emfield if you wish support for the !player or !imagerotator.', array('!emfield' => l(t('Embedded Media Field'), 'https://drupal.org/project/emfield'), '!player' => l(t('JW Flash Media Player'), 'http://www.longtailvideo.com/players/jw-flv-player/'), '!imagerotator' => l(t('JW Image Rotator'), 'http://www.longtailvideo.com/players/jw-image-rotator/'))), 'error');
}
$form['flickr_sets']['media_flickr_store_local'] = array(
'#type' => 'checkbox',
@@ -182,7 +182,7 @@ function emvideo_flickr_sets_embedded_link($video_code, $data = array()) {
if (empty($data)) {
$data = emvideo_flickr_sets_data(NULL, array('value' => $video_code));
}
- return 'http://www.flickr.com/photos/'. $data['owner'] .'/sets/'. $video_code;
+ return 'https://www.flickr.com/photos/'. $data['owner'] .'/sets/'. $video_code;
}
/**
@@ -194,8 +194,8 @@ function theme_emvideo_flickr_sets_flash($item, $width, $height, $autoplay, $opt
$value = check_plain($item['value']);
$embed = drupal_urlencode('photos/'. $item['data']['owner'] .'/sets/'. $value);
$output = <<<EMBED
-<object type="application/x-shockwave-flash" data="http://www.flickr.com/apps/slideshow/show.swf?v=71649" width="$width" height="$height">
- <param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649" />
+<object type="application/x-shockwave-flash" data="https://www.flickr.com/apps/slideshow/show.swf?v=71649" width="$width" height="$height">
+ <param name="movie" value="https://www.flickr.com/apps/slideshow/show.swf?v=71649" />
<param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=/$embed/show/&amp;page_show_back_url=/$embed&amp;set_id={$value}&amp;jump_to=" />
<param name="allowFullScreen" value="true" />
</object>