Light URL Plugin Maybe?

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #15, on April 16th, 2012, 11:30 PM »
Quote from Arantor on April 16th, 2012, 11:19 PM
It's an interesting concept but I'm not sure plugins will behave cleanly with it, I suspect unless it's managed pretty much automatically they won't use it.
It doesn't matter that much, does it..?
Quote
Mind you, most plugins will only use PURLs features that are managed automatically (very few plugins for SMF ever cared, and those that did, were pretty much portals and/or PURLs type plugins in the first place), so if it can be done transparently and 'just work', plugins can use it but otherwise they probably won't.
They don't have to. They simply can...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #16, on April 16th, 2012, 11:35 PM »
*shrug* The bottom line is that if you provide a system in the core, other plugins should generally adhere to it, but the harder you make it for them to use, the less likely they are to use it. So make it easy for plugins to do things - i.e. have it 'just work' and plugins will benefit without having to specifically code for it.

But if it's effort for plugins to support it, they won't, making the exercise a bit of a waste.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

MultiformeIngegno

  • Posts: 1,337
Re: Light URL Plugin Maybe?
« Reply #17, on April 17th, 2012, 12:42 AM »
I can't really understand all this interest on URL shorteners.. You still won't remember something like g.co/hyT&tR SO WHY CHANGE THE URL??

1. There's no benefit in memorabilty
2. Your link relies on a 3rd party server (if they change their URLs structure OR their server goes down OR their company fails OR for whatever reason the link doesn't work there's nothing you can do
3. Loading is slower (also if it's the speedest server on earth the loading will be slower than the original link because of the redirection)..

In short: I can't find a reason for an external url shortner to exist. For internal... dunno.. I'm ok with PURLs.. :P

oOo--STAR--oOo

  • @Arantor Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time
  • Posts: 43
Re: Light URL Plugin Maybe?
« Reply #18, on April 17th, 2012, 01:27 AM »Last edited on April 17th, 2012, 01:46 AM
Quote from MultiformeIngegno on April 17th, 2012, 12:42 AM
I can't really understand all this interest on URL shorteners.. You still won't remember something like g.co/hyT&tR SO WHY CHANGE THE URL??

1. There's no benefit in memorabilty
2. Your link relies on a 3rd party server (if they change their URLs structure OR their server goes down OR their company fails OR for whatever reason the link doesn't work there's nothing you can do
3. Loading is slower (also if it's the speedest server on earth the loading will be slower than the original link because of the redirection)..

In short: I can't find a reason for an external url shortner to exist. For internal... dunno.. I'm ok with PURLs.. :P
No it won't be a 3rd party service.. This will be your script installed here and managed directly here!
There will be no 3rd party access, or control. This is just the script I made that you can install yourself!


My idea was to connect an API automatically to every post that is made and so forth.
So you will have a Light URL that you can simply click and share with other users.

So the Light URL will be displayed at the top or bottom of the message and you can simply give to your friends and they can navigate to the post/topic
I understand that what you see right now is an input box and yeah can be like time wasting to keep making Light URL's yourself.
So the idea is to make it automatic and provide a Light URL for every topic/post made, using Nao's idea for the t/m to display if its a topic/message.

I mean if you have boards/sub boards and long topic names, it could be convenient.

Your right on the fact about, will the user use it? Is it convenient.
Well the option is there, some will, some won't.
It is sure a cleaner way to share links and looks better.

nolsilang

  • Lurking <i class=
  • Posts: 106
Re: Light URL Plugin Maybe?
« Reply #19, on April 17th, 2012, 04:37 AM »
I'm sure this is why it's a plugin, it's optional.YMMV

WIll the shortlink can be linked to specific post? maybe something like example.com/go/thash#postnumber

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #20, on April 17th, 2012, 02:20 PM »
Quote
I mean if you have boards/sub boards and long topic names, it could be convenient.
That's the thing, it isn't convenient.

domain.com/go/b#1 is shorter than domain.com/index.php?board=1 yes (but it requires rewrites and you can't get around that) and I'm not sure it's more convenient or easy to follow.

I won't even get into the performance issues linked to having /go/b#1 being rerouted to index.php?board=1 (since there's by definition two separate routes, knowing that the #1 won't be passed to systems normally)

But you've all missed the point I went at great lengths to try and explain. I got the fact that it would be an automatic thing, but if you make it a plugin, you have to either side-swipe other plugins and rewrite all their URLs (on top of the code in Wedge itself), or you have to expect the plugins to support it through choice. The former requires a lot of work, and the latter just isn't going to happen.

Now, let's say for the sake of argument that you make it core, presumably in addition to Pretty URLs. Not only, then, do you have to spend more time testing it, it makes it harder for plugin authors to work with, because there's three schemes instead of two that they have to contend with. I don't even see authors making real use of PURLs as it is, let alone having to navigate multiple schemes of URL routing.

nolsilang

  • Lurking <i class=
  • Posts: 106
Re: Light URL Plugin Maybe?
« Reply #21, on April 17th, 2012, 02:26 PM »
Dumb question: Maybe integrate with bit.ly API?you can use custom domain too IIRC.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #22, on April 17th, 2012, 02:30 PM »
And that goes back to what was said earlier about having a reliance on a third party. And even then there are still problems with doing it.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #23, on April 17th, 2012, 06:56 PM »
Quote from 0x on April 17th, 2012, 04:37 AM
WIll the shortlink can be linked to specific post? maybe something like example.com/go/thash#postnumber
/go/mHASH would redirect to /?msg=unhashed, which in turns redirects to /msgXXX/#msgXXX... (Of course I'd be skipping the ?msg step, no need to redirect twice...)
Posted: April 17th, 2012, 06:53 PM
Quote from Arantor on April 17th, 2012, 02:20 PM
domain.com/go/b#1 is shorter than domain.com/index.php?board=1 yes (but it requires rewrites and you can't get around that)
Of course, there's no reason not to provide a /?go=tHASH alternative if you have problems with htaccess files... It's just one extra char ;)
Quote
But you've all missed the point I went at great lengths to try and explain. I got the fact that it would be an automatic thing, but if you make it a plugin, you have to either side-swipe other plugins and rewrite all their URLs (on top of the code in Wedge itself), or you have to expect the plugins to support it through choice. The former requires a lot of work, and the latter just isn't going to happen.
I'd really like to have this as core... (But disabled by default, probably. I can see the interest in doing that. I just don't know if it's useful everywhere.)
Quote
Now, let's say for the sake of argument that you make it core, presumably in addition to Pretty URLs. Not only, then, do you have to spend more time testing it, it makes it harder for plugin authors to work with, because there's three schemes instead of two that they have to contend with. I don't even see authors making real use of PURLs as it is, let alone having to navigate multiple schemes of URL routing.
I don't see where there's a problem with it...?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #24, on April 17th, 2012, 08:41 PM »
For putting this in core, I'm not sure why this is useful as compared to having Pretty URLs in core, but maybe that's just me
Quote
I don't see where there's a problem with it...?
If you're creating short hashes that include t or b as references to topics and boards, that's fine - but how does that work for plugins? What hoops do plugins have to go through in order to work? Plugins will naturally just fall in with pretty URLs (e.g. domain.com/do/pluginaction) without any work, and if they want to use pretty URLs, they can declare extra filters, but even that is going to be more effort than it's usually worth, so they won't bother. If you not expect them to have to work with yet another URL routing scheme (optionally or otherwise), it's just more hassle for plugin authors, especially when people will ask them how to make it work.

More than one person asked how to make Aeva Media work with pretty URLs, and the same's going to be more and more true when it's more thoroughly implemented (since it's all in the core now)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #25, on April 18th, 2012, 05:16 PM »
Quote from Arantor on April 17th, 2012, 08:41 PM
For putting this in core, I'm not sure why this is useful as compared to having Pretty URLs in core, but maybe that's just me
Hmm... Maybe because it's not very hard to implement, mostly... Although I haven't even added it to my to-do-list...
Quote
If you're creating short hashes that include t or b as references to topics and boards, that's fine - but how does that work for plugins?
They could just take another letter of the alphabet... :P
Or even several letters... (This would ensure their hashes are tested against in priority.)
Quote
What hoops do plugins have to go through in order to work? Plugins will naturally just fall in with pretty URLs (e.g. domain.com/do/pluginaction) without any work, and if they want to use pretty URLs, they can declare extra filters, but even that is going to be more effort than it's usually worth, so they won't bother.
I don't think they will, either.
Quote
If you not expect them to have to work with yet another URL routing scheme (optionally or otherwise), it's just more hassle for plugin authors, especially when people will ask them how to make it work.
Except that they don't have to use that scheme at all...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #26, on April 18th, 2012, 07:10 PM »
Quote
Except that they don't have to use that scheme at all...
This is the problem: users are going to expect them to do so. Just as users even now bitch about the fact that Aeva doesn't properly support pretty URLs. The more complex the ways you make it accessible, the harder it is for plugins to do it.

Why, exactly, do we need another route to access content, when we already have index.php?action=something;param1=val1;param2=val2 and /do/something/whatever/whatever ?

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Light URL Plugin Maybe?
« Reply #27, on April 18th, 2012, 07:42 PM »
...Because it can then be used directly in tweets, things like that...?
Granted, it's of little use, but it's not of NO use at all. :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Light URL Plugin Maybe?
« Reply #28, on April 18th, 2012, 07:48 PM »
Except that Twitter will automatically shove its own shortener in there anyway for almost every URL, so in any case you're going via t.co/ to get to your site.

I'm not disputing that it has *some* use, but I'm disputing its use when alongside shortish URLs and pretty URLs.

Nao

  • Dadman with a boy
  • Posts: 16,082