Override the default popup message by coping and altering better_messages.tpl.php into your theme directory.

I did this and flushed cache, is not loading the template. File is in root theme directory. Am using official release.

Comments

antoniopironti’s picture

Same problem.

antoniopironti’s picture

The problem is caused by a "mismatch" between theme_registry key and template file name: better_messages.tpl.php is related to better_messages_skin theme registry key. For this reason, in order to override the template file, "better_messages.tpl.php" must be renamed as "better_messages_skin.tpl.php" in your theme directory.

IMHO a name refactoring of the theme functions should be done.

chrisck’s picture

I'm using zen theme as my default front-end. I would like to use the better messages module to show on the front-end with the default style provided. How can I do this?

antoniopironti’s picture

You are using 2 different themes: zen theme for the front end and another one for the backend. Is it right?
I have the same scenario in my current project. The skin you select in the better message settings page is the one you have implemented in the default theme. So, if zen theme is your default theme and if you have implemented a custom better messages skin for this theme, this style is the one used in all other theme enabled for your site.
This is a common behaviour for almost all theme-related modules.

For this reason, i think that the only way to use a better messages style different from the one used in the default theme is to create a better_messages_skin.tpl file (see my previous comment).

portulaca’s picture

Can you explain the case of using the template with different themes a bit more?

I have admin module installed that provides a special admin theme. So the template override (I renamed it to better_messages_skin.tpl.php) works only on the content part (front-end) of the site, on admin (back-end) default skin is used.

Can this be configured so I can choose which skin to apply to which theme (even admin theme)?

btw. is there a reason why inline CSS is used on the wrapper in theme functions, why not just add it into the css file?
I can't override the theme_better_messages function in my template.php, is there something special I need to do (I tried changing theme_ to phptemplate_ and mytheme_)?

Mohammed J. Razem’s picture

Version: 6.x-1.9 » 6.x-1.10
Component: Miscellaneous » Code
Priority: Normal » Critical
Status: Active » Fixed

New release that fixed this.

Skins are no longer needed by Better Messages, instead you can override the .tpl and .css as per your themes.

See #664856: heap overflow detected

Mohammed J. Razem’s picture

@portulaca

Override better_messages.tpl.php file inside each theme.
You can also override the better_messages.css file inside your theme by adding:
stylesheets[all][] = better_messages.css

Status: Fixed » Closed (fixed)

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