title topic in url ?

Started by unknown77, September 11, 2005, 06:09:56 AM

Previous topic - Next topic

unknown77


gri

#1
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.

unknown77

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 ;)

1MileCrash

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]
The only thing php can't do is tell you how much milk is left in the fridge.



Rudolf

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
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

dtm.exe

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.

Rudolf

  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
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

dtm.exe

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?

dschwab9

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"

[Unknown]

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]

AlienTech

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

1MileCrash

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"
The only thing php can't do is tell you how much milk is left in the fridge.



dschwab9

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?

[Unknown]

That's a link to the specific message.

-[Unknown]

AlienTech

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

dschwab9

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.

Advertisement: