I want to edit my current theme, change the colors so there are multiple color schemes of the same theme for users to choose from.

In the theme file for phptemplate it says

"Custom templates can be written by simply copying the default directory to something
else and making your modifications"

Is there something missing because I've tried this and when I go into admin/themes it brings up this error.

"Fatal error: Cannot redeclare phptemplate_settings() (previously declared in /homepages/38/d89332562/htdocs/themes/phptemplate/phptemplate.theme:23) in /homepages/38/d89332562/htdocs/themes/phptemplate2/phptemplate.theme on line 21
"

Comments

drumm’s picture

By copy the default directory, it means copy the directory which is named 'default,' it is a subdirectory of phptemplate. However, since you want the user to be able to choose their theme you did copy the right thing. Drupal doesn't let the user choose their templates yet, so if you did copy the actual 'default' directory it would only give you a choice as an admin what template the site has. (Sorry, this is kinda technical, there are themes, and some themes let you choose from a selection of templates, it will be better as Drupal is upgraded).

So you copied the right thing, now you need change all the filenames in the 'phptemplate2' directory which start with 'phptemplate' and add in the '2' so it all matches. Then open all the files in your copy and replace any text which says 'phptemplate' with 'phptemplate2'. You might only need to change phptemplate2.theme, but I could be wrong since haven't needed to do this myself.

You can probably get by with changing less, I know you could with the XTemplate theme, but these generic instructions for cloning any theme should do the job.

duztin’s picture

Ok it seemed to work, but now I get this one error,

"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /homepages/38/d89332562/htdocs/themes/phptemplate2/phptemplate2.theme on line 94"

I checked on line 94 and it says

"if ($_GET["q"] == variable_get("site_frontpage", "node")) {"

Any idea on what this means?