Better Magic URLs

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Better Magic URLs

Post by Master_Cylinder »

EXreaction wrote:Displaying the topic title for internal links would be a major improvement
I think the same regarding external links, in most cases. Yahoo does it...and they even truncate longer titles.
Food - Definition and More from the Free Merriam-Webster ...
looks better than:
http://www.merriam-webster.com/dictionary/food
(maybe that's not the best example)

Food, Inc. (2008) - IMDb
Looks FAR better than:
http://www.imdb.com/title/tt1286537/

I think having options, at least for the external links, is win-win because admins can turn them on-off as desired.
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Better Magic URLs

Post by Pony99CA »

Master_Cylinder wrote:I definitely think it should be optional for cases where an admin wouldn't want it but...
[RFC] Better Magic URLs
certainly looks better than:
viewtopic.php?f=108&t=44891
Yes, it does. I'm not so sure about external links, though.

First, there's the latency/downtime problem. Suppose the site is down or takes a while to load. How long should we wait to preview/post?

Second, some sites have stupidly long titles. For example, which is better:

http://www.mercurynews.com/ vs.
San Jose Breaking News, Sports, Weather, Traffic - San Jose Mercury News

Personally, I like the first, although I prefer San Jose Mercury News even more (which is how I would bookmark the site).
Master_Cylinder wrote:I don't need/want website thumbnails embedded and the youtube BBcode thing isn't really what I had in mind here but that could be optional too.
But they are "better" Magic URLs. :D

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Better Magic URLs

Post by Master_Cylinder »

The long titles could be truncated like Yahoo does. Problem solved. :D

While there might be a few cases where the external URL would be better than the title; 90% of the time, the title would be better, imho. I think the pro's outweigh the cons and if both internal and external "conversions" are ACP options then I still think it's win-win.

Thumbnails have nothing to do with this RFC though.. ;)
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Better Magic URLs

Post by Danielx64 »

EXreaction wrote:Displaying the topic title for internal links would be a major improvement
As long as you do some permission checking first, like what I said before.

User avatar
Jessica.
Registered User
Posts: 144
Joined: Wed Feb 09, 2011 8:17 pm
Location: Pennsylvania, USA
Contact:

Re: [RFC] Better Magic URLs

Post by Jessica. »

+1 to this

How about also converting forum links to the forum title? For example, if I posted viewforum.php?f=108 it would automatically turn into [3.x] RFCs

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Better Magic URLs

Post by Pony99CA »

Master_Cylinder wrote:The long titles could be truncated like Yahoo does. Problem solved. :D
Not necessarily. The part that gets truncated might be part you really want. In my Mercury News example, the end is the better piece, not the start.
Master_Cylinder wrote:Thumbnails have nothing to do with this RFC though.. ;)
They don't have anything to do with what you intended. They are clearly relevant to the topic, though, and the community can decide whether they're useful.
Jessica. wrote: How about also converting forum links to the forum title? For example, if I posted viewforum.php?f=108 it would automatically turn into [3.x] RFCs
Absolutely yes. And links to member profiles could be turned into "Profile for [member]", too. In fact, there are lots of cool optimizations that could be done. :)

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Better Magic URLs

Post by Master_Cylinder »

Pony99CA wrote:Not necessarily. The part that gets truncated might be part you really want. In my Mercury News example, the end is the better piece, not the start.
Since when does a solution have to be what everyone would want? You can't please everyone. What about the people that *do* want it truncated just like Yahoo? If YOU don't like how it would be truncated then you could turn off the conversion of outside links if that's how it ends up being implemented.
They don't have anything to do with what you intended. They are clearly relevant to the topic, though, and the community can decide whether they're useful.
No, imho, thumbnails have *nothing* to with the swapping of the url to the title and THAT is what this RFC is about. If you want thumbnails, you could start a new RFC for that and see how much support there is. :D
Jessica. wrote: How about also converting forum links to the forum title? For example, if I posted viewforum.php?f=108 it would automatically turn into [3.x] RFCs
I agree, just about all of the internal magic url links could be converted...
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

User avatar
JoshyPHP
Registered User
Posts: 367
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Better Magic URLs

Post by JoshyPHP »

Converting plain text URLs into something else (images, videos, etc...) is usually part of the "media" features of forum softwares. vBulletin, IPB and XenForo all have something like that. I think that Wordpress does something like that too, in addition to shortcodes. They're usually called "media sites", "media BBCodes" or "media embeds". IMO it's a different concept than simply replacing the text of a link.

In general, I'm wary of scraping content because it's open to abuse; It could be used to DoS the originating server (à la Slowloris), serve as a reflector for other attacks, or even as a way to probe the server's internal network. If we're only talking about internal links, it would be interesting to change the link on the client side via XHR, directly within the textarea. Run a regexp on the textarea's content to find URLs in plain text, use XHR to retrieve the page and extract the title, and replace http://example.org/... with [url=http://example.org/...]title[/url]. That way, the connection originates from the client and the permissions are checked the normal way; No extra precautions to be taken. That would make it harder to abuse.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Better Magic URLs

Post by nickvergessen »

Another idea, can we bring events in place, so one could make an extension for this with tones of config options.
I guess this would be the best idea.
Member of the Development-TeamNo Support via PM

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Better Magic URLs

Post by MichaelC »

+1

When they don't have access just show the link as we do now.

We should have an option to disable this in the ACP though as it would add to the number of queries on the page (and this could be done malicously with say 1,000,000 links on one page would generate 1,000,000 extra queries to be run). We can't get all the topics from the site and just use some as some sites have a lot of topics.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

Post Reply