Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
WebMaster9000
Nucleus Disciple


Joined: 17 Jan 2005
Posts: 249
Location: Brooklyn, NY

Post Posted: Sun Jan 03, 2010 4:18 pm   Post subject: In comments, Auto Convert Links to TinyURL
Reply with quote

Simple, can we have a feature that would automatically convert long links in comments to tinyurl, like the way twitter does it. I think it would be much better then the shortening of links that nucleus does.

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address
Leng
Nucleus Guru
Nucleus Guru


Joined: 19 Sep 2004
Posts: 2830
Location: Australia

Post Posted: Sat Apr 24, 2010 11:28 am   Post subject:
Reply with quote

If the core already has an automatic way of shortening the links, I wonder if it could be separated out into a plugin?

There are a variety of URL shortening services, some of which would have to have APIs, perhaps this plugin could hook into those?

_________________

deborahlau.com | To-Do List
Questions? See the FAQ, read the docs, or browse our plugins!!

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address ICQ Number
WebMaster9000
Nucleus Disciple


Joined: 17 Jan 2005
Posts: 249
Location: Brooklyn, NY

Post Posted: Tue Apr 27, 2010 3:18 pm   Post subject:
Reply with quote

[bump]

Any hopes of this happening?

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address
matt_t_hat
Nucleus Geek


Joined: 21 Aug 2005
Posts: 1124
Location: UK

Post Posted: Mon Jul 18, 2011 1:18 pm   Post subject:
Reply with quote

Leng wrote:
If the core already has an automatic way of shortening the links, I wonder if it could be separated out into a plugin?

There are a variety of URL shortening services, some of which would have to have APIs, perhaps this plugin could hook into those?


The theory for this sort of thing is fairly simple. The core already parses URLs and makes them clickable. So option one is to pass these out in an event for whatever needs to be done to them and option two is to copy said core code and make the call to tinyurl.com or bit.ly or whatever and then update the comment body with the new url text (perhaps on add comment).

_________________
Host Plugins | Blog | Hundred Quid A Day | My Big Fat Arse

Back to top

View user's profile Send private message Visit poster's website
WillyP
Nucleus Guru
Nucleus Guru


Joined: 30 Aug 2009
Posts: 767
Location: Pembroke, NH

Post Posted: Mon Jul 18, 2011 3:58 pm   Post subject:
Reply with quote

Perhaps, instead of writing a link text that is of no use to the visitor, write out something like this:

Code:
<a href="http://www.zazzle.com/planet_descent_banner_dark_t_tshirt-235913863126931089">Planet Descent Banner Dark T Tshirts from Zazzle.com</a>


I'm not a coder, is it possible for the the parser to fetch the page title from the target? If so, this way the visitor would at least have a clue where they where going. If not maybe like this:

Code:
<a href="http://www.zazzle.com/planet_descent_banner_dark_t_tshirt-235913863126931089">http://www.zazzle.com/ ... 089</a>

_________________
My Skins | Suncook Carpentry

Back to top

View user's profile Send private message Visit poster's website
matt_t_hat
Nucleus Geek


Joined: 21 Aug 2005
Posts: 1124
Location: UK

Post Posted: Mon Jul 18, 2011 4:25 pm   Post subject:
Reply with quote

WillyP wrote:
Perhaps, instead of writing a link text that is of no use to the visitor, write out something like this:

Code:
<a href="http://www.zazzle.com/planet_descent_banner_dark_t_tshirt-235913863126931089">Planet Descent Banner Dark T Tshirts from Zazzle.com</a>


I'm not a coder, is it possible for the the parser to fetch the page title from the target? If so, this way the visitor would at least have a clue where they where going. If not maybe like this:

Code:
<a href="http://www.zazzle.com/planet_descent_banner_dark_t_tshirt-235913863126931089">http://www.zazzle.com/ ... 089</a>


I've done that before getting the title can be a case for reg-ex annoyingly: This also works if you are willing or the API provides it for you:

<a href="http://tinyurl.com/rndmtxt" title="Planet Descent Banner Dark T Tshirts from Zazzle.com">http://tinyurl.com/rndmtxt</a>

I've written an API for making pretty link boxes which might not be what you are looking for

You can find it here: http://lordmatt.eu/facelink.php

It is not documented but you can just just curl (or whatever) with format=output
thus http://lordmatt.eu/facelink.php?url=$URL_ENCODED_URL&format=output and you get the pretty box all ready for you.

You can also overwrite the supplied title and description if you want with

&t=$URL_ENCODED_TITLE
&d=$URL_ENCODED_DESCIPTION

As long as you don't hammer the server (caching the output your side is nice) you can help yourself. However the server will defend itself so if the API gets badly abused the abusive IP address ends up in the IPTables block list.

_________________
Host Plugins | Blog | Hundred Quid A Day | My Big Fat Arse

Back to top

View user's profile Send private message Visit poster's website
WillyP
Nucleus Guru
Nucleus Guru


Joined: 30 Aug 2009
Posts: 767
Location: Pembroke, NH

Post Posted: Mon Jul 18, 2011 4:48 pm   Post subject:
Reply with quote

Right now the site I had in mind is slow, and I don't mind fixing the occasional html by hand so not a big deal for me. A site where I write, I'll just write html links and no biggie. But I just hate reading somewhere and coming across the typical tiny url link like the example you gave. So I thought I'd put in my two cents worth! Wink
_________________
My Skins | Suncook Carpentry

Back to top

View user's profile Send private message Visit poster's website
wgroleau
Nucleus Expert


Joined: 10 Jun 2006
Posts: 400
Location: Indiana / USA

Post Posted: Mon Apr 23, 2012 4:33 am   Post subject: Why go to tinyurl ?
Reply with quote

If you are going to provide an alternate link, why not do it in the DB? it's pretty trivial—just store the URI in a table with a short hash code which becomes the new URI. More efficient than making a retrieval from some other service.

I like all the ideas, though, about different ways of making the link not be such a mystery.

I would further suggest that if "full disclosure" is not possible, then provide something similar to preview.tinyurl.com

_________________
Wes Groleau

Back to top

View user's profile Send private message
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group