Fist Full of Pixels

Blog

Eminent Domain: my first EE Plugin

Because Magpie doesn’t seem to play well with PHP within its {items} loop, I took it upon myself to write a simple plugin that could parse a URL and return the domain name. For instance, from the url http://www.foo.com/bar/index.html, you’d get foo.com. I use it in the sidebar for my “liked” articles from Instapaper. Sort of like you might see on Instapaper’s site itself.

At any rate, I’ll release it soon over on the projects page.

Update: Looks like there’s already a plugin that does this, and more, from EllisLab: Parse URL. It was still fun to learn and definitely worth it. I’m sure there’s more to come.

Permalink | Filed under Geekery, Web