drupal

Path To Theme In A Module

I'm currently working on a multi-site Drupal installation. There is one theming module shared by all instances which exposes some key blocks and views they all require. During development, this was built on the initial site, so occasionally you will find something like this in the module:

<?php
function load_my_image() {
 
$path = base_path().
         
drupal_get_path('theme', 'my_theme').
         
'/images/my-image.gif';
  return
$path;
}
?>

That works fine for as long as 'my_theme' exists, but what if it doesn't on another instance using this module?

Contributing Hurts

in

Well, I'm in the throes of trying to contribute to core for the first time, and I have to say, it's a painful experience. Your concepts and code are suddenly thrown open to pretty fierce scrutiny by the community at large.

When you're making your own module no one really cares what you do, as long as it doesn't compromise the security or operation of other modules. Not so with core. There can be some pretty harsh debate around what can and cannot go in to the framework.

The Joys Of Preprocessing

I've been having a lot of fun with preprocess functions in Drupal 6.x, particularly when theming Views. It's a great system, but my colleague came across a nice "gotcha" this morning.

We have been adding JavaScript in Views preprocess functions if we want to provide tidy jQuery interfaces for Views output. This works great, so we thought nothing of doing the same for pages, which is where we came unstuck.

To understand why, you need to understand the process order of preprocess functions, as defined here:
http://drupal.org/node/223430

Theming Views In Drupal 6.x

Who remembers good ol' Views 1.x in Drupal 5.x? Lovely, wasn't it? With that theming wizard. Giving you all the phptemplate functions you needed for fine-grained theming, ready to paste in to template.php in your theme and fiddle with until everything looks perfect.

Theme Stops Play

And I was sooo close! I actually decided to upgrade to Drupal 6.4 this evening. All the modules I use are ready, everything works, so I was all set to take the plunge.

But my theme, Dichotomy, has not been ported. In fact, it's never even been marked a point release. =(

Looks like I'll have to either port it myself or change theme. Any suggestions??
http://drupal.org/project/themes

I kinda like this one, but it's a complete departure from the status quo:
http://drupal.org/project/interactive_media

Ditto:

drupal_execute Gotcha In Drupal 6.x

Many of you are probably familiar with drupal_execute(). However, those familiar with it from Drupal 5.x days will have to watch a new feature in Drupal 6.x.

Here's an example of an item in a hook_menu() implementation in the Taxonomy module for Drupal 6.x:

<?php
$items['admin/content/taxonomy/add/vocabulary'] = array(
'title' => 'Add vocabulary',
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_vocabulary'),

Drupal Strikes Again

Finally the Beta of Mums+, the community site for parents, is live. I finished off the spit and polish today. Some way to spend a public holiday!

Anyway, if you're curious take a look:
http://www.mumsplus.com

The Beta version is focussed around the Stoke Newington area of North London, but if it is a success the idea is to branch out using Drupal's multi-site capabilities, or perhaps db_rewrite, and create area-by-area sub-domains. Hope it works. Both myself and my friend Liz have put in a lot of effort thus far.

SOA And Drupal - The Services Module

So, you want to create an SOA-based infrastructure for some or all of your business tools and web sites? Not sure where to start?

I'll admit I have worked a little with Microsoft web services, but I am fairly ignorant of the open source alternatives out there for SOA. What I can tell you is I'm hugely impressed with the new Services module for Drupal. It is still in dev, but it's pretty cool!

Drupal Awards

I watched with interest the small crop of awards Drupal has been nominated for so far this year. There's no question Drupal, as a piece of software, is taking off at an incredible rate. But the most interesting one for me was the LinuxWorld Product Excellence Awards 2008.

Drupal 6.x was been nominated for Best Business Application. It lost, to an ERP system called xTuple, but it was one of three products nominated - and the key here is the category. Best Business Application.

Multi-Site In Drupal 6.x

So, you want to have many websites with many different content sets but a shared set of users, roles and sessions? Not a problem. There are many ways to skin the Drupal multi-site cat.

Syndicate content