i've been watching too much "charmed" lately

July 20, 2005 under Computers, Internet, Programming

Barry‘s a good guy with a great sense of humour. But when he taunted the world into stealing his identity, the lil’ hellion in me had to do something.

Since Barry never changed his password since installing WordPress on his web server, I had an ‘in’. I modified his post.php, the WordPress file responsible for posting new and edited blog entires into MySQL tables for WordPress . I wrote a new function for his post.php file:

// don't be blind to this Barry, for it's love,
// and you have to let love rule
function LoveMuffin()
{
    $arrLoveThings = array("love",
                           "want to be",
                           "need to have",
                           "must become like",
                           "aspire to be",
                           "have to become one with",
                           "plan to steal the identity of",
                           "idolize",
                           "can never be angry with");
    $iRandIdx = rand(0, count($arrLoveThings) - 1);
    return "I, Barry Lachapelle, " .
           $arrLoveThings[$iRandIdx] .
           " Chris Bellini.";
}

Even if you don’t know much about PHP or programming in general, it should be fairly obvious what this will do. The WordPress dev team did a great job keeping their code very readable and it made it easy for me to find the best places where I could implement my new function. So added my function to the section that posts new blog entires and added some other goodness to the section reposnsible for editing existing ones.

You can see what his enchanted blog looked like in these pictures.

He was a good sport and wasn’t all that upset with me 😛 Don’t ask where the love and magic references came from in my original comments on Barry’s site and my code. Dena’s been watching a lot of Charmed marathons on Diva so maybe that explains it 😉

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
comments: 2 »

2 Responses to "i've been watching too much "charmed" lately"

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>