• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XenForo Friendly URL's, question for Kier or Mike

mrGTB

Well-known member
#1
Just wondering what made either Kier or Mike include the Thread ID at the end of the Thread Title using a Dot (full stop) as a separator like this below.

threads/demo-thread.1728/

Why go with: .1728/

Just wondering what the thinking is behind it? And why you didn't use something like this instead.

threads/demo-thread/1728/

or this:

threads/1728/demo-thread/
 

Shamil

Well-known member
#2
If you have two threads with the same name, how do you differentiate? The thread ID allows for this, but also, people don't care about the numbers, only the letters. Stick it at the end so no one reads it.

I suppose a dot looks round and nice - maybe warm and cuddly.
 

Mike

XenForo developer
Staff member
#4
It's mostly down to ambiguity resolution. There are situations where you may not have an item to act on, and it's important to be able to resolve content vs action clearly.

Otherwise, we try to use the / as a drill-down (folder) sort of separator, so I'm not sure about type/title/id/action (or vice versa) approach.
 

Ahmed

Well-known member
#5
For me I'd like it to be: "threads/1728/demo-thread/" instead of the current way, of course if there won't be any issue with that. :)
 

Anthony Parsons

Well-known member
#6
I initially didn't like the domain structure, but since thinking on it more, I actually like the way it has been done and not just a drill down folder structure that everyone else is doing, its unique and doesn't emphasise the thread id as much as a folder structure would. It tends to fade out the way it is compared to becoming part of the hierarchy.
 

Kier

XenForo Developer
Staff member
#7
Reasons:

1) People read left to right (well, we do in English). Therefore, better to see /threads/thread-title than /threads/{meaningless-number}-thread-title

2) I don't like the unnecessary appearance of directories, which /threads/1234/title would give you. To me, this suggests that there could be other content within the 1234 directory, which there isn't.

3) We use a dot because it's a prohibited character in our title->url conversion, and people are used to seeing files with an extension that they can safely ignore

4) If we separated the id from the title with a dash, you could end up with this: /threads/my-phone-number-is-0800-111-111-1234, which is clearly not good. Our URLs would represent that as /threads/my-phone-number-is-0800-111-111.1234, removing the ambiguity as well as possible.
 
#8
Reasons:

1) People read left to right (well, we do in English). Therefore, better to see /threads/thread-title than /threads/{meaningless-number}-thread-title

2) I don't like the unnecessary appearance of directories, which /threads/1234/title would give you. To me, this suggests that there could be other content within the 1234 directory, which there isn't.

3) We use a dot because it's a prohibited character in our title->url conversion, and people are used to seeing files with an extension that they can safely ignore

4) If we separated the id from the title with a dash, you could end up with this: /threads/my-phone-number-is-0800-111-111-1234, which is clearly not good. Our URLs would represent that as /threads/my-phone-number-is-0800-111-111.1234, removing the ambiguity as well as possible.
I guess this is the best foolproof way of doing it.
 

mrGTB

Well-known member
#9
Reasons:

1) People read left to right (well, we do in English). Therefore, better to see /threads/thread-title than /threads/{meaningless-number}-thread-title

2) I don't like the unnecessary appearance of directories, which /threads/1234/title would give you. To me, this suggests that there could be other content within the 1234 directory, which there isn't.

3) We use a dot because it's a prohibited character in our title->url conversion, and people are used to seeing files with an extension that they can safely ignore

4) If we separated the id from the title with a dash, you could end up with this: /threads/my-phone-number-is-0800-111-111-1234, which is clearly not good. Our URLs would represent that as /threads/my-phone-number-is-0800-111-111.1234, removing the ambiguity as well as possible.
Well I agree using a DOT is better than using a Minus Sign (-) as the seperator for the Thread ID, If it's going to be included as part of the Thread Title itself. Reason being, imagine this Thread Title using a minus sign for the Thread ID seperation shown below.

War-of-the-worlds-2010-2014
2014 - being the thread ID. That would confuse things in cases like that.

So yes, better to have this below

War-of-the-worlds-2010.2014
But do you think it looks better than this?

/2014/War-of-the-worlds-2010
I think any Thread Titles that also include the Thread ID, can look odd when the Thread Title uses a date like: "year", month, day" at the end of the title. If the Thread ID is placed there also.
 

mrGTB

Well-known member
#10
Also, here is an example of a thread title taken from my forum below. Take note how it says this in the URL. "topic/24/".

Code:
http://mrgtb.com/topic/24/ufo-space-craft-sightings-becoming-much-more-frequent/
Now to me that doesn't indicate another directory like you say, but tells you instead it's topic 24.

It could even read "thread/24/" and still make the same sense.
 
#11
Also, here is an example of a thread title taken from my forum below.

Code:
http://mrgtb.com/topic/24/ufo-space-craft-sightings-becoming-much-more-frequent/
Take note how it says this in the URL. "topic/24/".

Now to me that doesn't indicate another directory like you say, but tells you instead it's topic 24.
Actually it does because each slash after the domain name indicates a directory.
 

mrGTB

Well-known member
#12
Well, I would argue that this below is confusing to the reader seeing the thread title in the URL.

War-of-the-worlds-2010.2014
 
#13
Well, I would argue that this below is confusing to the reader seeing the thread title in the URL.

War-of-the-worlds-2010.2014
I think the problem there is we are underestimating the intelligence user :p Most users are smarter than that.

Random quote - Program for idiots and only idiots will use the program.
 

Nick

Well-known member
#14
Well I agree using a DOT is better than using a Minus Sign (-) as the seperator for the Thread ID, If it's going to be included as part of the Thread Title itself. Reason being, imagine this Thread Title using a minus sign for the Thread ID seperation shown below.

2014 - being the thread ID. That would confuse things in cases like that.

So yes, better to have this below

But do you think it looks better than this?

I think any Thread Titles that also include the Thread ID, can look odd when the Thread Title uses a date like: "year", month, day" at the end of the title. If the Thread ID is placed there also.
Well, I would argue that this below is confusing to the reader seeing the thread title in the URL.

War-of-the-worlds-2010.2014
Re-read Kier's points #1 and #2.
 

mrGTB

Well-known member
#15
Already have, don't agree. Simply because that can be got around by boxing clever to indicate in the URL stucture it's not as he says. Let's forget: /topic/24/thread-title/

Use this instead to make more sense: /threadid-24/topic-title/

Put the Thread ID code after "threadid" using (-thread_id)
 

mrGTB

Well-known member
#17
So can we take it then there are two sub directory's here called "Community" and "Forums" looking at this URL structure here?

Code:
http://xenforo.com/community/forums/announcements/
That's defeats the whole argument I'd say.
 

Andy Huang

Well-known member
#19
The "community" part can easily be stripped though.
Looking at the structure of the URLs here, I'd wager that the "community" part is there because the software is installed in the "community" sub folder, so they can do an actual webpage for front-end later. If your site is a forum only site, you can install it in the root folder and have just /forums as (optional?) handler. You can most likely also use a CMS addon to add pages into the root directory should you choose to do so.