Cussedness

The natural cussedness of things in general.

    • « Dan’s Data Kittenwar Book Review
    • Animated Music Videos »
  • Wordpress Dynamic Site URL Plugin

    Behold! I just created my first Wordpress plugin: Dynamic Site URL.

    Actually, strictly speaking, I didn’t write it, I just lifted it from this thread on wordpress.org and added one extra line to make it work on all parts of a Wordpress install. Hooray for this mysterious chap, who created the five lines of code that do the real work.

    It’s useful if you want to run one blog under two domain names and have your links based on the currently active URL. Why would you want to do that? Well, let’s say I have a site at http://www.cussedness.com/, and I want to test a new feature. I don’t want my millions of visitors breaking things horribly if that new feature has some dreadful bug, so what I do is temporarily redirect everyone from http://www.cussedness.com/ to a holding page at http://hold.cussedness.com/, and sneak in round the back via the password protected http://test.cussedness.com/ to check that things are working okay. Without that plugin, Wordpress tries to redirect you to the default site address, but with that little plugin turned on you can check that everything is fine under the test domain. You can click all the links and monkey about with the admin sections and everything.

    It probably only works on Wordpress 2.2, is pretty much untested, and is issued completely caveat downloader; if you trash your blog with my ripped-off code, that’s your problem, sorry.

    0 comments • 2007-08-28 19:48 • Categories: Computers, Geek Stuff • Tags: Coding, PHP, Wordpress

  • Leave a Reply

    * Required values.

    XHTML: These tags are allowed in comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    • « Dan’s Data Kittenwar Book Review
    • Animated Music Videos »
  • Pages

    • About Me
    • Cussedness Theme
  • Friends

    • A Nice Cup Of Tea And A Sit Down
    • Blogjam
    • Chthonic Ionic
    • It Can Be Done
    • Peanut Jimjams
    • Rob Manuel
    • Roganjosh
    • Rory O’Sullivan
  • Other stuff I do

    • Cats In Sinks
    • Kittenwar
    • Mint Imperial
    • My Flickr Photos
    • The Daily Kitten
    • The Random Kitten Generator
  • Search

  • Tags

    Animation Apache Apple Charlotte Brontë Coding Debian Education Evolution Family Fix Futurama H. P. Lovecraft History Idiots Infrared Intelligent Design Jules Verne Kali Mountford Kittenwar Laptops Linux London Mac Mini Maps Novels OS X Pharmaceuticals Photos PHP Robots Scripting Security Statistics Tindersticks Trains Unix Victorians Voyages Extraordinaire Web Webcam Wilf Wilfred Hugh Ryan Windows Wireless Wordpress

  • Categories

  • Archives

© Tom Ryan 2006 to 2008.