When the user doesn't use the default theme defined for a web site, the module uses the wrong CSS file.
In my case, the default theme is Garland, but the user's theme is Zen Classic. The CSS file used by the module is garland.css, while it should be zen_classic.css (which I created); if the file name doesn't match with the file name the module expects, then it should use activemenu.css.
Comments
Comment #1
avpadernoI checked the values of the global variables
$theme,$theme_key,$custom_theme; the first two variables seem to be set to an empty string, and the last one is set to zero.That is strange, as Drupal is showing the correct theme.
Comment #2
avpadernoIt seems that if the user has set a theme for himself, those variables get a not usable value; in this case, the theme used is the one reported by
$user->theme, where$useris the global variable associated with the current user object.Comment #3
avpadernoI got it to work by changing the function
activemenu_theme_css()to be:I forgot to say I am using Drupal 6.3.
Comment #4
avpadernoNow I got it to use the right CSS file if the user has set his own theme, and I also fixed a problem in the visualization of the navigation menu which had the plus (and minus) images placed over the menu titles. I am not able to make the Zen Classic use the plus, and minus images (the theme uses its own images for the menus).
Comment #5
avpadernoThe module is also using the wrong CSS file in pages like
admin/build/block/list/<theme>(when<theme>is not the site theme).The issue seems caused by
$theme,$theme_key,$custom_themenot getting any useful value ifinit_theme()is not called before to check their values.init_theme()cannot be called in pages likeadmin/build/block/list/<theme>, or it would force the page to be rendered using the site theme (which is not the wanted thing).The problem is present also in Drupal 6.4.
Comment #6
avpadernoAs also reported by a comment in the jstools.module referred to the function
jstools_theme_include():Inside the implementation of
hook_footer()the variables$theme,$theme_key,$custom_themeget a useful value.Comment #7
avpadernoDid anybody else notice that in some themes the [+], and [-] are placed to the left of the imagine used by the theme for the
<li>tags?Comment #8
nedjoApplied, thanks.