Syndicate

Feed

Drupal

Mar
20

Using Ajax in Drupal 6

John K. VanDyk confirmed that Pro Drupal Development 2nd edition will be published early this summer. I don’t know about you but in Montreal it sure does not look like summer. We’re still in the dead of winter, and it’s one snowstorm after another.

Anywho, I got busy last night and, on a Drupal 6 install, I worked through chapter sweet seventeen of the Pro Drupal Development 1st edition book. The title of the chapter is "Using jQuery". Read more →

One file is attached to this posting. Login or register to download this file.


Mar
13

Packt Publishing Drupal 5 Themes reviewed

A first release candidate of Drupal 6 was made available on December 20, 2007, that is, two days prior to the publication of this theming guide... which covers Drupal 5! Drupal 6.1 has since been released, and many of Drupal’s most popular add-on modules are now ready for use on production web sites. The author mentioned on his blog that an updated version of his book will be published, but Packt Publishing is not yet listing 'Drupal 6 Themes' among its upcoming publications. Still, I read the book, and worked through its examples on a Drupal 6 install. As a somewhat seasoned Drupal developer, I still found the book helpful. I recommend it, provided that, as you read along, you refer yourself to the concise (and well-put-together) Drupal 6 theming guide available on Drupal.org. Theming has definitely taken a leap forward in D6. For instance, intercepting and overriding theming functions is a lot easier now.

I bookmarked quite a few pages in the book Drupal 5 Themes.

 Read more →

Apr
13

The read more link in teaser hack

Unlike Wordpress, Drupal offers no way in core to put a read more link inline with the teaser. Out-of-the-box Drupal’s teaser customizing is very basic. Read more →

Feb
28

The inspire project

All the guys in my group were bringing their laptop to class. They didn’t want to use the lab facilities. During the first half of the semester, in that particular class, we had to learn how to script art, and the language the teacher chose for us was AppleScript. Read more →

One file is attached to this posting. Login or register to download this file.


Feb
21

Drupal internal path versus url alias

The attached pdf document explains the difference between :

  • a url
  • a translated url
  • a url alias, and
  • Drupal’s internal path
 Read more →

One file is attached to this posting. Login or register to download this file.


Feb
20

Learning is painful

You get it out of the box and plug it in. You gauge or seize its complexity — for a little while. Then you open the owner’s manual and read. Read more →

Feb
18

Where are we ?

Say we are in a block. Or say we are in a node’s body or teaser. We may ask ourselves : where am I ? On this page, whichever page, is there a node displayed ? If so, which node is it ? Or is there a list of nodes displayed ? If so, what kind of list is it ? Is it a list of nodes who share the taxonomy term “news” ? To answer these questions, one needs to understand Drupal’s path system. Read more →

Feb
18

Who authored this node?

Say we have a node ID (nid), and we want to know who authored the Drupal node with that ID, and that author is not currently the user that’s logged-in, then we use the Drupal function node_load(). (The companion function to user_load()). The function node_load() either accepts a numerical value which is the nid of the node, OR it accepts an associative array containing information about the node, criteria against which the function will try to find a match, in the database. The function returns a node object. One property of this object is uid, that is, the user ID of the author of the node, and another is name, and that's the name of the author. Say we want to find the e-mail address of the author of node with node ID 25:

/* Using node_load with a node ID parameter */
$node = node_load(25);
/* Then using user_load with the user ID */
$user = user_load(array('uid' => $node->uid));
print t('You may e-mail @name at !mailURL.',  array(
  '@name' => $user->name,
  '!mailURL' => l($user->mail, 'mailto:' . $user->mail),
  )
);
Feb
18

Who is she ?

Say we have someone’s unique user id (uid), or possess some other information about her, and we wish to collect additional information, and this user is not currently the user that’s logged in (or browsing the web site anonymously), then what do we do ? We use the Drupal function user_load(), companion function of node_load()Read more →

Feb
18

Who am I ?

We can access a few variables from anywhere at anytime in Drupal, and the most important of these variables is $user. The object $user contains (almost) everything you’ll ever need to know about the user that is currently surfing the web site. Read more →

Feed