Dojo Lesson #6 -- Theming and the Themer Pack

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
joshk's picture
Start: 
2007-02-05 03:00 Etc/GMT-8

Speed, strength, module hooksI'm back on to give another Dojo Lesson this coming Sunday at the usual time: 11am PST / 2PM EST / 4PM Buenos Ares / 8PM Belgium/Hungary. We'll convene in #drupal-dojo, and on our Skype/VNC lesson session and spend a couple hours addressing topics of concern to up-and-coming Drupalists.

UPDATE: Screencast torrent for this lesson is available.

UPDATE: Sunday's Lesson Will Be Focused On The Drupal 5 Themer Pack. There's also another g.d.o group for this if you find it very exciting. We'll talk about the aims of the project, cover drupal theme concepts in general, and get down and dirty with some template files.

The Drupal Dojo is a new community group dedicated to spreading best-practices and helping developers who are new to the system get up to speed and become masters in their own right. There's a shortage of Drupal talent, and everybody knows it. If you're a newcomer looking for help in grokking the system or an old hand who's tired of being told to clone yourself, consider joining the Dojo!

AttachmentSize
drupal-crane.jpg5.51 KB

Comments

Access Control

Tresler's picture

Taxonomy Access Control, node_access, node_access_arbiter

Writing access control into modules by role?

Basically permissions in general.

and all that jazz.


Tresler Designs

yes

morphir's picture

I want focus on coding. More coding!

Both nodeapi and formapi. Deploying CCK field would be fun too. But we could need a lesson on hook_perm.

Ok, I think you got my point josh. You are a great programmer, and there is much more to learn - programing wise.

It's clear there needs to be

merlinofchaos's picture

It's clear there needs to be a node access presentation. I'm willing to take part in one, though I'm not sure I'm quite organized enough (or have the time to BE organized enough) to truly run one, I can certainly handle a section describing how node access works in Drupal 5, and what writing a node access module is going to be like.

I like this theming idea

gusaus's picture

Took this from the lesson wiki:

Interactive Workshop: Anatomy of a theme project: not just theming, or CSS or PHP per se, but rather, which theme to use as a springboard (tableless?), how the process goes, how to separate graphic design from coding so people of different disciplines can work together, best practices, all the stuff you have to do to get it done and it what order. (suggested by victorkane)

* Pros: Would get us all on the right path to theming, something that people find the hardest to share in the drupal community. Could be integrated with the Themer Pack Working Group (http://groups.drupal.org/themer-pack-working-group), for example. Could be started up by a single class presentation.
* Cons: Would have to be ongoing, not a one-shot presentation deal.

Think this is yet another way we can make a real contribution to the community (merlin's project seems pretty essential) and get some hands-on training.

Possibly the Zen theme may be a good starting point:

Zen is the ultimate starting theme for Drupal 5. If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has LOTs of documentation in the form of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php).

The idea behind the Zen theme is to have a very flexible standards-compliant and (relatively) semantically correct XHTML theme that can be highly modified through CSS.

Personally, I don't think NOT being a one-shot presentation deal is a bad thing.

Gus Austin
Director of Chaos and Confusion
PepperAlley Productions
What am I trying to do with Drupal?

Gus Austin

Good idea

Real world example

kuprishuz's picture

I think one of the most useful lesson plans would be to build a simple site, over viewing a variety of topics, (cck, views, panels, theming) of course you cant go completely in depth on any one topic, and some of them have already been covered.

Most people are more comfortable with learning by example, so far some of the pieces have been went over but no full example of how the pieces can be put together to make a full working site, i think that sort of example could be related to everyones individuals projects. I may know how to use cck / views now, but how do i determine if what i want is outside the scope of it and i should develop my own module, etc..

Not sure this can be taught

joshk's picture

I think I understand what you're going for here, but I have doubts that it can be taught. First of all, these questions don't tend to have definitively "right" or "wrong" answers. A lot of this is a question of style and experience.

The question of "do I use CCK or do I develop my own module" comes up all the time. The answer is "yes!" You should pick one way and do it, because the most important thing is that you dive into the hard problems, which is where the learning happens.

http://www.chapterthreellc.com | http://www.outlandishjosh.com

Back to Basics...

NikLP's picture

I know this might seem a bit daft, but I've tried addressing this point a couple of times, with pretty much no response. I don't think this is invalid, however.

If there is a situation of high demand and low supply of Drupal geeks, then the best way to get new talent involved is surely to at least offer one opportunity to have a Q&A and demo of the basic functionality. I know more about CCK, Views, Panels, contrib modules etc than I do about how to use the core functionality of the Beast.

Basically, what I'm saying is, there are a lot of guys out there that are struggling to find a good solid way into this. I myself am pretty confused as to how I would build just the simplest of websites. I have a much better idea about how to build an enterprise scale affair. This seems pretty much counter-intuitive. Could we perhaps have one session that would deal with putting together a very simple site, that would cover a multitude of the elements of Drupal site construction? This would cover issues of use of the menu system, navigation options, category/section options, etc.

I for one (much to my chagrin and embarrassment) have no idea how to construct the simplest of all websites: plain old hierarchically navigated and structured brochureware. When I finish typing this, I've got to build one. Right Now. First time for everything, sure, but I'm almost completely clueless with the book/page/taxonomy/nav things. I'm not alone, either.

Normal service resumes now... :)

Idea Wiki

Tresler's picture

Heya, not a bad idea. I'd certainly be willing to teach this. At the moment we have been trying to keep our lessons in chunks that can make it back to dcumentation and I don't think "How to set up a simple site" is specific enough for that.

The wiki has this

Drupal Overview: a wider "best practice" lesson that tries to cover every major aspect of the core system. (from joshk)

* Pros: would have pretty good appeal
* Cons: kinda boring for me; I sort of want to do this with a good script so as to make a great long-lasting screencast archive.

I'd say this is
* Install
* Create Content
* Menu Items & Weight
* Blocks & Weight
* Templating
* CSS

At least thats what I do on all my brochure-ware sites.


Tresler Designs

The Time Factor

glendac's picture

Yes, I agree, "How to set up a simple site" would be boring. I think the important factor to consider in what to cover is time - what are the really essential things that the teachers and documenters (?) in this group can invest their time on. I think you have rightly identified those essential chunks - esp. the APIs. Each of us should be able to take responsibility for the 'learnable-on-your-own' stuff about Drupal (some of which you listed above). [Though I must admit, coding is hard!!!]

Anyway, for those of you, who like me are taking their time lingering in the big picture instead of diving into actual coding, perhaps this Drupal-based CMS course being offered at the University of Michigan's School of Information will at least give some structure to our sometimes vague ideas. Personally, I find Drupal-Dojo to be a better university (Josh, et al perhaps can propose to teach as adjunct faculty at these Information Schools).

Great points (as are most...)

gusaus's picture

And that link to the 'Drupal-based CMS course' provides a great outline!

It seems like we should come to terms that we're not at the same level - have different opinions about what learning style (or forum) works - varying things we want to learn - have a wide range assets we can bring to the table and contribute. To me, most of that is all good.

*Learning those essential chunks? Tasty!
*More structured 'how to build a site' (real and/or fake)? Even if you don't have a full grasp on everything, think it's still helpful to observe.
*Working with Ninjas on core projects (modules, themes, documentation)? Some of that is already happening!
*Collaborating with other working/learning groups? To me, working groups (at least the ones that are actually doing anything) can almost be looked at as Dojos...
*Getting some of those Ninjas in here to show us how they built a clients site? Or just take any site and say 'how would we build that in Drupal'? Invaluable!
*Lessons like 'how to do business and be a good citizen in an open source community'? There's a lot more than programming in this dynamic community.
*Making this gusaus character pipe down already? Please!

Live weekly lessons are great, but why couldn't we supplement those with learning materials (text, audio, video) we produce and/or aggregate from what's already out there. Would it be a bad thing to branch off into many different topics and forums? If we keep it a top priority to consistently document, organize, collate, and aggregate (in this Groups forum and on Drupal.org), I don't see any harm in mixing things up.

Gus Austin
Director of Chaos and Confusion
PepperAlley Productions
What am I trying to do with Drupal?

Gus Austin

Might I point out

Tresler's picture

No one is 'locked in to' Sunday's at 2. Get a willing developer, book a time by posting an event on the dojo page, and have a class on this.

I think this is a miscommunication on the term 'developer'. My connotation of 'become a ninja' is making the jump from deploying sites with basic modules, css, and phptemplating to learning nodeAPI. It wasn't mind-boggling for me, it was intuitive once I saw. Other people are bound to be different.

However, and here I think is the key. While the documentation we end up producing should have a sequence to it, there is no need for that in the lesson structure. Advanced, Intermediate, and Beginner can all be taught at once.

So book a time and a dev and organize this. While I think larger projects (like building a courseware site, e.g.) need to be driven by a substantially large group. Lessons can be organized for any group of two or more.

Lets do it all.


Tresler Designs

Let's roll! But where are we rolling?

gusaus's picture

I think we've gone in circles enough to decide that moving on with a few projects will be a good thing - Also think it may be worthwhile to come up with some benchmarks inso we can gauge whether a particular project would be good for this group/good for Drupal. I put a few ideas over on this wiki (w/comments enabled) so possibly we can discuss and make the doc sound...uhhh...logical.

The other issue is how to best keep track of things in this Group Forum. I agree that the well organized documentation will eventually come from these organic projects, but where does the conversation, collaboration, and development take place? How do we provide an easy way for anyone interested (in a particular project) to keep track and participate (on g.d.o.) without inundating the entire group? It seems like we're having enough of challenge just organizing the existing lesson plans, I'm not quite sure how we'd track all these projects and all the lessons, conversations, etc. that they will contain. I'm for 'pushin the envelope' within the confines of this group structure - think we'll eventually get to the ideal system/structure - in the meantime, possibly we should discuss some ideas on what may be best for now.

A few questions/ideas:
*dev on someone else's server and/or how will drupal support for install profiles come into play? (http://drupal.org/node/113939)
*create subgroups for each project and/or utilize wikis (mediawiki, etc.) - if we're currently not set up to do that, we could probably aggregate the materials from outside sources (provided they have rss feeds) - hmmm... maybe a Drupal learning portal???

If you check out this post (http://groups.drupal.org/node/2030), you'll see that we've been running circles for quite some time. We'll figure it out as we go along. In the meantime, let's roll a few projects y'all!

Gus Austin
Director of Chaos and Confusion
PepperAlley Productions
What am I trying to do with Drupal?

Gus Austin

If it matters

Tresler's picture

My mistake - my previous comment is meant to be a replay to NikLP's comment, not to gusaus'


Tresler Designs

Easy now!

NikLP's picture

I think my point was not well met - there are thousands of developers out there searching for a CMS that they can easily get into and develop saleable sites with, almost straight off the bat. This is why Joomla does so well, no mucking about. What I was trying to get across is that the (relatively) small amount of effort required to present one single Dojo session covering the basics of the system would be far outweighed by the benefits to the community as a whole.

Given that all the sessions are recorded and stored for posterity, I would expect - with or without a massive presence in the actual 'dojo' - that the number of downloads for this particular example would go through the roof. There are a lot of people out there that are simply put off this system because the easiest thing in the world to do with any other system can't be done without a good level of knowledge of Drupal - namely, install, create a section, create a subsection, put pages in subsection. When you know, it's easy, for sure. I still don't. I've read, searched, read some more. I've put off even building a demo [brochureware] site because of that.

Calling any of that "boring", whether in relation to Josh's post or not, is a bit weak, IMO. I constantly come across posts from people who are looking for exactly the kind of information I'm describing. Another key fact is, everyone should remember that different people learn in different ways. I like screencasts - it's learning by example. I hate poring over pages of mostly useless information looking for a single fact that's reading for the sake of it; no fun, and very time consuming.

Aside from the fact that the Dojo advertises itself as a service to make Drupal "ninjas" out of normal developers - a claim which I myself readily subscribed to - I find it awkward that the topics for the sessions have started at "advanced" and moved haphazardly from "digestable" (contrib modules) to "mind boggling" (node api). If people are to learn the system, they must surely be presented with facts that they can learn in order of their relevance from the ground up?

Keep it simple. Work up.

NikLP

GiorgosK's picture

I am not agreeing or disagreeing with you or anybody else

I am a newbie myself,

I have searched through and installed and unistalled (core and contributed modules) submitted bug reports (and feature requests) asked questions (and tried to answer questions) in order to do what I had in mind

It was (and it is) time consuming but in the end I am learning how to put the pieces of the puzzle together. If you are planning on sticking around its priceless to know how to put the pieces together.

There is nothing like trying, so I suggest read a good general overview (from IBM about 4.7 or from drupal ) and start with installing drupal in your server and configuring it to do what you want it to, in a little bit it will all make sense. If it doesn't and you get stuck search for it in the forums (or in the support and bug reports of the specific module) if you find nothing post a question, if it gets lost without answer, post a follow up with your progress, if nobody answers again contact me I'll take a look.

It helps a lot to know the drupal terminology (make sure you understand node, taxonomy, category.module, blocks, themes, paths etc ...)

EDIT: this was just brought to my attention http://drupal.org/node/120612 (good read for newbies)

Univ. of Michigan has dozens of helpful screencasts

Walt Esquivel's picture

Hi Glenda,

Thanks for the link to UM's School of Info. For some reason, I received an "404 Error: Page Not Found" when I visited your link to UM. So, I decided to search UM's web site and found the course I believe you referred to. This course outline contains excellent screencasts! Is it the one your referred to? Regardless, I found it because of you.

There are screencasts on modules, on themes, and much more! If you haven't already documented the UM course(s) somewhere in your Dojo outlines or under some wiki on resources, I highly urge you to do so (I honestly just stumbled on your UM link and haven't searched on other Dojo postings). Perhaps you could add another category to your outline titled something along the lines of "University/College Resources" and include links, e.g., to UM, et al? : )

One thing I like about your contributions is the high degree of detail in your categorization. Your posts are helpful. In fact, I'm being a bit bold here in suggesting that you add a signature to your profile so that a link to your portal to the Drupal Dojo (as mentioned here) is readily available to everyone. Hey, you're good at categorization/organization and others should benefit from it. : )

Thank you! I'm off to watch some screencasts. : )

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

hard lesson vs easy lesson

lapur's picture

I agree a hard lesson is preferable to an easy lesson.

the easy lesson can be done by reading the 2 drupal books sold on amazon and the bryght guide.

lesson idea: og groups list

lapur's picture

I need to create a list of all groups that's not like the default list.

i believe the default is in reverse chronological order (creation time) with 4 set fields.

I need different fields, and I want it to be ordered by number of members (descending).

I looked at og view but i believe that's quite different. If there's a module that does this, that'd be great to know.

if not, seems like this could be a very good lesson topic.

Also, I agree that a lesson demonstrating writing of a module using access control would be great.

themer pack sounds great; variables in phptemplate.engine?

lapur's picture

hopefully that will include covering the variables in phptemplate.engine?