News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Titled Links

Started by Mick., July 14, 2007, 12:18:47 PM

Previous topic - Next topic

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

karlbenson

Matt does this mod do Internal links aswell?

It would be very SEO friendly to have it dig out the title to any untitled urls posted in posts.
(and save time aswell - for example on here)

I was actually planning on making this mod. Its been on my to-do list for a while. But I just came across your mod.

SlammedDime

By internal, do you mean, if I post

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

Will it change to

[url=http://www.simplemachines.org/community/index.php?topic=182573.40]Titled Links[/url]

Then the answer is yes.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

karlbenson


L.G.S

Woah forgot about this. Will try the script very soon.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


karlbenson

maybe for internal links it would be better to query the database than use file_get_contents.
It would be mean less queries.  Although you'd have to make sure the topic being read is in a non-private forum.

SlammedDime

Quote from: karlbenson on August 10, 2007, 03:42:54 PM
maybe for internal links it would be better to query the database than use file_get_contents.
It would be mean less queries.  Although you'd have to make sure the topic being read is in a non-private forum.
Not a bad thought at all.  I'll implement that in the next version.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Mskina

#47
Quote from: Matt @ ARTcom on August 10, 2007, 12:31:13 PM
if I post

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

Will it change to

[url=http://www.simplemachines.org/community/index.php?topic=182573.40]Titled Links[/url]

Then the answer is yes.
Hi!

If i post a internal link, it renames into "Ingresar" (Login in spanish)

Only works on no-ocults forums?

Fustrate

Well, the tool told me to...

QuoteStats:
  5627 messages
  47 had URLs to convert
  61 URLs were converted
  Overall, the script took 267.245465517 seconds to execute.
  About 5.68607373441 seconds per message
  About 4.3810732052 seconds per url

not many urls :P surprising, given the type of forum it is... but whatever :)
Steven Hoffman
Former Team Member, 2009-2012

karlbenson

@Mskina
If a guest can't see the topic, then this script won't be able to get the topic title.
(because currently it gets/sources the internal links externally)

Chriss Cohn

Great Mod Matt!
Before i install, do i understand it right, that if i put the title in for myself then the mod doest look-up the title?

What is the thing with the guests? They can acces not all my boards, so is this a problem?

Regards, Christian

karlbenson

In boards where your guests cannot access, any use of this mod will end up with links titled along the lines of asking you to login. (i believe)
(evne if you are already logged in)

SlammedDime

What karlbenson said is correct.  When I do the new version with local lookups, I'll code it so that the url isn't changed if guests don't have access to the board that the topic is in.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Chriss Cohn

Thx, just tried the mod and i think there is still alot room to improve it...
I know a similar "mod" from vbulletin and there are 2 features more, which i think they must strongly includet here also:

1. Even if you use to put a URL into a BB-Code Tag [*URL] or with this button -> , it should lookup the URL if you dont put a title for it in.

So if i write this for example: [*URL]http://www.simplemachines.org[/URL] It should find the Title a use it for it...
But if i put in this for example:[*URL=http://www.simplemachines.org]Simplemachines is cool![/URL] it should to use the title which the user put in (in this case "Simplemachines is cool).

2. It must be capable of finding non-www URLS and Internal URL + it should work when using in a area where guests can not access...


So Matt, if you put this in, then you are "the true god of SMF-URLS". No, this would be great if you could put these 2 point in....


Regards, Christian

karlbenson

Quote from: SlammedDime on August 17, 2007, 05:05:02 PM
What karlbenson said is correct.  When I do the new version with local lookups, I'll code it so that the url isn't changed if guests don't have access to the board that the topic is in.

OMG.  I was like who the **** are you.  Then realised you have changed your name Matt. :D :D :D

SlammedDime

Quote from: g-c on August 17, 2007, 05:07:31 PM
Thx, just tried the mod and i think there is still alot room to improve it...
I know a similar "mod" from vbulletin and there are 2 features more, which i think they must strongly includet here also:

1. Even if you use to put a URL into a BB-Code Tag [*URL] or with this button -> , it should lookup the URL if you dont put a title for it in.

So if i write this for example: [*URL]http://www.simplemachines.org[/URL] It should find the Title a use it for it...
But if i put in this for example:[*URL=http://www.simplemachines.org]Simplemachines is cool![/URL] it should to use the title which the user put in (in this case "Simplemachines is cool).

2. It must be capable of finding non-www URLS and Internal URL + it should work when using in a area where guests can not access...


So Matt, if you put this in, then you are "the true god of SMF-URLS". No, this would be great if you could put these 2 point in....


Regards, Christian

On point 1 - I'll code this in and create an additional option for it.

On point 2 - it will get non www preceded urls so long as there is http://.  Its quite difficult to determine urls otherwise.    As for guests / titles... I don't think this would be a good feature.  Lets say you have a topic titled 'LittleJohnny is a pain the ass' in a team board, and a team member posts a link to that topic on a public board, and then LittleJohnny happens to see that post on the public board with a link to a topic about him that he can't access.  Seems wrong imo, and its not something I want to have users of this mod complaining about in the future.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Chriss Cohn

#56
QuoteOn point 1 - I'll code this in and create an additional option for it.
Great! Nothing more to say then just: Great work!
Thanks!

QuoteOn point 2 - it will get non www preceded urls so long as there is http://.  Its quite difficult to determine urls otherwise.
If this will be in in Next version - great! I just tried it with some links and it had not worked(1.1c)....

QuoteAs for guests / titles... I don't think this would be a good feature. Lets say you have a topic titled 'LittleJohnny is a pain the ass' in ateam board, and a team member posts a link to that topic on a publicboard, and then LittleJohnny happens to see that post on the publicboard with a link to a topic about him that he can't access.  Seemswrong imo, and its not something I want to have users of this modcomplaining about in the future.

I think we talking away from each other, i explained it in a confusing way or you didn't understand it, but related to this quote:
Im using SEF-Urls, so if i or somebody would link withing a public-board into a team-board (who the hell do something stupid - all my mods are not allowed to do so), they would still see the topic-name because of the SEF-URLS.

But my entire Request on the second part of Point 2 was:
This mod should also work(lookup titles) if im posting inside an non-public team-board a URL to any Adress in the Internet. Currently it wont work in non-public areas...
But that is also not bad to solve it:
QuoteI'll code it so that the url isn't changed if guests don't have access to the board that the topic is in.


Regards, Christian

SlammedDime

Quote from: g-c on August 17, 2007, 05:52:49 PM
This mod should also work(lookup titles) if im posting inside an non-public team-board a URL to any Adress in the Internet. Currently it wont work in non-public areas...
But that is also not bad to solve it:
QuoteI'll code it so that the url isn't changed if guests don't have access to the board that the topic is in.


Regards, Christian

It should do this without a problem already.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

L.G.S

Don't know what ya php script did but it got to 6% (took 20 mins) then it timed out on me. Why would it do that? Didn't convert any URLs from what I can see either.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


SlammedDime

Did it say maximum execution time exceeded?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: