Greg Patarini Sasquatch by birth Started in Computers in 1979 @tnhomestead [email_address] http://www.odesk.com/contractors/tnhomestead
General Rules Always develop on a test site!!! Write secure code! Selectively Deploy your Theme! Make sure PHP error reporting is OFF! Can use a different theme for admin pages!
Drupal 6 Cheat Sheet http://www.minezone.org/blog/2009/02/04/drupal-6-theming-cheat-sheet/
Theming Options EZ Options Use a theme that is close to what you want Easy custom themes offered by: Drupal Gardens Buzzr Theme Generators
How to theme 1. Parts of a drupal theme. 2. Built in tools for changing the look of a theme 3. How to create a theme from an existing one 4. How to create your own theme
Parts of Drupal Theme themename.info — A required file that is new to Drupal 6 which provides information about the theme. page.tpl.php — The main template that defines the content on most of the page. style.css — The CSS file that sets the CSS rules for the template. logo.png — Your logo, if you are using one. screenshot.png — This is a screenshot of your theme that is used in the admin panel and in the user account settings if you have enabled more than one theme so that visitors can choose which theme they want to use.
The Rest of the story node.tpl.php — This file defines the content of the nodes. block.tpl.php — Defines the content of the blocks. comment.tpl.php — Defines the content of the comments. box.tpl.php — puts a box around things like comments.  style-rtl.css — this file is new to Drupal 6's Bluemarine.
Template Files Not all template files are needed New theme should be in sites/all/themes/ Bluemarine is a good starter theme So is Zen
Themename.info Required file Provides information on the theme * name required * description recommended * screenshot * version discouraged * core required * engine required in most cases * base theme * regions * features * stylesheets
name = Garland description = Tableless, recolorable, multi-column, fluid width theme (default). version = VERSION core = 6.x engine = phptemplate stylesheets[all][] = style.css stylesheets[print][] = print.css ; Information added by drupal.org packaging script on 2008-02-13 version = "6.0" project = "drupal" datestamp = "1202913006"
Template pages * page.tpl.php (for the overall page layout) * node.tpl.php (for all the 'nodes' or main content sections of a page) * block.tpl.php (for the blocks, in whichever regions you place them) * comment.tpl.php (for all comments on you site)
Modules to help Theme Color Conditional Stylesheets Custom Node Template Sections Signwriter Panels
Color Theme must be designed to use it
Background must be white
Modifies a themes style.css
Conditional Stylesheets Used to solve rendering problems in IE  Using CSS
Custom Node Module Meant to customize specific nodes
If you want all nodes changed, better off using node.tpl.php
Sections Allows you to create sections
Each section has its own theme
example name: Administration Section path: admin* and select a theme for that section.
Signwriter Allows you to use true type fonts to replace text
Must have the GD library included
Font file names must be lower case

Drupal

  • 1.
  • 2.
    Greg Patarini Sasquatchby birth Started in Computers in 1979 @tnhomestead [email_address] http://www.odesk.com/contractors/tnhomestead
  • 3.
    General Rules Alwaysdevelop on a test site!!! Write secure code! Selectively Deploy your Theme! Make sure PHP error reporting is OFF! Can use a different theme for admin pages!
  • 4.
    Drupal 6 CheatSheet http://www.minezone.org/blog/2009/02/04/drupal-6-theming-cheat-sheet/
  • 5.
    Theming Options EZOptions Use a theme that is close to what you want Easy custom themes offered by: Drupal Gardens Buzzr Theme Generators
  • 6.
    How to theme1. Parts of a drupal theme. 2. Built in tools for changing the look of a theme 3. How to create a theme from an existing one 4. How to create your own theme
  • 7.
    Parts of DrupalTheme themename.info — A required file that is new to Drupal 6 which provides information about the theme. page.tpl.php — The main template that defines the content on most of the page. style.css — The CSS file that sets the CSS rules for the template. logo.png — Your logo, if you are using one. screenshot.png — This is a screenshot of your theme that is used in the admin panel and in the user account settings if you have enabled more than one theme so that visitors can choose which theme they want to use.
  • 8.
    The Rest ofthe story node.tpl.php — This file defines the content of the nodes. block.tpl.php — Defines the content of the blocks. comment.tpl.php — Defines the content of the comments. box.tpl.php — puts a box around things like comments. style-rtl.css — this file is new to Drupal 6's Bluemarine.
  • 9.
    Template Files Notall template files are needed New theme should be in sites/all/themes/ Bluemarine is a good starter theme So is Zen
  • 10.
    Themename.info Required fileProvides information on the theme * name required * description recommended * screenshot * version discouraged * core required * engine required in most cases * base theme * regions * features * stylesheets
  • 11.
    name = Garlanddescription = Tableless, recolorable, multi-column, fluid width theme (default). version = VERSION core = 6.x engine = phptemplate stylesheets[all][] = style.css stylesheets[print][] = print.css ; Information added by drupal.org packaging script on 2008-02-13 version = "6.0" project = "drupal" datestamp = "1202913006"
  • 12.
    Template pages *page.tpl.php (for the overall page layout) * node.tpl.php (for all the 'nodes' or main content sections of a page) * block.tpl.php (for the blocks, in whichever regions you place them) * comment.tpl.php (for all comments on you site)
  • 13.
    Modules to helpTheme Color Conditional Stylesheets Custom Node Template Sections Signwriter Panels
  • 14.
    Color Theme mustbe designed to use it
  • 15.
  • 16.
  • 17.
    Conditional Stylesheets Usedto solve rendering problems in IE Using CSS
  • 18.
    Custom Node ModuleMeant to customize specific nodes
  • 19.
    If you wantall nodes changed, better off using node.tpl.php
  • 20.
    Sections Allows youto create sections
  • 21.
    Each section hasits own theme
  • 22.
    example name: AdministrationSection path: admin* and select a theme for that section.
  • 23.
    Signwriter Allows youto use true type fonts to replace text
  • 24.
    Must have theGD library included
  • 25.
    Font file namesmust be lower case
  • 26.
    Panels The Panelsmodule allows a site administrator to create customized layouts for multiple uses. At its core it is a drag and drop content manager that lets you visually design a layout and place content within that layout. Integration with other systems allows you to create nodes that use this, landing pages that use this, and even override system pages such as taxonomy and the node page so that you can customize the layout of your site with very fine grained permissions.
  • 27.
    Now for thefun We will Drupalize a static html site
  • 28.
    Drupalize a HTML/CSStemplate Step 1 Remove all head content Step 2 Replace all head content Step 3 replace body content as needed
  • 29.
    <!DOCTYPE html PUBLIC&quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>
  • 30.
    <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;<?phpprint $language->language; ?>&quot; lang=&quot;<?php print $language->language; ?>&quot; dir=&quot;<?php print $language->dir; ?>&quot;>
  • 31.
    <head> <title><?php print$head_title; ?></title> <?php print $head; ?> <?php print $styles; ?> <?php print $scripts; ?> </head>
  • 32.
    PHP Changes Youcan change whats displayed very easily Just cut and paste the code Anywhere you want it