Topic: Function for displaying an avatar

I believe it would be a good idea to have a single function that returns the proper HTML code to display an avatar, and have a hook in that function.
This would allow extensions to modify the displaying of avatars, for example adding image filetypes.

Re: Function for displaying an avatar

Mmm, that makes sense. But if we do that, we should also move deleting avatars into its own function for the same reason (especially since we do it in several places).

3

Re: Function for displaying an avatar

I don't get it. The proper html code for an avatar is an img tag. What else is needed?

Re: Function for displaying an avatar

Well, you generate it. You check which extension has been used and return the proper img tag on basis of that.
Right now, the same code is being used in various places. This would also make it easier to display avatars at different locations (eg. PMs.)

And indeed Smartys.

5 (edited by Smartys 2008-03-02 23:59)

Re: Function for displaying an avatar

Edit: What Bekko said

6

Re: Function for displaying an avatar

If you mean we can delete all that image type/size fetching stuff from profile and viewtopic then I'm all for it.

Re: Function for displaying an avatar

Exactly.

Re: Function for displaying an avatar

I like this idea... big_smile