Syndicate

Feed

Drupal

Jun
17

My top 10 favorite theming tweaks for content

Here is a collection of my 10 favorite 'tweaks' to content template files in Drupal 6. I will add one simple tweak a day, starting today.

Jun
16

Simple redirect using the path module

You can use the path module to force a simple redirect in Drupal. Say you have a Drupal site with only one blog. When people access the page myWebsite.com/blog, you may actually want them to see the page at myWebsite.com/blog/x where x is the ONE blogger user hi-dee. (The page at myWebsite.com/blog has for title Blogs.) A simple redirect is achievable using the path module, part of the default Drupal distribution. Read more →

May
27

Theming the contact form in Drupal 6

The following exercise consists in theming the contact form in Drupal 6. Once we're done, it will look like we'll have created two fall-back-on 'pages' for contact forms, one page/form to 'request a quote' at Randy.com/contact/quote, and an other page/form for general inquiries at Randy.com/contact/info. The trick here — if there's one — consists in theming the contact form differently based on the requested URI.

This exercise will show you how to:

  • recognize when a module has not registered a specific theming function for a form it generates,
  • register a theming function for a Drupal form in your theme, using HOOK_theme,
  • work with template suggestions,
  • use the Devel module function dsm() to inspect complex variables, such as Drupal forms.

 Read more →

May
10

File download in Drupal

The attached ebook, Files in Drupal, has been expanded and updated to account for changes in Drupal 6.
Update, May 10th, 2008.

You'll find in the pdf document attached to this posting “10 things you ought to know” about file download in Drupal, from a developer’s perspective. This small guide provides sample code, recipes, concise yet complete explanations, tricks, and a thorough coverage of the module hook function file_download. The document is 6 11 16 17 pages long, it has been expanded and updated to account for changes in Drupal 5 and 6. I also added a 'funny' cover to the book. (My modest attempt at humour.) Typos are corrected pretty much on a daily basis... If you’ve downloaded the document before May 17th, 2008, please redownload it. Read more →

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


May
09

Theming the node form in Drupal 6

The following exercise consists in moving pieces of code around, code that I did not write myself. Credit for the code goes to Joakim Stai (nicknamed 'ximo' on Drupal.org), the maintainer of the excellent Node form layouts module, as well as to the Usability group.

This exercise is all about gaining experience in:

  • adding theme settings to a theme configuration page
  • theming forms inside a theme, as opposed to writing a module for the same purpose
  • creating a sub theme

 Read more →

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


Apr
22

Building powerful and robust websites with Drupal 6

Packt recently published an expanded and updated edition of Drupal: Creating Blogs, Forums, Portals, and Community Websites. The new title is Building powerful and robust websites with Drupal 6, and it contains 362 pages with the index — 100 more pages than there was in the first book. The author, David Mercer, would like his book to become the Drupal community's de facto title for learning the technology Read more →

Apr
09

New Drupal theming ebook

I’m currently working on a Drupal 6 theming ebook. The beta ebook attached to this posting is for Drupal 5.
Update, March 29th, 2008.

I am in the process of writing a 50-and-some pages ebook on Drupal theming. I have an outline and a spiral book full of notes, and lots of sections are already written. My current draft (call that a beta-book) is 15 pages long and if you log in you may download it. Read more →

Because you are not logged in, you cannot see the 2 files attached to this posting. Login or register to download these files.


Aug
22

How to get paid while helping other people

Christina is her real first name. The bulk of the solutions you'll find in the Shopify community forums are from her. She used to provide support more or less on a daily basis for many years. She doesn't hold a Computer Science degree, but boy is she a shrewd programmer nevertheless. Christina is brilliant, self-taught, wise and way too generous. Read more →

May
21

Theming the register form in Drupal 6

The following exercise consists in adding Terms of Use to the register form in Drupal 6. Provided that your website visitors aren't logged in, they can view the register form on the page myWebSite.com/user/register.

This exercise will show you how to:

  • recognize when a module has not registered a specific theming function for a form it generates,
  • register a theming function for a Drupal form in your theme, using HOOK_theme,
  • use the Devel module function dsm() to inspect complex variables, such as Drupal forms,
  • use the Theme Developer 'Themer info' widget to inspect those forms that only 'anonymous users' can see, for instance... the register form.

 Read more →

Apr
30

I have an idea

I have an idea for a tutorial.

My idea is to write a Photoshop tutorial, my first one, that would show how to apply realistic drop shadows to photos. Once you get desired result, you can slice your image up and, using CSS rules, apply creative shadows, hence 3d effect, to any image, Drupal block, Drupal box, etc. Similar tutorials are all over the web — well, not exactly, but there are quite a few of them. However, I had difficulty understanding the best of them. I clarified the whole process for myself, and have decided to dump it here. Lovely photo. Attached is my Photoshop CS2 file. The remaining step is to slice the image, of course. (If you examine the above image, you'll notice that I still have work to do to achieve truly realistic results. For example, the color of the 'white' outline is not realistic at the bottom.)

The tutorial is here.

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


Feed