Commit fec9fb08 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1757551: Removing panoramio external gallery support

behatnotneeded

Change-Id: I9a46effa541a741dd525de66f8bec654b9d011d7
parent ff1e04e0
......@@ -52,12 +52,6 @@ $string['pbapikeydesc'] = 'To show photo albums from Photobucket, you\'ll need a
$string['pbapiprivatekey'] = 'Photobucket API private key';
$string['photobucketphotosandalbums'] = 'Photobucket user photos and albums';
// Panoramio
$string['Photo'] = 'Photo';
$string['by'] = 'by';
$string['panoramiocopyright'] = 'Photos provided by Panoramio are under the copyright of their owners.';
$string['panoramiouserphotos'] = 'Panoramio user photos';
$string['picasaalbums'] = 'Picasa albums';
$string['windowslivephotoalbums'] = 'Windows Live photo gallery albums';
......@@ -75,4 +69,4 @@ $string['FULL_SCREEN'] = "Full screen";
$string['THUMBS'] = "Thumbnails";
$string['DOWNLOAD'] = "Download";
$string['SHARE'] = "Share";
$string['ZOOM'] = "Zoom";
\ No newline at end of file
$string['ZOOM'] = "Zoom";
......@@ -8,7 +8,6 @@
<ul>
<li>Flickr, e.g. https://www.flickr.com/photos/12345678@N01/sets/98765432123456789/</li>
<li>Picasa, e.g. http://picasaweb.google.com/user.name/AlbumName#</li>
<li>Panoramio, e.g. http://www.panoramio.com/user/123456</li>
<li>Photobucket, e.g. http://s1234.photobucket.com/albums/ee123/username/ or http://s1234.photobucket.com/albums/ee123/username/AlbumName/</li>
<li>Windows Live Photo Gallery, e.g. http://cid-123456ab7890cd12.photos.live.com/self.aspx/AlbumName/photo.jpg</li>
</ul>
......
......@@ -222,47 +222,6 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
}
}
break;
case 'panoramio':
// Slideshow
if ($style == 1) {
$height = round($width * 0.75);
$images = array('user' => $var1);
$template = 'panoramioshow';
}
// Thumbnails
else {
$copyright = get_string('panoramiocopyright', 'blocktype.file/gallery');
$URL = 'http://www.panoramio.com/map/get_panoramas.php?set=' . $var1 . '&from=0&to=50&size=original&mapfilter=true';
$config = array(
CURLOPT_URL => $URL,
CURLOPT_RETURNTRANSFER => true,
);
$result = mahara_http_request($config);
$data = json_decode($result->data, true);
foreach ($data['photos'] as $photo) {
$link = str_replace('/original/', '/large/', $photo['photo_file_url']);
// If the Thumbnails should be Square...
if ($style == 2) {
$thumb = str_replace('/original/', '/square/', $photo['photo_file_url']);
$width = 60; // Currently only square thumbnail size, that Panoramio supports
}
else {
$thumb = str_replace('/original/', '/thumbnail/', $photo['photo_file_url']);
}
$title = (!empty($photo['photo_title']) ? $photo['photo_title'] : get_string('Photo', 'blocktype.file/gallery'));
$description = '<a href="' . $photo['photo_url'] . '">' . $title . '</a>'
. '&nbsp;' . get_string('by', 'blocktype.file/gallery') . '&nbsp;'
. '<a href="' . $photo['owner_url'] . '">' . $photo['owner_name'] . '</a>';
$images[] = array(
'link' => $link,
'source' => $thumb,
'title' => $description,
'fancybox' => $fancyboxattr
);
}
}
break;
case 'photobucket':
// Slideshow
if ($style == 1) {
......@@ -788,14 +747,6 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
'var1' => '$1',
'var2' => '$2',
),
// Panoramio User Photos (direct link)
array(
'match' => '#.*www.panoramio.com/user/(\d+).*#',
'url' => 'http://www.panoramio.com/user/$1/',
'type' => 'panoramio',
'var1' => '$1',
'var2' => null,
),
// Photobucket User Photos (direct link)
array(
'match' => '#.*([a-zA-Z0-9]+).photobucket.com/albums/([a-zA-Z0-9]+)/([a-zA-Z0-9\.\,\:\;\@\-\_\+\ ]+).*#',
......
{if $images}
<iframe marginheight="0" marginwidth="0" width="{$width}" height="{$height}" scrolling="no" frameborder="0" src="http://www.panoramio.com/user/{$images.user}/slideshow"></iframe>
{else}
{str tag=cannotdisplayslideshow section=blocktype.file/gallery}
{/if}
......@@ -4,9 +4,6 @@
<a href="http://picasaweb.google.com/">
<img src="{$THEME->get_image_url('gallery/picasa')}" alt="" width="16" height="16" title="{str tag=picasaalbums section=blocktype.file/gallery}">
</a>
<a href="http://www.panoramio.com/">
<img src="{$THEME->get_image_url('gallery/panoramio')}" alt="" width="16" height="16" title="{str tag=panoramiouserphotos section=blocktype.file/gallery}">
</a>
<a href="http://www.photobucket.com/">
<img src="{$THEME->get_image_url('gallery/photobucket')}" alt="" width="16" height="16" title="{str tag=photobucketphotosandalbums section=blocktype.file/gallery}">
</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment