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

Parse URL PL

Development and Programming

EE lover's avatar
EE lover
50 posts
19 years ago
EE lover's avatar EE lover

1- I want to omit “http://” from urls it would be nice to have something like this (parts=”not scheme”)

2- FR filter custom phrased, like omitting www.

3- From some urls I only want the part between www. (or //) and .suffix
http://www.example.com –> example http://sub.example.com –> sub.example

4- Thanks 😉

————————————————— For those who maybe confused where dose the “port”, “user” and “pass” exactly refers to (like I was first) this picture may help

       
Paul Burdick's avatar
Paul Burdick
480 posts
19 years ago
Paul Burdick's avatar Paul Burdick
  1. Ugh! (trans: easily doable)

  2. Bleah! (trans: doable, maybe)

  3. Oh come on! (trans. good luck with that)

  4. ::grumble::

       
EE lover's avatar
EE lover
50 posts
19 years ago
EE lover's avatar EE lover

1- Aha! (trans: Thanks Paul, then I look forward to see that added to your plugin)

2- Aha!! (trans: Thanks Paul, then I hope to see that added to your plugin)

3- Aha? (trans: Thanks Paul, but I don’t get your point. Is that positive or negative?)

4- Aha! (trans: staring at Paul not knowing what to do or say. Finally he makes his decision and says thanks)

       
Paul Burdick's avatar
Paul Burdick
480 posts
19 years ago
Paul Burdick's avatar Paul Burdick

A new version of the plugin is up that allows the use of not in the parts parameter and has a new parameter called omit=”” that allows you to specify strings to remove from URLs. This latter parameter should take care of 2 and 3, I think. 3 was a request I was not very enamoured with so I did not write up anything specifically to allow that.

       
EE lover's avatar
EE lover
50 posts
19 years ago
EE lover's avatar EE lover

Cool support! You know how it feels when a developer provides a FR for one of his software’s clients?! Sure you don’t, but I’ll let you know; it feels great! Thank you very much.

       
Gabriel's avatar
Gabriel
130 posts
17 years ago
Gabriel's avatar Gabriel

Iam using Parse URL plugin in the comments.

{exp:parse_url parts="host" omit="www."}{comment}{/exp:parse_url}

The result will be “any-domain.com”. Thats OK. It’s what I want.

Then I choose “Yes” for “Automatically turn URLs and email addresses into links?” in “CP Home › Admin › Weblog Administration › Weblog Management › Edit Weblog”.

After this, the real output will be something like this:

<a href="http://www.any-domain.com/?URL=http://www.another-domain.com/name-of-the-entry/">any-domain.com

__In this point the closing tag is missing.

Is it possible fix it? Thanks.

       
cwpollock's avatar
cwpollock
72 posts
about 16 years ago
cwpollock's avatar cwpollock

I’m trying to use this with the twitter timeline plugin, but it doesn’t seem to me working:

<ul id="front-twitter" class="front_list">
            {exp:twitter_timeline type="user" user="" password="" limit="1"}
            <li class="tweet">
              {status_relative_date} ago
              <div class="status">{exp:parse_url parts="host"}{text}{/exp:parse_url}</div>
            </li>
            {/exp:twitter_timeline}
            <li class="last"> <a href="http://twitter.com/safetyexperts">Follow us on Twitter »</a> </li>
          </ul>

Any thoughts on why this isn’t working

       

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.