phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Global template variable for user avatar

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

[RFC] Global template variable for user avatar

Postby 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.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: [RFC] Global template variable for user avatar

Postby 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...
brunoais
Registered User
 
Posts: 627
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Global template variable for user avatar

Postby 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.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: [RFC] Global template variable for user avatar

Postby callumacrae » Sat Apr 21, 2012 12:17 pm

+1
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Global template variable for user avatar

Postby MichaelC » Sat Apr 21, 2012 7:10 pm

+1
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
MichaelC
Website Team
Website Team
 
Posts: 798
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Global template variable for user avatar

Postby jsebean » Sat Apr 21, 2012 10:28 pm

+1
-Jonah
Formerly known as jsbean.
User avatar
jsebean
Registered User
 
Posts: 136
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] Global template variable for user avatar

Postby 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?)
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Global template variable for user avatar

Postby callumacrae » Sun Apr 22, 2012 6:56 am

{user.avatar} is a nice syntax.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Global template variable for user avatar

Postby 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.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: [RFC] Global template variable for user avatar

Postby Senky » Sun Apr 22, 2012 6:57 pm

+1
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: paulus and 17 guests