getAvatars

Description

Recursive function used to get all the server-stored avatars for display

Syntax

array getAvatars (string $directory, int $level)



Parameter $directory

Expected type: String
Description: The name of the directory to search



Parameter $level

Expected type: Integer
Description: What level we're at within the avatars directory (0 is directly inside the avatars directory, 1 is inside a sub-directory, etc.)



Return value

Expected type: Array
Description: An array of arrays containing information about all available avatars and avatar directories. Each array contains information about a specific file or directory and has the following keys

Array Elements
Key Optional Expected type Description
checked no Boolean Whether or not the member has selected this avatar or an avatar in this directory
filename no String The name of the file or directory. The first one will always be blank.gif
files no Array If this is a directory, an array of files/directories in this directory (as loaded by this function)
is_dir no Boolean Whether or not this is a directory
name no String The name of the avatar (same as filename, except it doesn't have an extension and spaces are replaced with underscores)


Advertisement: