axpv Posted December 23, 2014 Posted December 23, 2014 Why we have such strange profile URLs - /profile/xxxxx-username? Is it optional? Can I set it to /profile/username?
Warzone Posted December 23, 2014 Posted December 23, 2014 I think thats the member number.. I asked before, a few months ago, and no answer, so i guess it is not to be changed.
axpv Posted December 23, 2014 Author Posted December 23, 2014 What these numbers/ids use for? Not so friendly URLs
opentype Posted December 23, 2014 Posted December 23, 2014 The member IDs in the URL make them unique. Of course there is the alternative way of doing where you leave out such an ID, but every URL can than only be “registered” once and people start to fight over the best and shortest URLs.
opentype Posted December 23, 2014 Posted December 23, 2014 In 4.0 you can edit the FURL setup if you want to and can handle the consequences. ;-)
axpv Posted December 23, 2014 Author Posted December 23, 2014 In 4.0 you can edit the FURL setup if you want to and can handle the consequences. ;-) Thanks! Can you please give an example of how to set it right to use for /profile/username?
axpv Posted December 23, 2014 Author Posted December 23, 2014 You would just drop that{#id}-Thank you!
opentype Posted December 23, 2014 Posted December 23, 2014 Nevermind, I just tried it on my site. Seems like the ID is needed. If you don’t set it up in the FURL, it get’s added at the end and accessing the profile without it returns an error …
Ahmad E. Posted December 23, 2014 Posted December 23, 2014 It is needed, it's just how it works. They get the content of the profile by the member id and not the name.So without id, no content -> error
axpv Posted December 23, 2014 Author Posted December 23, 2014 So... we have not so friendly URLs And what is the point to make URL unique? I didn't understand. I can't for example register a new user with the name "opentype" because this name is already taken.
axpv Posted December 23, 2014 Author Posted December 23, 2014 ... I mean what is the point to make URLs unique with numbers?
Ahmad E. Posted December 23, 2014 Posted December 23, 2014 It needs to be unique so you don't see e.g. two profiles when visiting one.The number is there to get the content connected with it from the database/cache. There is no other way to do it and EVERY forum software makes use of this
TSP Posted December 23, 2014 Posted December 23, 2014 @opentype may want to change his name in the future. Then all the links to his profile would be broken if there was no id-parameter. Someone else may then "steal" his name and thus the links to his profile.Requesting items from a database based on numbers rather than a title text is also generally faster in terms of performance.
axpv Posted December 23, 2014 Author Posted December 23, 2014 @opentype may want to change his name in the future. Then all the links to his profile would be broken if there was no id-parameter. Someone else may then "steal" his name and thus the links to his profile. Requesting items from a database based on numbers rather than a title text is also generally faster in terms of performance. And? ID will be the same if he change the username. I really don't understand why IPS putting those IDs to URLs. I'm not asking not to use IDs when selecting something from DB
Ahmad E. Posted December 23, 2014 Posted December 23, 2014 And? ID will be the same if he change the username. I really don't understand why IPS putting those IDs to URLs. I'm not asking not to use IDs when selecting something from DB No it wouldn't be the same. For example, that's my profile link: http://community.invisionpower.com/profile/536116-ahmad-el-oukly/ Let's assume I had another name before e.g. test, the link would be http://community.invisionpower.com/profile/536116-test/ As you can see both redirect to my correct profile (and it automatically corrects the name)
TSP Posted December 23, 2014 Posted December 23, 2014 @axpv: What?If you want to have the Url: /profile/opentype rather than /profile/1337-opentype then of course the member row (including the member id) would need to be looked up by searching for members in the database whose name matches "opentype" WHEN you visit their profile. You can't grab the member row by id if the system don't know the member id. Yes, the member id would still be used to tell the database that "member with id 1337 wrote this post" or ask "return me all posts from member id 1337". But in order to figure out the member id when you visit their profile (when it's not part of their url) would still require you to look this up from only their name.I answered your question already as for the most likely reason they do it. It allows members to change their name on the community without having to worry about old links to their profile breaking. The performance arguement is less valid in these modern times, but still a secondary argument that have some weight to it.
Hitori Bocchi Posted December 24, 2014 Posted December 24, 2014 How youtube, twitter etc. do those things? They got no IDs in the profile link.
kotaco Posted December 24, 2014 Posted December 24, 2014 How youtube, twitter etc. do those things? They got no IDs in the profile link. Simple, you can only register one account with a unique user name.
.time Posted December 24, 2014 Posted December 24, 2014 Simple, you can only register one account with a unique user name.Isn't that how IPB works?
Ahmad E. Posted December 24, 2014 Posted December 24, 2014 Isn't that how IPB works?Yes but you can change your name.
AlexWebsites Posted December 24, 2014 Posted December 24, 2014 It should still be without ID if its really to be SEO. If someone changes their name, the script should check and see if its used. If it is, it should be up to an admin to either remove the member and "release" the name or the user has to pick a different one. The best url would be yoursite.com/username and that's it.
opentype Posted December 24, 2014 Posted December 24, 2014 It should still be without ID if its really to be SEO. Please explain!How youtube, twitter etc. do those things? They got no IDs in the profile link.Facebook and YouTube also work with IDs by default. My YouTube channel has the true URL youtube.com/channel/UCpzQFy83reu1u0e0elDTRjQNot so fancy, is it? They just provide an additional vanity URL system which is put on top of the ID-based system. However, that makes sense for social networks because you link to your social network sites all the time and might even have them printed on your business card. But I don’t know anyone who advertises the URLs of all the online forums you take part in. IPS has adopted a compromise between IDs and vanity URLs where both are combined. I think that’s a quite good solution. Especially since it allows changes to the display name while the URLs keep working, as it has been pointed out by Ahmad. Sometimes I use my full name on forums, sometimes a pseudonym. But it’s good to have choice and keep that choice. I have logged in vanity URLs with my full name on certain sites in the past and now regret it – But I can’t change them other than deleting the account and start over. With that in mind, I think IPS is doing it the right way.
Christopher Stanley Posted December 25, 2014 Posted December 25, 2014 Well, you could always run a query to update all of the usernames of all posts and such when someone changes their username.Though this option might be slow if your database is HUGE. Just saying, it's possible.Or a more feasible option would to never use the member name as anything unique and only use a unique ID throughout the site, and when a user changes their name, the only thing you would have to update in the database would be the member name that points to the member ID.That way when John Smith changes his name, the old pointer to his ID is removed and a new one is created. Anywhere a name is needed to be displayed you would look up by ID and whatever is in the NAME field would be output.
Farcaster II Posted December 25, 2014 Posted December 25, 2014 Well, you could always run a query to update all of the usernames of all posts and such when someone changes their username.Though this option might be slow if your database is HUGE. Just saying, it's possible.Or a more feasible option would to never use the member name as anything unique and only use a unique ID throughout the site, and when a user changes their name, the only thing you would have to update in the database would be the member name that points to the member ID.That way when John Smith changes his name, the old pointer to his ID is removed and a new one is created. Anywhere a name is needed to be displayed you would look up by ID and whatever is in the NAME field would be output.You can't change external links e.g. coming from Google Search Results or links from other pages
Recommended Posts
Archived
This topic is now archived and is closed to further replies.