The function rootcandy_system_settings_form checks that the fourth argument of the URL is a sub-theme of rootcandy, but the list of sub-themes is setted directly in the code. This patch changes the function taking a list of rootcandy sub-themes installed using list_theme function.
Thus to have the settings for the theme available for other sub-theme other by rootcandy_dark and rootcandy_fixed.

CommentFileSizeAuthor
#5 535504.patch720 bytesabaddon
rootcandy_system_settings_form.patch868 bytespeximo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sign’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

Very nice! Committed
thank you

sign’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

abaddon’s picture

Version: 6.x-1.x-dev » 6.x-1.8
Status: Closed (fixed) » Needs review

this patch doesnt allow me to build a subtheme of a rootcandy subtheme, the function isnt running for the subtheme and depending on automatically inheriting the theme-settings.php gets me a broken form, ive fixed it to work on base themes being other rootcandy subthemes too
my theme is a subtheme of rootcandy dark

--- rootcandy/template.php_dist      2010-08-01 22:22:47.000000000 +0000
+++ rootcandy/template.php   2010-08-02 02:00:14.000000000 +0000
@@ -548,7 +548,7 @@ function _rootcandy_countmatches($arrayo
 function rootcandy_system_settings_form($form) {
   $themes = list_themes();
   $enabled_theme = arg(4);
-  if ($form['#id'] == 'system-theme-settings' AND ($enabled_theme == 'rootcandy' || $themes[$enabled_theme]->base_theme == 'rootcandy')) {
+  if ($form['#id'] == 'system-theme-settings' AND ($enabled_theme == 'rootcandy' || strpos($themes[$enabled_theme]->base_theme, 'rootcandy') === 0)) {

     foreach ($form['theme_specific']['rows'] as $rid => $row) {
       //we are only interested in numeric keys

and i can have a theme-settings.php that inherits everything hence less duplication, like:

include_once $base_path . drupal_get_path('theme', 'rootcandy_dark') . '/theme-settings.php' ;
function rootcandy_custom_settings($saved_settings){
        return rootcandy_dark_settings($saved_settings) ;
}

(my subtheme is named rootcandy_custom)

abaddon’s picture

FileSize
720 bytes

heres a patch to get things moving, and ive replaced the strpos with in_array,
to reiterate this, the initial patch in this thread fixes the case when the subtheme is a subtheme of rootcandy, but i have a subtheme of rootcandy_dark, i just had to change the IF to check for all official rootcandy themes

sign’s picture

Version: 6.x-1.8 » 6.x-1.x-dev
Status: Needs review » Fixed

looking good, committed to dev, some testing would be nice :)

Status: Fixed » Closed (fixed)

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