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 😉
2 Responses to "i've been watching too much "charmed" lately"
nice hack 😉 the msg on edit too… nice. Question…. how did you do the code hilighting in this post? Is it built into wordpress?
Used this plugin:
http://scott.yang.id.au/2004/05/syntax-hilight-enscript/