Modify the avatar

string uc_avatar(integer uid[, string type, boolean returnhtml])

Function parameters
Parameter Meaning
integer uid User ID
string type Avatar image type
real: a real image
virtual: (default value) virtual image
boolean returnhtml Whether to return HTML code
1: (default value) set to return avatar as HTML code
0: No, back to set the picture of Flash called array
return value
Value Meaning
mixed string: set to return Avatar as HTML code
array: set to returm avatar as the Flash array called

This interface function is used to return the HTML code to set the user avatar, HTML will output a Flash, the resulting display similar to the following effect.

Image format

Image size Call method Description
200 x 250 {UC_URL}/avatar.php?uid={N}&type={S}&size=big With the original photo zoom, width and height of not more than 200 * 250px. If the image is smaller, not to enlarge.
120 x 120 {UC_URL}/avatar.php?uid={N}&type={S}&size=middle Cut out with a cut box range zoom, you can box with an arbitrary cut.
48 x 48 {UC_URL}/avatar.php?uid={N}&type={S}&size=small cut out with a cut box zoom range, the region left for the rectangular area (later changed to the middle version) constituency within the square.
{UC_URL} for the UCenter URL. {N} for the user ID. {S} real for the real image type, virtual for the virtual avatar

For example, call the user with user ID = 58, for the dimensions of 200x250px real image method:
<img src="http://www.yourwebsite.com/uc_server/avatar.php?uid=58&type=real&size=big" />

For example, call the user ID = 58, 200x250px image size of the virtual method:
<img src="http://www.yourwebsite.com/uc_server/avatar.php?uid=58&type=virtual&size=big" />
Or
<img src="http://www.yourwebsite.com/uc_server/avatar.php?uid=58&size=big" />

Detect the Avatar exists

string uc_check_avatar(integer uid[, string size, string type])

Function parameters
Parameter Meaning
integer uid User ID
string size Image size
big: big image (200 x 250)
middle: (default value) middle image (120 x 120), the default value
small: small image (48 x 48)
string type Image type
real: a real image
virtual: (default value) virtual avatar, the default value
Return value
Value Meaning
boolean 1: avatar exists
0: avatar does not exist

This interface function is used to detect the existence of the specified user avatar.