Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
antoniopironti CreditAttribution: antoniopironti commentedSame problem.
Comment #2
antoniopironti CreditAttribution: antoniopironti commentedThe 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.
Comment #3
chrisck CreditAttribution: chrisck commentedI'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?
Comment #4
antoniopironti CreditAttribution: antoniopironti commentedYou 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).
Comment #5
portulacaCan 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_)?
Comment #6
Mohammed J. RazemNew 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
Comment #7
Mohammed J. Razem@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