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: Extract URL Plus 2

Development and Programming

minimal design's avatar
minimal design
356 posts
17 years ago
minimal design's avatar minimal design

Thanks for the heads up. I used the example in the plugin usage page in the CP. Looks like dev doesn’t like documentation 😉

Well, anyway, some work like file_name, but file_path or file_size don’t, which are ones I need… at this point it’s faster for me to go w/ PHP…

Thanks again!

       
Daniel Walton's avatar
Daniel Walton
553 posts
17 years ago
Daniel Walton's avatar Daniel Walton

Correct. The variable names in the examples (plugin usage pages) are wrong. And as for proper documentation? Oh it exists, just waiting for the damned designer to make up his mind 😊

       
Laisvunas's avatar
Laisvunas
879 posts
17 years ago
Laisvunas's avatar Laisvunas

It would be nice if it were possible to wrap with the tags of this plugin such global variables as {site_url} and {homepage}, and global template variables.

Now wrapping {site_url} or {homepage} or global template variables with Extract URL Plus 2 tags do not change their output. It seems that this is an issue of template parsing order, isn’t it?

       
stinhambo's avatar
stinhambo
1,268 posts
about 17 years ago
stinhambo's avatar stinhambo

For some reason if I use this with imgsizer then I only get one image output.

This works fine (there are two entries to show here) -

{reverse_related_entries weblog="gallery" status="open" sort="asc" orderby="gallery_year"}

{exp:zm_extract_url_plus show="%full_url"}{artists_works_piece}{/exp:zm_extract_url_plus}</a>

{/reverse_related_entries}

This only outputs one of the images plus it retains the height=”” of the original File Upload string -

{exp:imgsizer:size src="{exp:extract_url_plus show="%full_url"}{artists_works_piece}{/exp:extract_url_plus}" width="140" alt="{title} {gallery_year}"}
       
Emily Heath's avatar
Emily Heath
197 posts
16 years ago
Emily Heath's avatar Emily Heath

I’m using version the plugin zm_extract_url_plus 2.0.1 - it was working fine, but now the file_size isn’t showing up.

This is my code.

{exp:zm_extract_url_plus url="{documents_file}"}
(<span class="extension">{extension}</span>, {file_size})
{/exp:zm_extract_url_plus}

Can anyone help please?

       
Christopher Dowson's avatar
Christopher Dowson
36 posts
16 years ago
Christopher Dowson's avatar Christopher Dowson

Would it be possible for this plugin to handle two urls at the same time?

Currently I’m using the extract_url (basic) on parts of a new site I’m using, and it’s working a treat. However, we need to let users post images from flickr in a very specific way (just using the embed code that flickr generates for them).

Using the first image I came to on flickr, the code that it gives me is:

<a href="http://www.flickr.com/photos/wet_knee/3100671051/" title="Flatts Lane by Wet Knee Photography, on Flickr">http://farm4.static.flickr.com/3174/3100671051_1e67ff2e05.jpg</a>

Now, if I put that into the original extract_url plugin, I get

http://www.flickr.com/photos/wet_knee/3100671051/http://farm4.static.flickr.com/3174/3100671051_1e67ff2e05.jpg

As you can see, it’s (obviously) given me two urls. What I need is to ignore everything before the second http://

Credits are given separately, so if it’s possible to put a second instance of the plugin in the same post to sort out the credit link that would also be good!

We need to be able to manipulate the images using phpThumb and highslide, so just pasting the flickr code straight on the page won’t work.

Can this plugin help?

Thanks!

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

Is there a way to use this with a local path? It fails if the URL doesn’t start with “http://”, etc. I’m trying to extract the file name but get a blank.

       
Eric Barstad's avatar
Eric Barstad
198 posts
16 years ago
Eric Barstad's avatar Eric Barstad

@emilyh Did you get the file size to show up at all? I’m having the same problem.

       
Daniel Walton's avatar
Daniel Walton
553 posts
16 years ago
Daniel Walton's avatar Daniel Walton

Note that file size will only work if the file is local. (I’m planning on changing this but will probably wait for 2).

       
Eric Barstad's avatar
Eric Barstad
198 posts
16 years ago
Eric Barstad's avatar Eric Barstad

Daniel: Thanks for the reply. The problem I had was because I hadn’t put the full url in the upload preferences. Once I did, file sizes showed up.

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
16 years ago
Nathan Pitman's avatar Nathan Pitman

Interested to know how easy it would be to amend this plug-in to optionally return a width and height for a file, if it’s of a image type?

       
kingdoz's avatar
kingdoz
45 posts
16 years ago
kingdoz's avatar kingdoz

There is a plugin - imgsizer - which does this perfectly. Back on point; It wouldn’t be a difficult addition, no.

       
Daniel Walton's avatar
Daniel Walton
553 posts
16 years ago
Daniel Walton's avatar Daniel Walton

Oops, I don’t think imgsizer does what you need. This might though:

Usage:

{exp:zm_image_dimensions url="http://example.com/path/to/image.jpg"}
{height}px
{width}px
{/exp:zm_image_dimensions}
       
Nathan Pitman's avatar
Nathan Pitman
531 posts
16 years ago
Nathan Pitman's avatar Nathan Pitman

Did you ‘just’ write this?

       
Daniel Walton's avatar
Daniel Walton
553 posts
16 years ago
Daniel Walton's avatar Daniel Walton

Nah, had it in my personal collection for some time 😊 Useful for when they want to be able to upload their own background images (banners etc) 😉

Just noticed there is another param: height_subtract=”“, to deduct from the height val. Say your banner div has padding (ie they have regular text in there too) then put the sum of the vertical padding in there and bingo.

       
1 2 3

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.