Blogs

Drupal 6 Content Administration

On shelves now, by J. Ayen Green of Ayen Designs. If you need to make good use of your Drupal site, but aren't a developer or haven't worked with Drupal or a Content Management System before, this is a book for you.

6. Where is my Drupal View pager??

I created a view the other day, a simple view with one display, and change the Pager setting to Full. I had the view set for 50 records per page, and there were hundreds of records. When the first page loaded, there was no pager present.

And so began the head scratching.

5. Why PHP?

Whenever I sit down to design the architecture of a new application, I sit back and ponder. For the past few years, my decision continues to be: php.

I have read many blog entries on the merits of choosing php, ruby or java, and theories on why programmers make choices in opposition to the blogger's. It's my turn to weigh in, for what it's worth.

Podcast Interview

Want to hear more about Drupal 6 for Administrators, or about me? I recently had an interview with DrupalEasy.com for their podcast. Listen in as Mike Anello talks with me about the new book.

You can register to win a free copy of the book simply by posting a message from your Twitter account that mentions both "@drupaleasy" and "Drupal 6 Content Administration".

The interview can be found here.

4. When A Leap Year Really Isn't

In the previous blog entry, 3. Are You Odd?, I referred to determining a leap year still being a manual programming process in many cases. There are certainly umpteen library functions out there to do it, but it's simple to do and a nice programming exercise for function writing.

How does one determine if a given year is a leap year? It's a common belief that if the year is evenly divisible by 4, that it is a leap year. That is true most of the time, but not always.

3. Are You Odd?

Occasionally the needs arises to determine if a number is odd or even. Why would you need to do this? One example is the 'striping' of output, where information is presented in rows, and alternating rows have a different background color, like this:

Row1
Row2
Row3



You would think that languages would all have a function for this by now, but just as determining whether a year is a leap year is often still up to the programmer, so too is whether a number is odd or even.

2. tidbit - Theming the Drupal Views 2 Mini Pager

Do you want to change the look of the mini pager in Drupal Views 2, but can't figure out where it is? It's the function theme_views_mini_pager(), which can be found in views/theme/theme.inc.

1. Towards a Cleaner Gentler PHP Variable Dump

At some point in the writing of code, the time comes to try and determine why it isn't working as intended. [Well, not MY code, but I'm writing this for everyone else -JAG] If you've had the need to investigate the contents of an array or object in php, you've probably seen something like this:

print_r($myarray);
Array ( [0] => Array ( [0] => Array ( [0] => apple [1] => orange [2] => banana ) [1] => Array ( [0] => apple [1] => orange [2] => banana ) ) [1] => Array ( [0] => apple [1] => orange [2] => banana ) [2] => Array ( [0] => Array ( [0] => apple [1] => orange [2] => banana ) [1] => Array ( [0] => apple [1] => orange [2] => banana ) ) ) 
Syndicate content