Drupal Theme Generator version 4.0
©2005-2006 by Sam Raheb
August 04, 2006
Designed for use with Drupal versions 4.6.x and 4.7.x
Supports both PHPtemplate and Xtemplate Themes
Includes Source Code

Drupal Theme Generator including (with Source Code)
The source code is included in the hopes that someone in the Drupal Community may be interested in building upon the Drupal Theme Generator and re-releasing it to the Drupal Community.

Features
o Revised to support both 4.6.x and 4.7.x PHPtemplate and Xtemplate Themes
o Generate an unlimited amount of site themes for Drupal CMS type websites
o Easily create both PHPtemplate and Xtemplate Themes in minutes
o Supports both flat (non-graphical) and graphic enhanced themes
o Includes 3 modes - Developer, View-All, and User Modes
o Preview your themes on you local computer without having to upload the themes to your Drupal site
o Includes optional Dynamic Drop-down menus support
o Include optional META tags support
o Includes support for adding your own custom programming code.
o Integrate additional CSS, JavaScript, PHP, and HTML code in to the themes via an external file or hard coded format
o Includes both regional and block border-image and background-image features
o Includes a Random color theme generator
o Include a HTML Color assistant
o Change both vertical and horizontal alignment of theme elements
o Includes 9 graphically enhanced 3D website themes
o Includes a theme development test area
o Easy to use spreadsheet interface

System Requirements
Microsoft Excel 2000, 2002, or 2003 with Visual Basic for Applications (VBA) support
Any Internet web browser

Where to get the Program
http://xlecom.com/?q=node/152

Included Sample Themes (all revised):
o 3daframe
o 3dblue
o 3dbluewt
o 3dolive
o 3dolivewt
o 3dpeach
o 3dpeachwt
o bluemarine2
o test

Development Platform
This program was developed under Windows XP Professional SP2. It was written in Excel 2000, tested in Excel 2000 & 2003, and in Windows Internet Explorer 6.0.2900 and Firefox 1.5.0.4

How the Program Basically Works
This program was developed using both the Bluemarine PHPtemplate and Xtemplate themes as the master templates. Therefore, your new themes are based on these models. The design parameters you change basically modify the code in these templates to create new themes.

Drupal Theme Generator Source Code
Most programs typically output results that are static. In the case of the Drupal Theme Generator program, the program outputs actual programming code to be used by other computers. Thus can be said the output is static but is used in a dynamic environment.

The program primarily functions by taking user input and running it through a series of IF-THEN formulas placed in strategic "line code" locations on multiple spreadsheets. The calculated result is a custom set of HTML, php, and CSS code blocks, which are then outputted as individual theme files to your local computer. These theme files are then uploaded to a web server and interpreted by the site's' theme engine to render the final theme to your web browser.

If you are familiar with writing formulas in Microsoft Excel, then this endeavor may be right for you. Keep in mind that all work performed on this program must be open source and publicly available.

Mote information is available at the xlecom.com website.

I hope you enjoy this Drupal Theme Design utility. If you do, I would like to know.

Thanks,

Sam Raheb (sam308)
Drupal Theme Generator Developer
http://xlecom.com

Comments

andybold’s picture

I love this - theme generation made easier for the masses can only be a good thing for Drupal.

One problem for me personally is that I don't run MS Office (or Windows), and the sheet doesn't work too well for me.

Has anybody got this working successfully with OpenOffice.org?

And if not then, Sam, would you mind if I forwarded your work on to the good people at Novell? They are interested in getting examples of Excel sheets bearing macros that do not work in OO.o so that they can improve OO.o and get this working.

Thanks!

Sam308’s picture

andybold:

The VBA macros contained in this program both control both the functionality of the program and output calculated cell values to files on your computer. The file paths and names of these files are defined on the Paths sheet. There is no need to edit the VBA macros for functionality of the program. If you need to write additional macros, then simply write them within another workbook and call them via a button placed on any sheet within this workbook.

General access to the VBA macros in this workbook / program is not granted because the VBA code is proprietary to myself and not Open Source. Therefore I do not want any third parties such as Novell to have access to them.

Sam Raheb (Sam308)

drurian’s picture

Great work!
I have a question though... How do I load a different theme in the design sheet? When I choose another theme in the select list the values remain the same.

Sam308’s picture

Natalie:

You need to press the "Send to >>" button to edit or preview a copy of the retrieved theme.


The popup cell comments should explain this as stateed below:

Theme Values
These values are retrieved from the Database sheet. To edit or preview a copy of the retrieved theme, press the "Send to >>" button to transfer the "Themes Values" to the "Design Values" column.

Design Values
The Design Values column is used as an edit location for designing your themes. The theme named in the first cell of this column represents the active theme.

The active theme utilizes the file assets of the named theme's folder. Therefore, when you generate either the PHPtemplate, Xtemplate, style.css, or menu.js files, these files are written to this folder. The HTML Theme Previews utilize the images from this folder.

Instructions
To design a theme using an existing Database theme as a template, first select a theme from the "Theme Values" column and then transfer it to the "Design Values" column by pressing the "Send to >>" button.

(1) To utilize the images, PHPtemplate, Xtemplate, style.css, and menu.js file assets from a particular theme's folder, select an active theme name from the drop-down list box.

(2) Edit only the cell values identified by red colored fonts.

(3) Preview the theme by pressing the "Preview Theme" button. A new temporary style.css and the optional menu.js file will be created in the Preview directory. The images associated with the Preview will be referenced from active named theme directory.

(4) When you done editing / previewing the new theme, transfer it to the Database sheet by pressing the “Save Theme to Database” button. The "Design Values" will be transferred to the Database under the active named theme.

To edit the colors, either select one from the cell's drop-down list or enter in the 7-character HEX code for the color.

Note: If you select a color from the cell's drop-down list, both the name of the color and the HEX code will be entered into the cell. You do not need to remove the name of the color. Only the last 7 characters of the cell value will be used for the color code.

Spreadsheet Cell Reference Colors
• Red font colored cell are user input cells. Enter your data into these cells.

• Blue colored cells contain formulas. Editing of these cells should be performed by developers who want to modify the design of the theme templates themselves, therefore creating a whole different look than that of the original design.

• Magenta colored cells are linked to and controlled by object items such as the scroll boxes and check boxes. These cells must remain intact as is.

• Black and other font colored cells are description labels.

Hope this helps you,

Sam Raheb (Sam308)

drurian’s picture

Thank you, now it's more clear!

I have one suggestion: would be great to be able to edit block values, not just sidebars (border, background color, padding, etc.)

Magika’s picture

Hi Sam

Thanks for all your work on this, I currently have been using version 3.2 and previously have used v2 with the 3d style.

I am having a problem in that none of my titles are showing on the homepage. I can't work out how to make these show. It isn't that the colour is the same as the backgound but more like there is no text there at all. Do you have any suggections to what I am doing wrong? I am completely stuck on this one.

Please see site below. All the audio posts should have a title of song and artist and all the blog posts should have title but there is nothing

http://www.pylonsounds.com/swaps/

Any tips would be much appreciated

Thanks Guy

Sam308’s picture

I double checked the code in the template files and did not find anything wrong. The code sections for both template types are shown below in the first two code blocks just for the title section you are referring to. As you can see, the title statements are in the template code, but for some reason the title is not printing out in the final HTML as shown in the third code section below.

This led me to believe that you are using Drupal 4.7.x and not 4.6.x.

The Drupal Theme Generator version 3.2 was designed for Drupal 4.6.x. The Drupal Theme Generator version 4.0 was designed for both Drupal 4.6.x. and 4.7.x.

From analyzing the first line of code (the ID) in the drupal.css files for Drupal 4.6.x and 4.7.x and comparing it to your drupal.css file, it seems you are using version Drupal 4.7.x as shown below. Based on this conclusion, you are using the wrong Drupal Theme Generator version. Therefore, you should use the Drupal Theme Generator version 4.0 and not version 3.2.

drupal 4.6.x drupal.css file:
/* $Id: drupal.css,v 1.101.2.2 2005/05/31 23:24:18 unconed Exp $ */

drupal_4.7.x drupal.css file:
/* $Id: drupal.css,v 1.147.2.2 2006/05/08 17:57:29 killes Exp $ */

Your drupal.css file:
/* $Id: drupal.css,v 1.147.2.3 2006/06/30 00:13:45 unconed Exp $ */

phptemplate theme template code section:

      <div id="main">
        <?php print $breadcrumb ?>
        <h1 class="title"><?php print $title ?></h1>
        <div class="tabs"><?php print $tabs ?></div>
        <div id="help"><?php print $help ?></div>

xtemplate theme template code section:

      <div id="main">
        <!-- BEGIN: title -->
        {breadcrumb}
        <h1 class="title">{title}</h1>
        <!-- BEGIN: tabs -->
        <div class="tabs">{tabs}</div>
        <!-- END: tabs -->
        <!-- END: title -->
        <!-- BEGIN: help -->
        <div id="help">{help}</div>
        <!-- END: help -->

Your published HTML code from your page via "view source":

      <div id="main">
                <h1 class="title"></h1>
        <div class="tabs"></div>
        <div id="help"></div>

Sam Raheb (Sam308)

jonnyz’s picture

Hello people interested in Theme Generator. I was wondering if anyone has adapted it for 5.X. I am looking for a simple way of modifying the Golden Hour theme for 5.X and was wondering if anyone is interested in taking on the upgrade of TG Version 4.7 to 5.x and adding Golden Hour as an editable theme. I have no development skills to speak of unfortunately. I contacted Sam but he is tied up with other projects at the moment.

Thanks!