Drupal Theming 101

(Update: This is the last in a series (except for the summary) of live posts from DrupalCampWisconsin, with a little cleanup and added links.)

Blake Hall presents.

The professor ran late, so no break between 100 and 101. Blake made this presentation to the Madison PHP Meetup a few days ago. Also stolen from Pro Drupal Development.

Three Theme Engines in Drupal: PHPTal, Smarty (CiviCRM), TPL (Core)+Template.php

Blake is porting a WordPress theme into Drupal. See blakehall.org for what’s “nearly there.”

Every time I hear Blake give a presentation, he always says “the next version is way better.” So it is with Drupal v6, especially in theming.

Larry Garfield picks up with “what’s new in v6.”

Aim: Theming Nirvana. Not there yet.

v4.5: Theming Hell
v4.6: Purgatory, aka Xtemplate
v4.7: Limbo, aka PHPtemplate. Page, node, block and comment templates. Currently the dominant engine.
v5.0: No changes
v6: Pure CSS themes, drive toward separating out presentation. Info files create themes.

Displays the structure of Info files: Stylesheets, scripts, regions, features.

More granular control over content. Data sanitized; fewer inadvertent security holes.

Some code comparisons. Way better.

v6 offers theme inheritance. Set base theme, make whatever changes you want. Use well-named classes to identify areas (though not yet complete).

Template engine is now just a set of tags.

Time to show some code! (Writes 4 lines into demo.info) This is a naked Drupal. No Divs, no Tables, a semantic page. Adds another line: base theme = garland. Looks like Garland (standard theme).

Adds another line to reference a stylesheet. To override an existing stylesheet, reference the same name as the existing stylesheet in the Info file.

Default node template: node.tpl.php. Copy file into your site and modify (un-comment) as you wish.

Cool stuff!

There is one more session scheduled, but this reporter’s brain is getting full. I believe I’m going to call it a day, blogging-wise. I’ve got some summary ideas, which I’ll share when I get refreshed. I’ll also add links and otherwise make pretty. Thanks for reading along. Please comment as the spirit moves.

Powered by ScribeFire.

After Dinner: Web Standards 100

(Update:  This is the eighth in a series of live posts from DrupalCampWisconsin, with a little cleanup and added links.)

Steven Merrill, Bradley U professor presents.

After a fine pizza dinner, we are having joint sessions on theming. It begins with a web standards lecture from Prof. Merrill.

Zeldman (Designing with Web Standards)
Web Designer’s Reference
Save the Pixel

A List Apart
CSS Zen Garden

Basic review of HTML history, from Vannevar Bush’s Memex to Tim Berners-Lee.

HTML Page Structure: Head and Body. That’s it.
HTML Grammar: Tags and Attributes

Page titles are important, especially with tabbed browsers. Google also searches page titles.

Point behind web standards: Understanding the separation between HTML (Structure), CSS (Presentation) and JavaScript (Interactivity). Peruse CSS Zen Garden to see how different stylesheets display identical HTML text and tags.

Ooh, screen shot of the original Mosaic home page.

Browser feature wars makes HTML more presentational, less semantic. Also made pages work in only one browser. Web standards represent the backlash: Semantic HTML.

Switchy McLayout: JavaScript handles many different screen sizes. From A List Apart.

(Crowd agrees: presentation so far too basic. Moving on to advanced elements)

<Typist’s Aside: Is there a real purpose to GiantURL.com?>

CSS Positioning: Floating, fixed, and something else.

<Typist’s second aside: Missed some of the important stuff due to being pinged on IRC. I admire those who can multitask in this fashion. Meanwhile, must look at video later.>

Powered by ScribeFire.

Ubercart: An e-Commerce module

(Update:  This is the seventh in a series of live posts from DrupalCampWisconsin, with a little cleanup and added links.) 

David Needham, a Bradley University student presents.

Ubercart works with PayPal to drive purchases.

Single package includes a core set of fields, with -extra, -fulfillment and -payment options.

Pet store example

Product Catalog: Dogs, other
Create options (Leather and Gold collars)
Create a Dog: Dalmatian. Include image, define a SKU, list price, cost, height, weight, etc.
Add Options to Product page.

Can create roles for a store, like a “member” who registers for discounts. Tried to find the setting that notifies the expiring member to renew; not in Notifications, but it’s here somewhere.

Set access control by taxonomy for “members only.”

Add Shopping Cart block to page.

Shows his PayPal Test Accounts.

Store Management in Ubercart activates the page, pointing to the PayPal Sandbox (test account).
PayPal Test Store page is customizable.

“Hey, I’m a member!”

Visit davidneedham.net/drupalcampwi to see the store.

Google Checkout: Not supported yet.

Pete Prodoehl notes the Ubercart docs are excellent.

You can create bundled ‘product kits’ for multiple items. Should work for tickets too.

Ubercart handles inventory management.

Both David and Pete couldn’t get core e-commerce module to work, and went to Ubercart instead. Others found OSCart much more hassle. ZenCart “just about impossible to train” (James Carlson).

You can also visit livetest.ubercart.org to try it out.

Powered by ScribeFire.

Podcasting with Drupal

(Update:  This is the sixth in a series of live posts from DrupalCampWisconsin, with a little cleanup and added links.) 

Gabe Wollenburg presents.

We’re content creators, not “podcasters.” We write for audiences, not media.

Gabe’s way

Free hosting for Photos, Audio, Video, Live Streaming, Documents
These services are outside the walled garden of your site. Tags and other metadata bring people to your site.
Server problems are Somebody Else’s Problem.

Problems: Outside your control. Backup is hard. Availability is Somebody Else’s Problem. Take care of copyright issues (YouTube takes all rights, Blip.tv doesn’t).

Drupal makes all this easy.
Drupal makes RSS for breakfast.

Audio module: creates individual audio nodes.
Need Views and some other parts.



Audio module sends your podcast to the iTunes directory, with appropriate tags.

Remote Enclosure module. Limited use.

Blake suggests CCK Embedded Media for exploration. We look at that, and it sure seems like the right thing.

Let’s create some content!

Gabe posts Jonathan Coulton’s Code Monkey to writelarge.com. Cover art shows up funny, but you can presumably tweak that.

Still a lot of room for improvement, but I’ll probably learn more too.

You can find another fine podcast at Web414.

Again, the question of how to find “the right module” comes up. This may be what Dries’ company may help with. As noted in the opening session, this is an ongoing discussion and need. How to do this right?

Blake: Check out Lullabot’s “50 Tips and Tricks” podcast.

Powered by ScribeFire.

Drupal Views in depth

(Update:  This is the fifth in a series of live posts from DrupalCampWisconsin, with a little cleanup and added links. As I look over these notes, the “in depth” part of the title may be somewhat misleading. Blake’s presentation was much better than these notes may indicate. Must have been tired and/or hungry.)

Blake Hall presents. Promises we will probably reach his knowledge ceiling, but muddle through eventually.

Views don’t seem like much in description, until you use them.

Example: BarCampMilwaukee2 site.

Views “cross-grid” module

68 Views modules.

Provide Page View / Provide Block View.

Select fields and nodes to include in the View.

Generator module puts fake text in blocks to test.

Lots of other fun.

<Typist’s Note: Starting to drag a little. Missing stuff.>

Powered by ScribeFire.