Ignore:
Timestamp:
11/12/11 17:18:55 (6 months ago)
Author:
adrian.budau
Message:

Avatar Optimization

This is an optimization for managing avatars on the server. Because
there are only 5 sizes used on all the site it's more useful to resize
all of the images to those 5(thus increasing the space usage by less
than 100%) and when a client asks for a size give it directly rather
then resizing all the time. The 5 sizes are tiny (old L16x16),
small(old L32x32), normal(old L50x50), forum(old L75xL75, used only on

the forum at the moment), big(old 100x100) and full(the original picture).


To get the avatar on a size from the server simply use the page
avatar/%some_size%/%some_user where %some_user% is a username and
%some_size$ is a one the 5 sizes. In case the user doesn't exists or he
doesn't have an avatar we use a placeholder image. If the size given is
not from the list or is omitted the server return a classic
404 Error(File not found)

The script which resizes the image for the current users is called
make-avatar-folder found in the scripts folder. It requires the attach
folder to have permission for read and write.

The setup has also been modified so fresh installes will work without
calling the script.

Reviewboard Link: http://reviewboard.infoarena.ro/r/176/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/config.php.sample

    r1085 r1155  
    3232// Slashes at both ends. 
    3333define("IA_URL_PREFIX", "--write-me-IA_URL_PREFIX--"); 
     34 
     35// Define the place the avatars are being stored 
     36define("IA_AVATAR_FOLDER", "--write-me-IA_AVATAR_FOLDER--"); 
    3437 
    3538 
Note: See TracChangeset for help on using the changeset viewer.