[RFC] Global template variable for user avatar

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

[RFC] Global template variable for user avatar

Post by ecwpa » Sat Apr 21, 2012 2:54 am

I'm not sure if this is too specific but if I wanted to display user's avatar let say in a bar on the top, I need to alter a lot of files just to do that.

So, I'm wondering if its a reasonable request to make it a global variable just like username and a others.

Edit: I wasn't clear enough, here's what I mean:

Basically there're 4 very specific places where avatars are available: UCP, profiles, memberlist and post rows. What I want is access to the current logged in user's avatar everywhere in order to make a visual connection with users and their personas, it's also easier to let them know they're actually logged in and its also a possitive way to invite them to participate

Image
That would be overall_header

Image
Quick reply.

These are just two examples, If I wanted to do just that I would need to alter php files. A LOT of them.

If I want to welcome users with their name and avatar on forum index, then I have to modify even more.
Last edited by ecwpa on Sun Apr 22, 2012 10:34 am, edited 1 time in total.
Slightly better English than it was in 2005, still improving :D

User avatar
brunoais
Registered User
Posts: 962
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Global template variable for user avatar

Post by brunoais » Sat Apr 21, 2012 9:28 am

Sounds too simple for an RFC... Please use examples, show what's behind what you want.
With the info you gave I'm unable to comment...

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] Global template variable for user avatar

Post by ecwpa » Sat Apr 21, 2012 11:29 am

Edited: See edit in original post
Last edited by ecwpa on Sun Apr 22, 2012 10:35 am, edited 1 time in total.
Slightly better English than it was in 2005, still improving :D

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Global template variable for user avatar

Post by callumacrae » Sat Apr 21, 2012 12:17 pm

+1
Made by developers, for developers!
My blog

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Global template variable for user avatar

Post by MichaelC » Sat Apr 21, 2012 7:10 pm

+1
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
jsebean
Registered User
Posts: 165
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] Global template variable for user avatar

Post by jsebean » Sat Apr 21, 2012 10:28 pm

+1
-Jonah

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Global template variable for user avatar

Post by naderman » Sun Apr 22, 2012 12:51 am

Please edit your first post with a proper explanation of what you are proposing, so one doesn't have to read the discussion to understand your RFC.

On subject: Yes I think we should absolutely add this as well as the user rank, we should probably just assign all of the user data to the template since we already have it. (new template feature to access array elements?)

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Global template variable for user avatar

Post by callumacrae » Sun Apr 22, 2012 6:56 am

{user.avatar} is a nice syntax.
Made by developers, for developers!
My blog

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] Global template variable for user avatar

Post by ecwpa » Sun Apr 22, 2012 1:36 pm

naderman wrote:Please edit your first post with a proper explanation of what you are proposing, so one doesn't have to read the discussion to understand your RFC.

On subject: Yes I think we should absolutely add this as well as the user rank, we should probably just assign all of the user data to the template since we already have it. (new template feature to access array elements?)
Done.
Slightly better English than it was in 2005, still improving :D

Senky
Extension Customisations
Extension Customisations
Posts: 292
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Global template variable for user avatar

Post by Senky » Sun Apr 22, 2012 6:57 pm

+1

Post Reply