Jump to content

IPS 4 Profile URL


axpv

Recommended Posts

Posted

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. 

Posted

In 4.0 you can edit the FURL setup if you want to and can handle the consequences. ;-)

Bildschirmfoto_2014-12-23_um_20.36.54.th

​ Thanks! Can you please give an example of how to set it right to use for /profile/username?

Posted

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 …

Posted

So... we have not so friendly URLs :D 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.

Posted

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

Posted

@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.

Posted

@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 :)

Posted

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)

Posted

@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.

Posted

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.

Posted

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.

Posted

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/UCpzQFy83reu1u0e0elDTRjQ

Not 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. 

Posted

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.

Posted

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...