Agree.
@jdludlow: Ah crap. April Fools Day is almost here already? If you’re “hilarious” and have a website, keep it to yourself ok?
Driving out of town with American Pie by Don McLean playing! 🎶
Infinite scroll is torture for OCD types like me. You can never finish!
MediaWiki Template Get Hostname
I was working on a template for one my personal wikis and needed to get the hostname for a given URL. Using the capabilities of the Parser Functions extension for MediaWiki I whipped up this template. I figured others may find this useful so here it is. The first version has a bunch of spaces and newlines added to make it more readable.
{{#vardefine: hoststart | {{#expr: {{#pos: {{{1|}}} | // }} + 2 }} }}
{{#vardefine: hostend | {{#pos: {{{1|}}} | / | {{#expr: {{#pos: {{{1|}}} | // }} + 2 }} }} }}
{{#vardefine: hostlen | {{#expr: {{#var: hostend }} - {{#var: hoststart }} }} }}
{{#sub: {{{1|}}} | {{#var: hoststart}} | {{#var: hostlen}} }}
To put it in your own MediaWiki, copy this version that removes the spaces and newlines.
To use this template put it on a page like
Template:Get hostname and then call it in your
pages as
{{Get hostname|https://www.thingelstad.com/another-reason-you-need-to-use-a-password-manager/}}
which will return www.thingelstad.com.
At the theater for Hunger Games. It’s a teenage zoo here.
😊
@damonallison
/* this is the ugliest code you will ever see. squint hard and pray right now */
Listening to Coldplay! 🎶
9 yards of mulch distributed. Will push it around tomorrow.


