]> git.mxchange.org Git - friendica.git/commitdiff
Added resize possibility to proxy function
authorMichael Vogel <icarus@dabo.de>
Wed, 7 Oct 2015 06:25:10 +0000 (08:25 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 7 Oct 2015 06:25:10 +0000 (08:25 +0200)
18 files changed:
include/acl_selectors.php
include/bbcode.php
include/conversation.php
include/text.php
mod/contacts.php
mod/content.php
mod/directory.php
mod/dirfind.php
mod/display.php
mod/follow.php
mod/match.php
mod/notifications.php
mod/ping.php
mod/proxy.php
mod/suggest.php
mod/viewcontacts.php
object/Item.php
view/theme/vier/theme.php

index f628b97309bf0b0742d3fa84d610aa9d3bfbd58f..05856bd21738955bd4e5f538ed44c3923b45a8ff 100644 (file)
@@ -545,7 +545,7 @@ function acl_lookup(&$a, $out_type = 'json') {
                $x['data'] = array();
                if(count($r)) {
                        foreach($r as $g) {
-                               $x['photos'][] = proxy_url($g['micro']);
+                               $x['photos'][] = proxy_url($g['micro'], false, PROXY_SIZE_MICRO);
                                $x['links'][] = $g['url'];
                                $x['suggestions'][] = $g['name'];
                                $x['data'][] = intval($g['id']);
@@ -559,7 +559,7 @@ function acl_lookup(&$a, $out_type = 'json') {
                foreach($r as $g){
                        $contacts[] = array(
                                "type"  => "c",
-                               "photo" => proxy_url($g['micro']),
+                               "photo" => proxy_url($g['micro'], false, PROXY_SIZE_MICRO),
                                "name"  => $g['name'],
                                "id"    => intval($g['id']),
                                "network" => $g['network'],
@@ -604,7 +604,7 @@ function acl_lookup(&$a, $out_type = 'json') {
                                // /nickname
                                $unknow_contacts[] = array(
                                        "type"  => "c",
-                                       "photo" => proxy_url($row['author-avatar']),
+                                       "photo" => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO),
                                        "name"  => $row['author-name'],
                                        "id"    => '',
                                        "network" => "unknown",
index a4ad09ccf5d405082ac9d89274a8871817bc8406..2fcf6c3247a572a8404b78c97716799465427fc9 100644 (file)
@@ -601,7 +601,7 @@ function bb_ShareAttributes($share, $simplehtml) {
                default:
                        $headline = trim($share[1]).'<div class="shared_header">';
                        if ($avatar != "")
-                               $headline .= '<img src="'.proxy_url($avatar).'" height="32" width="32" >';
+                               $headline .= '<img src="'.proxy_url($avatar, false, PROXY_SIZE_MICRO).'" height="32" width="32" >';
 
                        $headline .= sprintf(t('<span><a href="%s" target="_blank">%s</a> wrote the following <a href="%s" target="_blank">post</a>'.$reldate.':</span>'), $profile, $author, $link);
                        $headline .= "</div>";
index 0a337405553a3c69acad2b029ef47d18542cf904..2397014141f35c8a26c135aaa09b1f8513a274bb 100644 (file)
@@ -656,7 +656,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        'name' => $profile_name_e,
                                        'sparkle' => $sparkle,
                                        'lock' => $lock,
-                                       'thumb' => proxy_url($profile_avatar),
+                                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
                                        'title' => $item['title_e'],
                                        'body' => $body_e,
                                        'tags' => $tags_e,
@@ -675,7 +675,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        'indent' => '',
                                        'owner_name' => $owner_name_e,
                                        'owner_url' => $owner_url,
-                                       'owner_photo' => proxy_url($owner_photo),
+                                       'owner_photo' => proxy_url($owner_photo, false, PROXY_SIZE_THUMB),
                                        'plink' => get_plink($item),
                                        'edpost' => false,
                                        'isstarred' => $isstarred,
index c5b28b508eb8111d923cb9666f164d6b254113f4..4ce634b603438bab43c76dfdb0c284c7e5f71861 100644 (file)
@@ -970,7 +970,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
                        . (($click) ? ' fakelink' : '') . '" '
                        . (($redir) ? ' target="redir" ' : '')
                        . (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
-                       . proxy_url($contact['micro']) . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+                       . proxy_url($contact['micro'], false, PROXY_SIZE_THUMB) . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
                        . '" /></a></div>' . "\r\n";
        }
 }}
index 92463cd8de41d856f005156c896b9f266dc323db..25b22658f2f15a87a2fb2589093b73f878f9f81c 100644 (file)
@@ -832,8 +832,8 @@ function _contact_detail_for_template($rr){
                $url = $rr['url'];
                $sparkle = '';
        }
-       
-       
+
+
        return array(
                'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
                'edit_hover' => t('Edit contact'),
@@ -841,7 +841,7 @@ function _contact_detail_for_template($rr){
                'id' => $rr['id'],
                'alt_text' => $alt_text,
                'dir_icon' => $dir_icon,
-               'thumb' => proxy_url($rr['thumb']),
+               'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB),
                'name' => $rr['name'],
                'username' => $rr['name'],
                'sparkle' => $sparkle,
index cec23a91421ad4a23eaea3e78b896581878fb86e..c5a55561167e767ab02c63b490e14f899e2ceb91 100644 (file)
@@ -11,8 +11,8 @@
 // There is no "pagination query", but we will manage the "current page" on the client
 // and provide a link to fetch the next page - until there are no pages left to fetch.
 
-// With the exception of complex tag and text searches, this prototype is incredibly 
-// fast - e.g. one or two milliseconds to fetch parent items for the current content, 
+// With the exception of complex tag and text searches, this prototype is incredibly
+// fast - e.g. one or two milliseconds to fetch parent items for the current content,
 // and 10-20 milliseconds to fetch all the child items.
 
 
@@ -476,7 +476,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                        'name' => $name_e,
                                        'sparkle' => $sparkle,
                                        'lock' => $lock,
-                                       'thumb' => proxy_url($profile_avatar),
+                                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
                                        'title' => $title_e,
                                        'body' => $body_e,
                                        'text' => $text_e,
@@ -485,7 +485,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                        'indent' => '',
                                        'owner_name' => $owner_name_e,
                                        'owner_url' => $owner_url,
-                                       'owner_photo' => proxy_url($owner_photo),
+                                       'owner_photo' => proxy_url($owner_photo, false, PROXY_SIZE_THUMB),
                                        'plink' => get_plink($item),
                                        'edpost' => false,
                                        'isstarred' => $isstarred,
@@ -859,7 +859,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                        'profile_url' => $profile_link,
                                        'item_photo_menu' => item_photo_menu($item),
                                        'name' => $name_e,
-                                       'thumb' => proxy_url($profile_avatar),
+                                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
                                        'osparkle' => $osparkle,
                                        'sparkle' => $sparkle,
                                        'title' => $title_e,
@@ -869,7 +869,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                        'indent' => $indent,
                                        'shiny' => $shiny,
                                        'owner_url' => $owner_url,
-                                       'owner_photo' => proxy_url($owner_photo),
+                                       'owner_photo' => proxy_url($owner_photo, false, PROXY_SIZE_THUMB),
                                        'owner_name' => $owner_name_e,
                                        'plink' => get_plink($item),
                                        'edpost' => $edpost,
index fa3a89e45a7dac0e810f9236bddc6d18f1726117..6fd99256f0a80c06586c0f80b583ed150494526a 100644 (file)
@@ -171,7 +171,7 @@ function directory_content(&$a) {
                        $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
                                '$profile_link' => $profile_link,
-                               '$photo' => proxy_url($a->get_cached_avatar_image($rr[$photo])),
+                               '$photo' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB),
                                '$alt_text' => $rr['name'],
                                '$name' => $rr['name'],
                                '$details' => $pdesc . $details,
index 488e10fa169d5e758f2f9fca4e5b68928b0b7628..4156d3b1cf0e415bead4a33a907a894ae05f52a1 100644 (file)
@@ -140,7 +140,7 @@ function dirfind_content(&$a, $prefix = "") {
                                $o .= replace_macros($tpl,array(
                                        '$url' => zrl($jj->url),
                                        '$name' => $jj->name,
-                                       '$photo' => proxy_url($jj->photo),
+                                       '$photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                        '$tags' => $jj->tags,
                                        '$conntxt' => $conntxt,
                                        '$connlnk' => $connlnk,
index 46574bd064e509c60ba98da0bccdc68147623d23..6b345e6302d1640d572a44c34ca5b099623091cf 100644 (file)
@@ -97,7 +97,7 @@ function display_fetchauthor($a, $item) {
        $profiledata["nickname"] = $item["author-name"];
        $profiledata["name"] = $item["author-name"];
        $profiledata["picdate"] = "";
-       $profiledata["photo"] = proxy_url($item["author-avatar"]);
+       $profiledata["photo"] = proxy_url($item["author-avatar"], false, PROXY_SIZE_SMALL);
        $profiledata["url"] = $item["author-link"];
        $profiledata["network"] = $item["network"];
 
@@ -174,7 +174,7 @@ function display_fetchauthor($a, $item) {
                        $r[0]["about"] = "";
                }
 
-               $profiledata["photo"] = proxy_url($r[0]["photo"]);
+               $profiledata["photo"] = proxy_url($r[0]["photo"], false, PROXY_SIZE_SMALL);
                $profiledata["address"] = bbcode($r[0]["location"]);
                $profiledata["about"] = bbcode($r[0]["about"]);
                if ($r[0]["nick"] != "")
@@ -185,7 +185,7 @@ function display_fetchauthor($a, $item) {
        $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
        if (count($r)) {
                if ($profiledata["photo"] == "")
-                       $profiledata["photo"] = proxy_url($r[0]["avatar"]);
+                       $profiledata["photo"] = proxy_url($r[0]["avatar"], false, PROXY_SIZE_SMALL);
                if (($profiledata["address"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
                        $profiledata["address"] = bbcode($r[0]["location"]);
                if (($profiledata["about"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
index 352a8988b55183e9a8ee8a4f2c89ff64a9121e82..54c20e5093ac4924f7891b4dd37a54785c14cc3f 100644 (file)
@@ -81,7 +81,7 @@ function follow_content(&$a) {
 
        $o  = replace_macros($tpl,array(
                        '$header' => htmlentities($header),
-                       '$photo' => proxy_url($ret["photo"]),
+                       '$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL),
                        '$desc' => "",
                        '$pls_answer' => t('Please answer the following:'),
                        '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'),t('Yes'))),
index 74f83a6cc9494b76ce1fac8b7d902f400e9a5aae..f31b0f67a44fd82cc2a1140a2581ce443a16aae7 100644 (file)
@@ -2,6 +2,7 @@
 include_once('include/text.php');
 require_once('include/socgraph.php');
 require_once('include/contact_widgets.php');
+require_once('mod/proxy.php');
 
 function match_content(&$a) {
 
@@ -65,7 +66,7 @@ function match_content(&$a) {
                                        $o .= replace_macros($tpl,array(
                                                '$url' => zrl($jj->url),
                                                '$name' => $jj->name,
-                                               '$photo' => proxy_url($jj->photo),
+                                               '$photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                                '$inttxt' => ' ' . t('is interested in:'),
                                                '$conntxt' => t('Connect'),
                                                '$connlnk' => $connlnk,
index fadd1e94e563c42c66f3b6407b7c299fbf07e763..a267b7c95826921e75504b2a8cb77e5499ad6a8b 100644 (file)
@@ -166,7 +166,7 @@ function notifications_content(&$a) {
                                                '$intro_id' => $rr['intro_id'],
                                                '$madeby' => sprintf( t('suggested by %s'),$rr['name']),
                                                '$contact_id' => $rr['contact-id'],
-                                               '$photo' => ((x($rr,'fphoto')) ? proxy_url($rr['fphoto']) : "images/person-175.jpg"),
+                                               '$photo' => ((x($rr,'fphoto')) ? proxy_url($rr['fphoto'], false, PROXY_SIZE_SMALL) : "images/person-175.jpg"),
                                                '$fullname' => $rr['fname'],
                                                '$url' => zrl($rr['furl']),
                                                '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
@@ -238,7 +238,7 @@ function notifications_content(&$a) {
                                        '$uid' => $_SESSION['uid'],
                                        '$intro_id' => $rr['intro_id'],
                                        '$contact_id' => $rr['contact-id'],
-                                       '$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo']) : "images/person-175.jpg"),
+                                       '$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo'], false, PROXY_SIZE_SMALL) : "images/person-175.jpg"),
                                        '$fullname' => $rr['name'],
                                        '$location' => bbcode($rr['glocation'], false, false),
                                        '$location_label' => t('Location:'),
@@ -303,7 +303,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_likes,array(
                                                        //'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_link' => $a->get_baseurl(true).'/display/'.$it['pguid'],
-                                                       '$item_image' => $it['author-avatar'],
+                                                       '$item_image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
                                                        '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
@@ -313,7 +313,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
                                                        //'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_link' => $a->get_baseurl(true).'/display/'.$it['pguid'],
-                                                       '$item_image' => $it['author-avatar'],
+                                                       '$item_image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
                                                        '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
@@ -328,7 +328,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_friends,array(
                                                        //'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_link' => $a->get_baseurl(true).'/display/'.$it['pguid'],
-                                                       '$item_image' => $it['author-avatar'],
+                                                       '$item_image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
                                                        '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
@@ -343,7 +343,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl,array(
                                                        //'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_link' => $a->get_baseurl(true).'/display/'.$it['pguid'],
-                                                       '$item_image' => $it['author-avatar'],
+                                                       '$item_image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
                                                        '$item_text' => $item_text,
                                                        '$item_when' => relative_date($it['created'])
                                                ));
@@ -376,7 +376,7 @@ function notifications_content(&$a) {
                        foreach ($r as $it) {
                                $notif_content .= replace_macros($not_tpl,array(
                                        '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
-                                       '$item_image' => proxy_url($it['photo']),
+                                       '$item_image' => proxy_url($it['photo'], false, PROXY_SIZE_MICRO),
                                        '$item_text' => strip_tags(bbcode($it['msg'])),
                                        '$item_when' => relative_date($it['date'])
                                ));
index e87ed985534bd0eaeccfc0a482857dd53f2ffc90..791ceed3519a6dc12d588a270f395431f5fb55fb 100644 (file)
@@ -173,7 +173,7 @@ function ping_init(&$a) {
                 *              'message' => notification message. "{0}" will be replaced by subject name
                 **/
                function xmlize($n){
-                       $n['photo'] = proxy_url($n['photo']);
+                       $n['photo'] = proxy_url($n['photo'], false, PROXY_SIZE_MICRO);
 
                        $n['message'] = html_entity_decode($n['message'], ENT_COMPAT | ENT_HTML401, "UTF-8");
                        $n['name'] = html_entity_decode($n['name'], ENT_COMPAT | ENT_HTML401, "UTF-8");
index d82d334cec360b8d4e79ceabe601a9fbc4408fda..d26967dddf2f1e6e21d1749728f213236cbab419 100644 (file)
@@ -3,6 +3,12 @@
 
 define("PROXY_DEFAULT_TIME", 86400); // 1 Day
 
+define("PROXY_SIZE_MICRO", "micro");
+define("PROXY_SIZE_THUMB", "thumb");
+define("PROXY_SIZE_SMALL", "small");
+define("PROXY_SIZE_MEDIUM", "medium");
+define("PROXY_SIZE_LARGE", "large");
+
 require_once('include/security.php');
 require_once("include/Photo.php");
 
@@ -37,6 +43,7 @@ function proxy_init() {
 
        $thumb = false;
        $size = 1024;
+       $sizetype = "";
 
        // If the cache path isn't there, try to create it
        if (!is_dir($_SERVER["DOCUMENT_ROOT"]."/proxy"))
@@ -59,14 +66,27 @@ function proxy_init() {
                        $size = 200;
 
                // thumb, small, medium and large.
-               if (substr($url, -6) == ":thumb")
-                       $size = 150;
-               if (substr($url, -6) == ":small")
-                       $size = 340;
-               if (substr($url, -7) == ":medium")
+               if (substr($url, -6) == ":micro") {
+                       $size = 48;
+                       $sizetype = ":micro";
+                       $url = substr($url, 0, -6);
+               } elseif (substr($url, -6) == ":thumb") {
+                       $size = 80;
+                       $sizetype = ":thumb";
+                       $url = substr($url, 0, -6);
+               } elseif (substr($url, -6) == ":small") {
+                       $size = 175;
+                       $url = substr($url, 0, -6);
+                       $sizetype = ":small";
+               } elseif (substr($url, -7) == ":medium") {
                        $size = 600;
-               if (substr($url, -6) == ":large")
+                       $url = substr($url, 0, -7);
+                       $sizetype = ":medium";
+               } elseif (substr($url, -6) == ":large") {
                        $size = 1024;
+                       $url = substr($url, 0, -6);
+                       $sizetype = ":large";
+               }
 
                $pos = strrpos($url, "=.");
                if ($pos)
@@ -176,6 +196,8 @@ function proxy_init() {
                }
        }
 
+       $img_str_orig = $img_str;
+
        // reduce quality - if it isn't a GIF
        if ($mime != "image/gif") {
                $img = new Photo($img_str, $mime);
@@ -188,10 +210,12 @@ function proxy_init() {
        // If there is a real existing directory then put the cache file there
        // advantage: real file access is really fast
        // Otherwise write in cachefile
-       if ($valid AND $direct_cache)
-               file_put_contents($_SERVER["DOCUMENT_ROOT"]."/proxy/".proxy_url($_REQUEST['url'], true), $img_str);
-       elseif ($cachefile != '')
-               file_put_contents($cachefile, $img_str);
+       if ($valid AND $direct_cache) {
+               file_put_contents($_SERVER["DOCUMENT_ROOT"]."/proxy/".proxy_url($_REQUEST['url'], true), $img_str_orig);
+               if ($sizetype <> '')
+                       file_put_contents($_SERVER["DOCUMENT_ROOT"]."/proxy/".proxy_url($_REQUEST['url'], true).$sizetype, $img_str);
+       } elseif ($cachefile != '')
+               file_put_contents($cachefile, $img_str_orig);
 
        header("Content-type: $mime");
 
@@ -208,7 +232,7 @@ function proxy_init() {
        killme();
 }
 
-function proxy_url($url, $writemode = false) {
+function proxy_url($url, $writemode = false, $size = "") {
        global $_SERVER;
 
        $a = get_app();
@@ -251,6 +275,9 @@ function proxy_url($url, $writemode = false) {
 
        $proxypath = $a->get_baseurl()."/proxy/".$path;
 
+       if ($size != "")
+               $size = ":".$size;
+
        // Too long files aren't supported by Apache
        // Writemode in combination with long files shouldn't be possible
        if ((strlen($proxypath) > 250) AND $writemode)
@@ -260,7 +287,7 @@ function proxy_url($url, $writemode = false) {
        elseif ($writemode)
                return ($path);
        else
-               return ($proxypath);
+               return ($proxypath.$size);
 }
 
 /**
index e07e9331146cd1ec8efa4840de23eeb3763d37dd..8bf31ca8e591bf449d489064ad5ec84fa33c0d28 100644 (file)
@@ -81,12 +81,12 @@ function suggest_content(&$a) {
 
        foreach($r as $rr) {
 
-               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);                      
+               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
 
                $o .= replace_macros($tpl,array(
                        '$url' => zrl($rr['url']),
                        '$name' => $rr['name'],
-                       '$photo' => proxy_url($rr['photo']),
+                       '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
                        '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
                        '$ignid' => $rr['id'],
                        '$conntxt' => t('Connect'),
index b84856701dbe041e5d5255461e37336f0aa96f4c..19bf0415c7f86b5daece0b5696250452ee24f8d1 100644 (file)
@@ -62,7 +62,7 @@ function viewcontacts_content(&$a) {
                $contacts[] = array(
                        'id' => $rr['id'],
                        'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
-                       'thumb' => proxy_url($rr['thumb']),
+                       'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB),
                        'name' => substr($rr['name'],0,20),
                        'username' => $rr['name'],
                        'url' => $url,
index c7a025861f59455501a4924770f3d5bb75f1675b..0dc4f41985a3f82cbfc71b2ea7f57598c4752453 100644 (file)
@@ -334,7 +334,7 @@ class Item extends BaseObject {
                        'profile_url' => $profile_link,
                        'item_photo_menu' => item_photo_menu($item),
                        'name' => $name_e,
-                       'thumb' => proxy_url($profile_avatar),
+                       'thumb' => proxy_url($profile_avatar, false, PROXY_SIZE_THUMB),
                        'osparkle' => $osparkle,
                        'sparkle' => $sparkle,
                        'title' => $title_e,
@@ -347,7 +347,7 @@ class Item extends BaseObject {
                        'indent' => $indent,
                        'shiny' => $shiny,
                        'owner_url' => $this->get_owner_url(),
-                       'owner_photo' => proxy_url($this->get_owner_photo()),
+                       'owner_photo' => proxy_url($this->get_owner_photo(), false, PROXY_SIZE_THUMB),
                        'owner_name' => $owner_name_e,
                        'plink' => get_plink($item),
                        'edpost'    => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
index 6d3ac1caf6db80f81a926d7148e4078c72333de2..ff06b6303059b13ecb10e27ced3141e9fb90cb7f 100644 (file)
@@ -132,7 +132,7 @@ function vier_community_info() {
                                        '$id' => $rr['id'],
                                        //'$profile_link' => zrl($rr['url']),
                                        '$profile_link' => $a->get_baseurl().'/follow/?url='.urlencode($rr['url']),
-                                       '$photo' => proxy_url($rr['photo']),
+                                       '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_MICRO),
                                        '$alt_text' => $rr['name'],
                                ));
                                $aside['$comunity_profiles_items'][] = $entry;