Skip to content

Instantly share code, notes, and snippets.

@mkorostoff
Created May 28, 2014 14:46
Show Gist options
  • Save mkorostoff/9486618edd4cf7034360 to your computer and use it in GitHub Desktop.
Save mkorostoff/9486618edd4cf7034360 to your computer and use it in GitHub Desktop.
diff --git a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
index a17bd53..5a319e9 100755
--- a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
+++ b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
@@ -270,11 +270,15 @@ function views_rss_gfc_field_formatter_view($entity_type, $entity, $field, $inst
if(array_key_exists($langcode, $field_collection->field_gallery_item_asset)) {
$image = $field_collection->field_gallery_item_asset[$langcode][0];
$uri = file_create_url($image['uri']);
+ $small_url = preg_replace('/files/', 'files/styles/mystyle/public', $uri);
+ $tablet_url = preg_replace('/files/', 'files/styles/mystyle2/public', $uri);
// XML element array in format_xml_elements() format.
$rss_element = array(
'key' => 'media:content',
'attributes' => array(
'url' => $uri,
+ 'smallURL' => $small_url,
+ 'tabletURL' => $uri,
'type' => $image['filemime'],
'medium' => 'image', //TODO: check for videos
'width' => $image['width'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment