Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2011
    Posts
    104
    Plugin Contributions
    0

    Default Remove Message Stack graphic

    I'd like to comment out the reference to the icon/graphics used in message stack warnings.

    I found where to edit the text, no problem.

    I know the folder the icons are in, can someone help me find where the code referring to the icons resides?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    20,981
    Plugin Contributions
    25

    Default Re: Remove Message Stack graphic

    What about just replacing the graphics with transparent gifs so they will not be visible?

  3. #3
    Join Date
    Jul 2011
    Posts
    104
    Plugin Contributions
    0

    Default Re: Remove Message Stack graphic

    Quote Originally Posted by gjh42 View Post
    What about just replacing the graphics with transparent gifs so they will not be visible?
    They will still take space. I'd prefer them removed. I found where they are referenced and renamed them. In firefox, the missing/renamed images have no negative effect, but in safari there is an image placeholder for the missing image and it causes an alignment issue because of the extra width of the placeholder.

  4. #4
    Join Date
    Jul 2011
    Posts
    104
    Plugin Contributions
    0

    Default Re: Remove Message Stack graphic

    Anyone know?

  5. #5
    Join Date
    Jul 2011
    Posts
    104
    Plugin Contributions
    0

    Default Re: Remove Message Stack graphic

    I want to get rid of the icons because they take too much space for my purposes. Once I get rid of them I will use an even smaller font so that the messages are smaller and less intrusive, but still, completely noticeable.

    Firefox deals well with the renamed icons:


    Internet Explorer, Opera and Safari dont...

    IE


    Opera


    Safari

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,936
    Plugin Contributions
    20

    Default Re: Remove Message Stack graphic

    The icons associated with the messages are controlled by the add function in /includes/classes/message_stack.php:
    Code:
      function add($class, $message, $type = 'error') {
        global $template, $current_page_base;
        $message = trim($message);
        $duplicate = false;
        if (strlen($message) > 0) {
          if ($type == 'error') {
            $theAlert = 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') {
            $theAlert = 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') {
            $theAlert = 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') {
            $theAlert = 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);
          } else {
            $theAlert = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => $message);
          }
    
          for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) {
            if ($theAlert['text'] == $this->messages[$i]['text'] && $theAlert['class'] == $this->messages[$i]['class']) $duplicate = true;
          }
          if (!$duplicate) $this->messages[] = $theAlert;
        }
      }
    You'll want to remove (or comment out) the stuff I've highlighted in red and note that you're making a change to a CORE file (i.e. no override possibilities exist).

  7. #7
    Join Date
    Jul 2011
    Posts
    104
    Plugin Contributions
    0

    Default Re: Remove Message Stack graphic

    Ooooh that worked!

    I made a copy of the original file, but i completely removed the code and it works well. thank you.

    Fixed IE screen:

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,936
    Plugin Contributions
    20

    Default Re: Remove Message Stack graphic

    You're very welcome, I'm happy to have helped.

 

 

Similar Threads

  1. Message stack question
    By Meshach in forum General Questions
    Replies: 0
    Last Post: 5 May 2009, 08:10 PM
  2. Message Stack
    By chris32882 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Oct 2008, 03:07 AM
  3. Message stack customization
    By stevensmedia in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Dec 2006, 09:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •