Hi everybody,

It seems that there is a issue when I try to change the display name on the admin/config/user-interface/switchtheme page.

I want to allow user to change theme between the new one(Pixture Reloaded) and the old one (Garland). So i change the display name by ' new theme' and 'old theme'.

On the switchtheme_select() function, it tries to get the variable like that :
$options[$name] = variable_get('switchtheme_' . $label, $label);
The switch theme variable looks like that :
switchtheme_garland or switchtheme_pixture_reloaded.
But the $label look like Garland and Pixture Reloaded, so it could not find the variable...

Solution !!
Replace the $options[$name] = variable_get('switchtheme_' . $label, $label);
by $options[$name] = variable_get('switchtheme_' . $name, $label);

Elodie

Comments

Rob C’s picture

Indeed, this works.
Looks like it's already in the dev, seems to work okay.

jean-luc-1’s picture

I also need to change the theme names in the user switch block and it doesn't work with 7.x-1.0 version of Switchname.
Jean-Luc

B.X’s picture

//Replace the 
$options[$name] = variable_get('switchtheme_' . $label, $label);
//by 
$options[$name] = variable_get('switchtheme_' . $name, $label);

Thanks friend, this code works, now I can change the name. Wow!

webdev100’s picture

Issue summary: View changes

Hi,

where can I find the switchtheme_select() function?

-D

jwilson3’s picture

Status: Active » Fixed

@DrupalNew1: its in the switchtheme.module file. This issue has been fixed in the development version of the code. you can download a dev snapshot on the project page, which should fix this issue in Drupal 7. not sure about d6, so if anyone needs a backport, change the status.

jwilson3’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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