Tag: Web

  • WordPress config snippet for dynamic domains

    Quite why this isn’t how WordPress works by default, I’ll probably never know.

    $domain = 'http' . (false ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];
    define( 'WP_SITEURL', $domain );
    define( 'WP_HOME', $domain );

    If anything, this snippet is for my own reference.

    Prevents redirects on development / staging sites without changing the wp-config.php

  • Google Sheets Formula – show an age from a DOB

    I couldn’t find a decent formula to show an age from a Date Of Birth, so I wrote this:

    =CONCAT(FLOOR((TODAY() - B2)/365),CONCAT("y ",CONCAT(FLOOR((((TODAY() - B2)/365) - FLOOR(((TODAY() - B2)/365))) * 12), "m")))

    Shows an age in years and months; e.g. “10y 6m”.

  • Recommended: iammoving.com

    iammoving.com was recommended to me by the estate agent who advertised the house we’re moving to in August.

    After registering, for free (though I would pay for the service), you select the organisations you need to notify from a large, categorised list, and provide your account number (or whatever detail is appropriate).

    You can then send each message individually, or send them all at once.

    Unfortunately, some companies still require that age-old ink on paper malarkey. In these cases, a preformatted letter is made available to print.

    iammoving.com is ‘in association with Royal Mail’, which makes sense because it could save them from thousands of undeliverable/redirected letters.

  • Firefox 3 to break Zoom (Edit: I’m mistaken)

    Mozilla is about the make a big mistake, the same as that made by IE7.

    Zooming the whole page is not a good idea.

    Browser Zoom Method Comparison

    Current Firefox text-only zoom on the left, IE7 on the right.

    Using the current Fx way you can easily read the text without having to scroll sideways, but the new way (which is how IE7 works) means you have to scroll right for each line of text, then back to the left, and so on.

    I simply cannot fathom how they thought this was the right move.

  • BBC Homepage Beta Using jQuery

    The BBC Beta Homepage is using jQuery, but unfortunately it’s ugly.

    I should qualify that – I think it’s a good move to make the homepage more personalisable, but does it have to look so Web2.0?
    Big text was a fad a year ago, but it’s too informal for an internationally recognised and respected news source, and it makes it look so childish – I dread to think what the new CBBC sites would look like!

    I realise this is only a beta, and may well change considerably, but without a bit of a shrink I won’t be likely to use it as a homepage tab.

  • 3 / Skype Marketing Technique

    I was recently contacted by Matt of 3mobilebuzz.com and offered the chance to trial a pair of 3 (the network) Skype
    (the VoIP company) mobile phones (3skypephone.com) for a month. (No obligation to do anything, other than the mention of returning them after a month.)

    I thought it was an interesting marketing ploy – it seems very generous, but is probably not actually particularly expensive to such large companies.
    I also thought it seemed a little risky – how many people will return the phones? How many people will actually generate any hype, and will it be positive?

    The first link above will show that the scheme has been going for some time already and world-wide – highlighting one of the benefits of calls made using VoIP (i.e. via the internet).
    You can also see that they’re being fair with the selection of linked blog articles – some have negative points about the phone.

    I’m not going to review the phone itself since many others have done that already, unless enough people leave comments here.

  • JavaScript Bug – Modulo of small numbers

    It seems that there is a problem with the modulo function, ‘%’, in JavaScript.

    For example: 10 % 0.1 should equate to zero but comes out as 0.09999999999999945 probably due to some internal floating-point rounding errors.

    Easy solution (a hack really): Multiply both numbers by 1000 before using the modulo function.

  • Recursive Moved Itself

    The highly observant amongst you may have noticed that I have moved this blog to my personal domain, jezmckean.com.
    You should have been brought to this domain automatically, and I hope to fix the multitude of links online, but need the automatic move for those I can’t fix.
    I’ve done this because I’m working to separate my freelance business, jazzle.co.uk, from my personal stuff.

    Eventually, the blog subdomain at jazzle will be replaced with a work related one.

  • IE7 Tip – Reload

    IE7 Tip - ReloadWhen IE7 was designed they took the peculiar decision to split the navigation buttons into three places (if you include the home button).

    If you find yourself up in the top left wanting to reload, just click the drop-down button and select the current page (will be highlighted and have a tick-mark on the left), as shown in the picture.

    Bizarrely and unfortunately, this only works if you’re not looking at the last page in your navigation history for this tab. This suggests that it’s only through poor programming logic that it works at all.

    [tags]IE,IE7,Microsoft,tip,tips,browser,flaw,bug[/tags]

  • Firefox Tip

    I discovered yesterday that [tag]bookmarks[/tag] in [tag]Firefox[/tag] can have no name.

    Seems pointless? Not if the sites have [tag]favicons[/tag]:

    Firefox Bookmark Favicons

    Space saving, so you can see more, hence fewer clicks.

    The above are jazzle.co.uk, The Sketchup Components Collection, bit-tech, ebay, amazon, radiotimes.com and the default icon (for a site with no [tag]favicon[/tag]), but you knew that of course since you recognise the sites’ icons.