phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Pretty urls for avatars.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Pretty urls for avatars.

Postby Dragosvr92 » Thu Apr 26, 2012 3:04 am

The current phpbb format is like this:
Code: Select all
http://area51.phpbb.com/phpBB/download/file.php?avatar=95955_1312605181.jpg

Why?
If you will use the link to your avatar on a different phpbb forums, or wherever you would, the link to your avatar gets a new number and the link that you used on the x site becomes obselet. I think it would be a lot better if you would use the members username in the avatar url.
Code: Select all
http://area51.phpbb.com/phpBB/download/file.php?avatar=thekiller.jpg
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Pretty urls for avatars.

Postby ecwpa » Thu Apr 26, 2012 12:50 pm

Maybe using user's ID is a better idea than the username since some boards let users change ther name.

I'm guessing there's a practical reason for it includes the date it was uploaded. Maybe this way it let phpBB upload avatar and keep the previous one and then delete the older one.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: Pretty urls for avatars.

Postby Dragosvr92 » Mon Apr 30, 2012 9:19 pm

Well, just the id would be good. I dont understand why do you have the date there. No one knows how to read a UNIX Time stamp anyways.
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Pretty urls for avatars.

Postby imkingdavid » Mon Apr 30, 2012 11:01 pm

TheKiller wrote:Well, just the id would be good. I dont understand why do you have the date there. No one knows how to read a UNIX Time stamp anyways.

You're not supposed to be able to read the filename easily. IIRC the filename is garbled for security reasons, as well as to allow files with the same actual filename to be on the same server.

I don't see a problem with it as it is now.

-1
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 901
Joined: Thu Jul 30, 2009 12:06 pm

Re: Pretty urls for avatars.

Postby Dragosvr92 » Tue May 01, 2012 1:43 am

The problem i can see is that if i want to link my avatar to a separate forum, when i update my avatar, the link from the other forum would be obsellete and it will just dumb me a couple error logs.
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Pretty urls for avatars.

Postby imkingdavid » Tue May 01, 2012 2:09 am

TheKiller wrote:The problem i can see is that if i want to link my avatar to a separate forum, when i update my avatar, the link from the other forum would be obsellete and it will just dumb me a couple error logs.

You can upload the avatar on a free image host or your own server and then just link from there.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 901
Joined: Thu Jul 30, 2009 12:06 pm

Re: Pretty urls for avatars.

Postby Oleg » Tue May 01, 2012 2:12 am

Anything involving filenames of uploaded files requires a thorough security review due to msie helpfully interpreting files according to what content they have and not what their name is.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am


Return to [3.x] Discussion

Who is online

Users browsing this forum: Bing [Bot] and 14 guests