We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

URL Field Extension

Development and Programming

gridonic's avatar
gridonic
231 posts
17 years ago
gridonic's avatar gridonic

Hi

Just finished creating my first extension based on this thread.

The latest version including a short documentation can be found here:

URL Field Extension for Expressionengine

I really love EE, don’t get me wrong, but one thing i have to rant about is the missing API for developers. Hooks and all are nice, but if you have use preg_replace so many parts of HTML code to build-in your functionality the happyness stops. I just hope EE 2.0 will correct this and provide a better API for developers.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Peter,

Let me be the first to say a very big well done on this one. A fantastic little extension that does exactly what it says on the tin and then some!! 😉

Brilliant addition to ExpressionEngine. Thanks again!

Best wishes,

Mark

       
Versa Studio's avatar
Versa Studio
572 posts
17 years ago
Versa Studio's avatar Versa Studio

Peter,

Great work. I just posted a request for this last week, and here it is! Bravo.

Ben

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

This might be totally missing the point of your extension, but would it be possible to add an option to remove the formatting that is produced through this field type? I wanted to do something like this:

<a href="http://{url_field}">Source</a>

I know this can be done with a standard text field, but I think the validation check is a good idea. I’ll be having some more novice computer users updating the site, so it would be great if the validation check can give them a sense of pattern for publishing.

Cheers!

       
gridonic's avatar
gridonic
231 posts
17 years ago
gridonic's avatar gridonic

Hi

I’m not aware of any formatting issues? You can chose the url_field (as any other field type) not to have any formatting.

If I type “http://www.example.com” in the url_field, the url is returned exactly as is.

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

That’s odd.. I’m not getting the same results. When I try and edit the formatting for the URL Field, it basically says that “Text formatting is not available for your chosen field type”.

When I plug in {source} into a template, which is the name of my URL field, I get this outputted:

<a href="http://hypebeast.com/2008/06/nike-blazer-lax-los-angeles-exclusive/">http://hypebeast.com/2008/06/nike-blazer-lax-los-angeles-exclusive/</a>

Seems formatting is done automatically, so I can’t specify a name for the link. Ideas are appreciated.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Try going to :

Admin->Weblog Administration->Weblog Management->Edit Preferences (Your Weblog Name)->Weblog Posting Preferences->

You should see an option that says :

Automatically turn URLs and email addresses into links?

Change that to No and see if that fixes it?

Best wishes,

Mark

       
gridonic's avatar
gridonic
231 posts
17 years ago
gridonic's avatar gridonic

Thanks Mark, faster as usual 😛

That should chang the behaviour indeed mr_dimsum, please report back if not.

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

one question/bug/feature request… it seems that it only validates the field when you click the little icon. I was assuming that it would check it on a submission. I can’t assume that my users will actually remember to push the link button every time. I want to be sure they have a correctly formed url even if they don’t remember to push the icon button.

Also, I noticed that it doesn’t see https:// as a valid url link.

       
gridonic's avatar
gridonic
231 posts
16 years ago
gridonic's avatar gridonic

Hi

Thanks for getting back to us, we’re aware of the fact that this functionality is not included in the current release, but we’ll incorporate it for the next one.

Currently, we’ve our hands pretty full with client work, as soon as it gets better, we’re release a new version along with an entire new extension (something cool for freeform 😉.

Regards Peter.

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

can’t wait for the new updates! right now i can’t really use the extension, because I need the https:// support.

       
gridonic's avatar
gridonic
231 posts
16 years ago
gridonic's avatar gridonic

Hi James

You can update to the latest version which fixed the https:// issue as well as the formatting issue, read the comments on our blog on how to fix the formatting.

We also have plans to add CURL checking of URLs so that upon entry submission, the extension would check using CURL is the header response returned from the URL is valid and thus the url itself. This should be more effective than using just a regular expression. Hopefully we’ll be able to release another update addressing this issue.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg
We also have plans to add CURL checking of URLs so that upon entry submission, the extension would check using CURL is the header response returned from the URL is valid and thus the url itself.

Hi Peschehimself– thanks for all your work on this. Would it be possible to make curl checking optional (a settings checkbox or something…)?

Thanks, Matt

       
gridonic's avatar
gridonic
231 posts
16 years ago
gridonic's avatar gridonic

Hi Matt

Yes, of course, the CURL will a have a separate settings value, but it will most probably be a global settings instead of a per weblog setting.

       
Benjamin David's avatar
Benjamin David
77 posts
15 years ago
Benjamin David's avatar Benjamin David
Try going to : Admin->Weblog Administration->Weblog Management->Edit Preferences (Your Weblog Name)->Weblog Posting Preferences-> You should see an option that says : Automatically turn URLs and email addresses into links? Change that to No and see if that fixes it? Best wishes, Mark

Do you know some way we could enable/disable the “Automatically turn URLs and email addresses into Links ? To no” on the fly from a plugin file ? Looks like impossible as if the option is set to “Yes” it seems to break the template parsing when passing a channel/weblog variable into a plugin parameter. But I would be very interested in finding such a fix for the Video Player plugin. Plugins like ImgSizer, CSVGrab also seem to have such issues with URL parameters.

Thanks!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.