I would very much like to use Zen in Drupal 6. Does anyone know how to add an info file?

Comments

johnalbin’s picture

andrewfn’s picture

StatusFileSize
new3.99 KB
new12.16 KB
new1 KB
new941 bytes

Well, it proved much more of a challenge than I thought it would be. Creating a new .info file was the easiest part. There were several more roadblocks to be removed before Zen worked on Drupal 6 which took many more hours than I was expecting.

As far as I can tell, the Zen theme is working 100%, (but the Zen-fixed theme is having some trouble with sidebars. As soon as this is solved I will upload the fix.)

Here are the problems encountered

  1. The function _phptemplate_variables is no longer supported in D6. Instead we must use phptemplate_preprocess_page, phptemplate_preprocess_node & phptemplate_preprocess_comment. I have made the changes which required a re-organization of template.php (attached). Some lines of the old _phptemplate_variables had to be repeated in each of the new functions.
  2. The old sidebar_left and sidebar_right variables have to be globally replaced with left and right. This hits page.tpl.php as well.
  3. This is not formally documented, as far as I can see, but Drupal 6 uses error_reporting = E_ALL which throws up several errors in template.php. They have to be resolved by putting an isset() around the variable, rather than the old way of testing if it is true or false.

I have uploaded the complete files which have to be renamed, since the system won't allow php or info files to be attached.

For future reference, the changes for D6 themes are documented here: http://drupal.org/node/132442 , http://drupal.org/node/114774 and http://drupal.org/node/165706

andrewfn’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB
new1023 bytes

I have got Zen-fixed working. The problem seems to be that it needs a copy of page.tpl.php copied into the zen-fixed folder. I'm sure there must be a better way to do this, but at least it works for now.

I have also done some tidying up to zen-fixed.info and the template.php within zen-fixed. When I figure out how to do it, I will create patch files for the ones I have changed.

catch’s picture

Title: Add Drupal 6 .info file » Upgrade to D6

changing title and tracking.

johnalbin’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Active

A D6-compatible version of Zen is in the HEAD branch. Which you can download from CVS or from here: http://drupal.org/node/96810

Note that there are some bugs in Drupal 6.0-rc1 that prevent tabs from being correctly rendered: http://drupal.org/node/207029

And, of course, there's a lot of work that still needs to be done.

  • All css rules needs to be updated as there are a bunch of class names changed in D6.
  • Need a reference file for core D6; in the same format as the current core D5 reference file.
  • Remove the code that was required to have decent subtheme support in D5.
  • Updated README.txt and CSS file comments.

Assistance would be appreciated.

flickerfly’s picture

subscribing, thanks for your work on this guys.

ajfabb’s picture

Can we break up #5 into small tasks (that are more digestible for newer theme developers) and file new tasks?

flickerfly’s picture

Title: Upgrade to D6 » Port Zen to D6

I'm changing this so that it is similar to the name other projects are using for this same type of issue. :-) Hope it makes life easier.

johnalbin’s picture

Status: Active » Fixed

Drupal 6.x-1.0-beta1 is now available.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.