The Quick & Dirty:

  • 9+ years in the biz, 10 messing around
  • All the latest in HTML, CSS, JS & PHP (Sorry, no .net or Ruby skills yet)
  • Cross-browser compatible code from Photoshop or Illustrator files.. or napkins!
  • Custom Specialities in Wordpress theming & plugins, Twitter & jQuery
  • Subversion, server-log analysis, and blocking hack-attempts (of late).
  • Data/Project Geek. I ♥ timelines.

I’ve compiled some handy PHP functions I’ve had to whip up. More extensive code-samples are also available.

Wordpress-from-Photoshop/Illustrator

Wordpress-from-static HTML

Wordpress-from-Photoshop

For All your WTF Joomla’s

Due to unfortunate circumstances, I’m now tasked with Joomla-maintanence. So. Sad. Here’s what I’ve got so far:

Joomla Hates PHP.

Problem: “Strict Standards: Non-static method JLoader::import() should not be called statically”

Answer: Use this .htaccess addition:

php_flag display_errors Off

And then proceed on your way.

Joomla Uses One Template-wrapper for all pages.

This is some major suckiness. To use page-specific CSS on the body tag, here ya go:

<?php
$thispage='';
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if ($option=="com_content" && $view=="article") {
    $ids = explode(':',JRequest::getString('id'));
    $article_id = $ids[0];
    $article =& JTable::getInstance("content");
    $article->load($article_id);
    $thispage= strtolower(str_replace(array("'",'"',' '),array('','','-'),htmlentities(strip_tags($article->get("title")))));
}
?>
<body id="<? echo $thispage; ?>">

So.Much.Better.

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
Posted in code, Day Job Comments Off

Comments are closed.