Advertisement:

Author Topic: title topic in url ?  (Read 10357 times)

Offline unknown77

  • Semi-Newbie
  • *
  • Posts: 22
« Last Edit: September 11, 2005, 06:11:37 AM by unknown77 »

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: title topic in url ?
« Reply #1 on: September 11, 2005, 08:35:36 AM »
thx :)

Quote from: [url=http://www.simplemachines.org/community/index.php?topic=48990.msg348465#msg348465][size=2][u][unknown78] in ~title topic in url ?~, simplemachines.org/msg348465[/u][/size][/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.
« Last Edit: September 11, 2005, 08:38:51 AM by gri »

Offline unknown77

  • Semi-Newbie
  • *
  • Posts: 22
Re: title topic in url ?
« Reply #2 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 ;)

Offline 1MileCrash

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,188
Re: title topic in url ?
« Reply #3 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]
The only thing php can't do is tell you how much milk is left in the fridge.



Offline Rudolf

  • SMF Hero
  • ******
  • Posts: 1,934
  • Gender: Male
  • iamanoompaloompa
Re: title topic in url ?
« Reply #4 on: September 11, 2005, 11:09:52 AM »
In MessageIndex.php search for
Code: [Select]
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['firstSubject'] . '</a>'
replace with:
Code: [Select]
'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)

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: title topic in url ?
« Reply #5 on: September 11, 2005, 12:19:22 PM »
In MessageIndex.php search for
Code: [Select]
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['firstSubject'] . '</a>'
replace with:
Code: [Select]
'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.

Offline Rudolf

  • SMF Hero
  • ******
  • Posts: 1,934
  • Gender: Male
  • iamanoompaloompa
Re: title topic in url ?
« Reply #6 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
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: title topic in url ?
« Reply #7 on: September 11, 2005, 01:37:47 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?

Offline dschwab9

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,320
  • Gender: Male
    • Technology, Ministry and Other Ramblings
Re: title topic in url ?
« Reply #8 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"

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: title topic in url ?
« Reply #9 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]

Offline AlienTech

  • Semi-Newbie
  • *
  • Posts: 21
    • 7 Deadly Sins
Re: title topic in url ?
« Reply #10 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

Offline 1MileCrash

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,188
Re: title topic in url ?
« Reply #11 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"
The only thing php can't do is tell you how much milk is left in the fridge.



Offline dschwab9

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,320
  • Gender: Male
    • Technology, Ministry and Other Ramblings
Re: title topic in url ?
« Reply #12 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?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: title topic in url ?
« Reply #13 on: September 13, 2005, 06:54:14 PM »
That's a link to the specific message.

-[Unknown]

Offline AlienTech

  • Semi-Newbie
  • *
  • Posts: 21
    • 7 Deadly Sins
Re: title topic in url ?
« Reply #14 on: September 13, 2005, 10:38:36 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 :)

Offline dschwab9

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,320
  • Gender: Male
    • Technology, Ministry and Other Ramblings
Re: title topic in url ?
« Reply #15 on: September 14, 2005, 12:13:40 AM »
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.