I use the Rubik Admin theme which uses Tao as a base theme. This particular theme requires edits to the template.php file as outlined in the FAQ in order to work. I made the edits and it worked fine, the problem is that I use this theme for a multisite install, but not all of my sites use Smart Tabs. I don't know enough PHP to determine if there is a way to edit the template.php file so that it only applies the edits if Smart Tabs is loaded. So basically if it is loaded I want: menu_primary_local_tasks_smart_tabs(), otherwise, menu_primary_local_tasks() etc. I only use Smart Tabs with Revisioning and not all of my sites use that.

Comments

rdeboer’s picture

Try using the following:

...
if (module_exists('smart_tabs')) { // tests whether Smart Tabs exists AND is enabled
.... // do the menu_primary_local_tasks_smart_tabs(...) bits
}
else {
    // do the menu_primary_local_tasks(...) bits
}
jon betts’s picture

@RdeBoer - Thanks! That worked perfectly and now I know how to test if a module exists and is enabled!

rdeboer’s picture

Status: Active » Fixed

Great!

Status: Fixed » Closed (fixed)

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

paskainos’s picture

Title: Validation help for getting Smart Tags to work with Tao/Rubik Admin Theme » Validation help for getting Smart Tabs to work with Tao/Rubik Admin Theme
Version: 6.x-1.2 » 6.x-1.7
Status: Closed (fixed) » Active

Is there perhaps a more permanent fix (patch)? Rubik is ca. 9,000 reported installs. I'm surprised this hasn't been more prevalent for other Smart tabs users.

rdeboer’s picture

You can implement the patch via a subtheme. That way you can independently upgrade both subtheme and base theme (in your case Rubik) without you having to reapply the change.

Here are a couple of links to article describing how you can create a subtheme. Will only take you a few minutes.
http://www.flink.com.au/tips-tricks/create-subtheme (for D7, but D6 is almost identical)
http://drupal.org/node/441088 (for D6, more detailed)

rdeboer’s picture

Status: Active » Closed (works as designed)