Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: unknown77 on September 11, 2005, 06:09:56 AM

Title: title topic in url ?
Post by: unknown77 on September 11, 2005, 06:09:56 AM
Hi there,

instead:
http://www.simplemachines.org/community/index.php?topic=48990.0

if i can make it to be:  http://www.simplemachines.org/community/title_topic_in_url.html


thx :)
Title: Re: title topic in url ?
Post by: gri on September 11, 2005, 08:35:36 AM
Quote from: unknown77 on September 11, 2005, 06:09:56 AM
thx :)

Quote from: "url=http://www.simplemachines.org/community/index.php?topic=48990.msg348465#msg348465][unknown78] in ~title topic in url ?~, simplemachines.org/msg348465[/url]"]
~Title topic in url ?~ is not unique.

There may by more than one topic
with the same title in a one forum..
  of either the same Author or of different.

A msg number provides the uniqueness of the link on the forum.
Global link with msg number provides the uniqueness of the post
on the planet.
Title: Re: title topic in url ?
Post by: unknown77 on September 11, 2005, 08:41:58 AM
ok..  this is not so hard to understand what i mean ? i hope

look for this exemple.. 

http://www.simplemachines.org/community/index.php?topic=48990.0?title_topic_in_url.html

now u have a UNIQUE address..  very easy ;)
Title: Re: title topic in url ?
Post by: 1MileCrash on September 11, 2005, 10:15:53 AM
im pretty sure this would require a VAST knowledge of php, but look in querystring.php. As far exactly how to do it, i dont know.  Wait for [Unknown]
Title: Re: title topic in url ?
Post by: Rudolf on September 11, 2005, 11:09:52 AM
In MessageIndex.php search for

'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['firstSubject'] . '</a>'


replace with:

'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0?' . rawurlencode($row['firstSubject']) . '">' . $row['firstSubject'] .'</a>'


Not a big deal, but strange things could happen if there are weird characters in the subject.
Rudolf
Title: Re: title topic in url ?
Post by: dtm.exe on September 11, 2005, 12:19:22 PM
Quote from: rudiksz on September 11, 2005, 11:09:52 AM
In MessageIndex.php search for

'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['firstSubject'] . '</a>'


replace with:

'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0?' . rawurlencode($row['firstSubject']) . '">' . $row['firstSubject'] .'</a>'


Not a big deal, but strange things could happen if there are weird characters in the subject.
Rudolf

That would only change the link used in the message index.  It would not bring you to the topic because the topic URL will still remain the same.
Title: Re: title topic in url ?
Post by: Rudolf on September 11, 2005, 12:42:56 PM
  Actually it brings you to the topic in question, and it will show the title in the url. Of course the title is not changing anything, it's there just for you to see it. The script is not bothered by an extra parameter.

It works over my forum.  :-\
Rudolf
Title: Re: title topic in url ?
Post by: dtm.exe on September 11, 2005, 01:37:47 PM
Quote from: rudiksz on September 11, 2005, 12:42:56 PM
  Actually it brings you to the topic in question, and it will show the title in the url. Of course the title is not changing anything, it's there just for you to see it. The script is not bothered by an extra parameter.

It works over my forum.  :-\
Rudolf

Oh, so the URL is kept the same, just with the added topic title?
Title: Re: title topic in url ?
Post by: dschwab9 on September 11, 2005, 02:37:58 PM
It won't affect actually loading the topic because it's just another variable in the querystring which will just get ignored since nothing references it.

BUT, you really need a search and replace to eliminate special characters, replace spaces with underscored, and probably also truncate it at X number of characters and elimate words like "and" and "the".

"If someone were to $#W%@#%$@#$@# type a really long subject @Q#$#@$ like this with lots of )((!)"L<?| special characters, it could be bad"
Title: Re: title topic in url ?
Post by: [Unknown] on September 11, 2005, 02:48:04 PM
More importantly, it would kill SEO.

For best search engine indexing, you want your links to point to the same place as much as possible.  In other words, if one link has the title in it, they all should.  Otherwise, it's going to hurt your ranking and indexing, from what I understand, at least as much as it helps - if not more.

Changing all the links gets _very_ complicated.

-[Unknown]
Title: Re: title topic in url ?
Post by: AlienTech on September 13, 2005, 09:10:34 AM
it is a built in option with another BB and according to them, it's there to increase SEO.. 

they call it SEO friendly thread titles
Title: Re: title topic in url ?
Post by: 1MileCrash on September 13, 2005, 04:27:44 PM
read what [Unknown] is saying. He doesnt mean that having titles in the url in itself would hurt ranknig, he is saying that your links should all be 'structured' the same. "If one link has a title in it, they all should"
Title: Re: title topic in url ?
Post by: dschwab9 on September 13, 2005, 05:54:57 PM
It's usually bad to have two links pointing to the same page, but it seems we already have that.

We have topic,24367.msg251278.html#msg251278   and topic,24367

I userstand the need for the anchor, but what's the .msg251278 for?
Title: Re: title topic in url ?
Post by: [Unknown] on September 13, 2005, 06:54:14 PM
That's a link to the specific message.

-[Unknown]
Title: Re: title topic in url ?
Post by: AlienTech on September 13, 2005, 10:38:36 PM
Quote from: Tippmaster on September 13, 2005, 04:27:44 PM
read what [Unknown] is saying. He doesnt mean that having titles in the url in itself would hurt ranknig, he is saying that your links should all be 'structured' the same. "If one link has a title in it, they all should"

I pretty much figured people would know it would be a global forum setting to take advantage of the feature :)  At least that's how I used it in the past :)
Title: Re: title topic in url ?
Post by: dschwab9 on September 14, 2005, 12:13:40 AM
Quote from: [Unknown] on September 13, 2005, 06:54:14 PM
That's a link to the specific message.

-[Unknown]

I was kinda thinking it could just be  topic,24367.html#msg251278

But I guess that would only work if it was on page 1, so scratch that thought.

But, wouldn't topic,24367.15.html#msg251278 work if it was on the second page?

Seems like having a separate link for each message may be hurting SEO since they all point to the same page (the message index for that thread).    If the links could all be the same with only the achor differing, SEO wouldn't be an issue.