Skip to main content
Topic: An avatar controller? (Read 1624 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

An avatar controller?

In several situations (especially when javascript is involved) grab the correct avatar for a user is a real pain (you have always to rely on php to fetch and return the data to javascript, making it hard to really avoid php (yeah, I know what I'm going to propose may sound odd LOL), so I was thinking: in most of the cases use determineAvatar to get the proper URL and render it is fine, but what if we add a controller that returns the avatar based on the user ID?
Sort of dlattach, just specific for avatarts.
So, you want my avatar you use:
Code: [Select]
http://www.elkarte.net/community/index.php?action=avatar;u=2
and it outputs the avatar, no matter what that avatar is: it may be local or remote, it fetch_web_data or whatever and returns the image via php.
Not to be used everywhere for performances' sake, of course, though in certain situations may be very handy.
Bugs creator.
Features destroyer.
Template killer.

Re: An avatar controller?

Reply #1

Makes sense. Kind of making a micro service of it.

Might make more sense to put it under the profile though as a subaction.
Last Edit: August 12, 2014, 07:14:18 pm by groundup
Come work with me at Promenade Group