Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • dbrighi replied on the discussion topic Elgg and Cloudflare optimizing
    I wrote this code into start.php of one of my main plugin (inside the init function): elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'user_icon_url_override'); and the i copy/pasted the original function and modied into: function... view reply
  • dbrighi has a new avatar
    dbrighi
  • dbrighi added a new discussion topic Elgg and Cloudflare optimizing in the group Performance and Scalability
    Hi all, i would like to let you know about my solution integrating www.fitstadium.com and cloudflare services. While most of Elgg JS and CSS are already compatible with cloudflare caching systems, for theimages that was not immediately...
    • I wrote this code into start.php of one of my main plugin (inside the init function):

      elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'user_icon_url_override');

      and the i copy/pasted the original function and modied into:

      function user_icon_url_override($hook, $type, $returnvalue, $params) {
           $user = $params['entity'];
           $size = $params['size'];
           if (isset($user->externalPhoto)) {
                // return thumbnail
                return $user->externalPhoto;
           } else {
                if (isset($user->icontime)) {
                     return "avatar/view/$user->username/$size/$user->icontime.jpg";
                } else {
                     return "_graphics/icons/user/default{$size}.gif";
                }
           }
      }

    • awesome thanks. i just activated this on my site too. thanks for sharing. :)

    • Does this neat trick work also on 1.9?

  • dbrighi joined the group Performance and Scalability