Forums / General Questions / Remove MessageStack Icons...

Remove MessageStack Icons...

Locked
Results 1 to 3 of 3
This thread is locked. New replies are disabled.
14 Jun 2007, 21:16
#1
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
0

Remove MessageStack Icons...

Does anyone know how to remove the MessageStack icons that appear with some messages?

For example, when you update you account details a message appears with a small icon of a lightbulb. Or, when you have incorrect permissions set on your configure.php file a message appears with a warning triangle.

I had a little play around with the code, but been unable to get rid of these icons... yet.
15 Jun 2007, 02:40
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Remove MessageStack Icons...

You could change the ICON_IMAGE_ERROR, ICON_IMAGE_WARNING, ICON_IMAGE_SUCCESS definitions to point to pixel_trans.gif instead of their current settings in your icon_names.php file in your languages folders.

define('ICON_IMAGE_ERROR', 'error.gif');
define('ICON_IMAGE_WARNING', 'warning.gif');
define('ICON_IMAGE_SUCCESS', 'success.gif');


But ... it begs the question "why" ...
15 Jun 2007, 09:35
#3
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
0

Re: Remove MessageStack Icons...

Thanks for this DrByte.

I've actually done things a different way now. Yes, it involves editing a core file (sorry), but it's only commenting out stuff! :)

Lines 43 to 49 in includes/classes/message_stack.php were changed to this...

$this->messages[] = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => /*zen_image($template->get_template_dir(ICON_IMAGE_ERROR, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_ERROR, ICON_ERROR_ALT) . '  ' . */$message);
      } elseif ($type == 'warning') {
        $this->messages[] = array('params' => 'class="messageStackWarning larger"', 'class' => $class, 'text' => /*zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . '  ' . */$message);
      } elseif ($type == 'success') {
        $this->messages[] = array('params' => 'class="messageStackSuccess larger"', 'class' => $class, 'text' => /*zen_image($template->get_template_dir(ICON_IMAGE_SUCCESS, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_SUCCESS, ICON_SUCCESS_ALT) . '  ' . */$message);
      } elseif ($type == 'caution') {
        $this->messages[] = array('params' => 'class="messageStackCaution larger"', 'class' => $class, 'text' => /*zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . '  ' . */$message);


I did this last night, but it didn't work. However, it wa only until this morning that I realised I was editing the admin message_stack.php file! :|

A quick question, since I have edited a core file, will Zen Cart feature overrides for more directories/files in future releases?

Finally, the reason for removing these icons is simple. They didn't really fit in with my template, so I was going to change then. Then I just decided to get rid of them.

Thanks again for the help. :)