Welcome to my blog !

A blog devoted to all things geeky, including PHP, Web Development, Photography, Design, Gadgets and Gizmos.

July 30 2008

Snorg Girls and Clickthrough Rates

I have read that Digg.com has some terrible click through rates on advertisments, as does facebook.  Probably a result of that traffic primarily consisting of very savvy web users who just get online, get what they want and get offline.

Personally I’ve been visiting digg for about 2 years I guess and have clicked on maybe 5 ads in that entire time.  I sometimes feel bad for not supporting the great site I love a little more, but its not my nature as a long time internet “poweruser” to randomly click advertisments.

The ads I have clicked have of course been Snorg girl ads.  I would be interested in seeing how well Snorg tees convert with their advertisments on Digg compared to the other companies.  I bet on a tech/geek site like Digg they convert VERY well.   In celebration of the cuteness that is a snorg girl, here’s a gallery I found via Google - Snorg Tees Girls!

July 27 2008

Hacking Wordpress and Drupal

The thing I really have enjoyed about using Drupal and Wordpress a lot lately is that they are simple, fast to develop with and powerful.  They really show off PHP as a quick and powerful language, complex apps mainly based around functions.

Using the wordpress function reference, I can do most things VERY quickly and don’t have to think about complex concepts that pop up in other PHP applications (like the very nice but very complex OOP code in magento).  I know comparing a blog application to a full blown advanced shopping cart is like chalk and cheese, but I do enjoy the speed that comes from the KISS design of Wordpress.  Hack in my custom code, in 10 minutes and move on.

July 21 2008

Doctor quits job to become full time Blogger

I’m a bit of a Mac fan. I’m not a zealot but I do really enjoy using my ipods and my Macbook Pro.   So I visit Macrumors.com relatively frequently to check out the latest Apple device.

The guy who runs that site, Dr Arnold Kim, has just quit his job as a full time medical doctor to become a full time blogger!  The site gets about 4.4 million visitors per month and has been turning a pretty nice profit for a while.

Its a bit of an inspiration to web geeks like me who would like to one day become a full time web publisher/blogger and give the normal job the flick!  His blog post anouncing his decision.

July 20 2008

Now a Dofollow blog!

Tagged Under : , ,

I’ve just removed nofollow from comment links for the blog. This means that anyone posting a useful and approved comment will be rewarded by an incoming link towards their site.  The value of nofollow has been debated (here and here in german).

I think that comment moderation and akismet are the best way to manage spammers posting inane comments to your blog and hoping for a backlink from it.  If somone posts something useful on a blog comment and is active in the web community they should be rewarded!

edit: I should mention the dofollow plugin I used to automatically remove the nofollows.

July 18 2008

Firefox 3 Unresponsive Script

Well I’ve been enjoying Firefox 3’s new features its improved speed and style.  Until the last update.

I’ve started getting numerous javascript related issues on both OS X and Windows XP while using Firefox 3.  Any site or application that has AJAX features or a large amount of javascript (which, lets face it is most sites on the web now), could trigger the unresponsive script error.

As was the case with Firefox 2, the issue is 9/10 related to a plugin.  For doing web development I use about 10 different plugins for firefox and I tracked down the issue to Firebug.  Firebug disabled, back to smooth browsing.

July 18 2008

Templating Drupal 6

Drupal Logo

I’m finding Drupal 6 easier to template after a small initial learning curve. There are a couple of gotchas however. For example:

With Drupal 6 you can copy .tpl.php files from core Drupal modules into your theme directory and you can customise that .tpl.php. For example if you wish to customise the Drupal search, copy the search templates from the core search module in drupal (/modules/search/search-block-form.tplp and search-theme-form.tpl.php) to your theme directory.

Here is where gotcha 1 got me. Drupal 6 has a theme registry, which needs to be cleared before it starts using the search templates in your theme folder. So either clear the cache (/admin/settings/performance page and ‘clear cached data’) OR add -

<?php drupal_rebuild_theme_registry(); ?> to your page.tpl.php

I probably spent 20 minutes in error wondering why chages weren’t happening with my theme updates, then realised I needed to clear the theme registry.
There are actually instructions in the search-block-form.tpl.php as to how you can modify the $search_form variable. Its basically a multidimensional array with $search["search_theme_form"] $search["hidden"] $search["submit"]

To do something simple like replacing the submit button with an image submit I just did:

$search["submit"] = ‘<button><img src=”‘.$base_path.’themes/themename/images/search-btn.png” alt=”" /></button>’;

and voila, an image submit button…  To replace the generic form title (change it from ‘Search this site’ to ‘Search’) you could use this:

$search["search_theme_form"] = str_replace(” this site”, “”, $search["search_theme_form"]);

Some core module sections cannot be modified so easily just yet, for example the login block requires some PHP in the template.php file in the theme, however huge chunks of the core modules can now be easily re-shaped.

July 17 2008

Car Fixed!

After the recent fender bender, my 2000 subaru liberty has been restored to all of its former glory. The problem is the panel that got fixed is now the only panel on the car without a dent! Ah well…

Subaru Liberty Fixed

July 17 2008

Essential Drupal Plugins

Drupal Logo

(a somewhat long post)

After recently finishing a website in Drupal 6, I’ve rediscovered some of the best modules available for the CMS.  Drupal is a pretty slim CMS out of the box, it does some basic CMS and menu things, but becomes super powerful once you start integrating a few of the great modules out there.  The tricky part is often identifying which ones to get.

Anyway, heres my list of modules I’d reccomend for almost any site.  A lot of SEO things + content management tools and a few extras which I found useful.

  • CCK (Content construction kit, allows you to create new content types in Drupal, so instead of a simple page or news item you can tailor new content types to suit your material.  Essential for most sites).  CCK is very powerful and handy for most sites.
  • Admin Menu adds a drop down menu to the top of the admin pages.  The drop down menu has links to all of the admin sections, seriously speeds up administrative tasks.
  • Front Page allows you to easily create a unique front page on your site.  Most Drupal sites use the same template for most pages and simply hide/show blocks of content and content types.  Front page allows you to easily create a unique front to the page.
  • Global Redirect checks the current URL for an alias and does a 301 redirect if not being used.  Drupal has node urls which can be changed to clean aliased URLs.  Problem is Drupal maintains both the node address and the alias.  Bad for SEO, where engines might see the duplicate pages as spammy content.  Global Redirect fixes that, essential for SEO.
  • Google Analytics quickly throws analytics onto the site.
  • Image is a module which allows you to quickly create images and image galleries for your drupal
  • TinyMCE and IMCE.  TinyMCE module is a pretty compact rich text editor for Drupal.  IMCE adds image upload and manipulation capabilities to that.  Very handy!
  • Local Menu.  One of the issues I have come across (one I haven’t ‘really’ solved yet) is that when I need to pull out children of a specific menu item it can be difficult.  I know there are functions in the Menu API for it, but I haven’t been able to get it working.  Local Menu allows you to quickly create a variety of menus, including menus built on the current page.  Great for quickly display links to subpages of the current node.
  • Nice Menus.  Quick and easy suckerfish menus.  Easily configured to handle vertical and horizontal menus.
  • Node Privacy by Role.  In Drupal, blocks can have complex permissions based upon user roles and the current page.  Node privacy by role allows you to also add permissions to Nodes (pages), great if you have a certain page which only ‘managers’ or ’staff’ should see.
  • Nodewords allows you to get hands on with page meta tags.  Handy for SEO.
  • Page Title allows you to create unique title tags for nodes, something drupal doesn’t do out of the box.
  • Path Auto can automatically generate aliases for nodes (pages).  You can manually add wildcards or alter the url for each node.   Great for SEO, Essential !
  • Search404 performs a search instead of a 404, so a mistyped url goes to search results for the term.
  • Site Map provides a human readable SEO friendly site map (not a Google XML sitemap, just a human one)
  • Views allow you to modify the way information in nodes is rendered.  This one is essential if you plan to offer a few variations of the info in your content types.  This with CCK is the way to present any kind of information.
  • Webform.  One of the first things I did in Drupal was wonder how I should create a custom form.  At first I thought I might have to get into the forms api to do it, but webform can create some very complex forms very easily.  Its easy enough to use that clients (with a little bit of training) could create their own forms.

I used a few other things (weather module, xml sitemaps), but the above are the most crucial in my opinion.  Also the contemplate module looks great, but this project didn’t require anything that powerful.  Drupal 6 has a pretty small learning curve really, once you find the modules you need, simple sites can be churned out quickly and they have the powerful admin that drupal offers.  All good!

July 08 2008

Drupal 6 fun!

Tagged Under : ,

Drupal Logo

A recent project has required me to get back into Drupal, which I had some experience using last year (Drupal 5).  Initially its a pretty bare bones systems in some regards.  Not really tailored to SEO or complex views.  But once you have discovered which custom modules to install, the power of the CMS really explodes.

The CCK modules are seriously powerful, numerous SEO modules, numerous image and RTE modules.  The Admin is very user friendly, always good for the clients and Drupal 6 has an improved UI.

The only issue I have had with Drupal 6 so far (coincidentally I had the same issue on Drupal 5) is messing with the navigation system, attempting to get navigation to tertiary menu items displaying correctly.  By all accounts the menu_navigation_links() function should be able to pull out child menu items, but as of yet I have had no luck.

July 01 2008

New music, Jonathan Coulton

I only recently discovered Jonathan Coulton, hes the guy who wrote the theme song to Code Monkeys (a pretty decent cartoon).

He does some interesting covers (Baby got back is on his myspace page), I think I’ll listen to some more.