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

Plugin request: URL checker

Development and Programming

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

Hi. I’m building a site for a nightclub. For each artist that plays one or more shows, we are tracking one or more URLs for that artist.

I use a text field for this, no problem.

What would be cool: a javascript that puts an icon or button next to the text field. When clicked, the icon will open the URL in a new window.

This lets clients check the URLs they are using before saving them. I’m useless at PHP, but I imagine someone could create this pretty easily. I did it once in ColdFusion.

I supposed you could add a new field type called “URL”.

Thanks,

Ben

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

Hi Ben,

Not totally sure I understand what you are after but is this something that would help at all?

I think that is what you are asking for isn’t it?

Best wishes,

Mark

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

Mark,

Sort of. I should have been more specific–I want something that works in EE entries. See attached. Clicking the icon would simply bring up the URL so one could check it.

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

Aha I see what you mean now! 😉

Yes that would require an extension to be made to make a new field type as you have mentioned. I would love to say I would give this one a go myself but those kinds of extensions at the moment go a little over my head. I’m sure someone in here will know how to do that though and will post the solution. I’m off to lurk in the shadows hoping someone will come in and let you know how to do that so that I can learn from it 😉

Hope some kind soul comes in and helps you out on this one so that we can all get something out of it and sorry for the slight misunderstanding on this one.

Hope it gets sorted soon.

Best wishes,

Mark

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

Also I think that this (I could be wrong on this though) may require some Javascript to do otherwise when the control panel page first loads then there isn’t obviously going to be anything in that field so the button wouldn’t be able to be hard-coded to the value in it. The button would have to pick up the value of the field as it is being typed in to.

Just a thought though.

Best wishes,

Mark

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

Mark,

Indeed, that would be required. I’ve done it before, just can’t remember. You can reach it with something like:

document.formname.fieldname.value
       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Yep that’s what I was thinking but making an extension to do it is a little over my knowledge at the moment unfortunately :down:

Hopefully someone else will have an idea though.

Best wishes,

Mark

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

Hey guys

URL Field Extension

I just finished creating this. Check it out if you like and get back with feedback.

Bear with me, it’s my first one 😉

Regards, Peter.

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

Hi Peter,

Fantastic!! Exactly what was needed and works exactly as it says on the tin!!

I think your documentation on your site needs one more step written in though to tell people to also copy the extensions->images folder to their extensions folder also. Perhaps it might be better if the image location could be an extension setting though so that you don’t have to have the images folder in the extensions folder?

Also would it be possible to get the URL field that shows in the PUBLISH / EDIT panel to be longer. At the moment it is quite short and text-fields in these sections usually stretch to the whole of the control panel width.

Just a couple of very small things though.

Fantastic extension and works brilliantly! Will be looking in to how you did this one so that I can learn from it! 😉

Best wishes,

Mark

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

Hi Mark

Check the update page + extension archive 😉

Have fun playing!

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

I think it’s still looking in the extensions/images folder though isn’t it?

Also the text field is still the same width?

Am I doing something wrong maybe?

Best wishes,

Mark

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

Also I’m not getting any extension settings. Have you updated the download link yet or not perhaps?

Best wishes,

Mark

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

Very sorry, forgot to sync with my dev server. Is it working now?

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

Hiya,

Yep the extension settings are now showing up and I can place the icon image wherever I want which is fantastic. Would still be great to get the text field the same width as the control panel though? 😉

Great work this is.

Best wishes,

Mark

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

Glad it works. Try width settings: 100%

Made a separate post for this extension.

       
1 2

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.