Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Add span class to the message stack text

    I want to add a span class to the text in the message stack...but don't know how to do it lol

    http://www.amomentinscrap.com/shop/c...chology-collab

    You can see a message stack thingy there in the middle and I want to get the text to align in the middle with the image rather than 'floating' at the bottom but everything I apply to the stylesheet for the div applies to the image as well....how can I get a class to just the text?

    The only place I can find where to add it is in includes/classes/message_stack.php where it appears to construct the stack

    PHP Code:
      // class methods
      
    function _add($class$message$type 'error') {
        global 
    $template$current_page_base;

        
    $message trim($message);
        if (
    strlen($message) > 0) {
          if (
    $type == 'error') {
            
    $this->messages[] = array('params' => 'class="messageStackError larger"''class' => $class'text' => zen_image($template->get_template_dir(ICON_IMAGE_ERRORDIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' ICON_IMAGE_ERRORICON_ERROR_ALT) . '  ' $message);
          } elseif (
    $type == 'warning') {
            
    $this->messages[] = array('params' => 'class="messageStackWarning larger"''class' => $class'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNINGDIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' ICON_IMAGE_WARNINGICON_WARNING_ALT) . '  ' $message);
          } elseif (
    $type == 'success') {
            
    $this->messages[] = array('params' => 'class="messageStackSuccess larger"''class' => $class'text' => zen_image($template->get_template_dir(ICON_IMAGE_SUCCESSDIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' ICON_IMAGE_SUCCESSICON_SUCCESS_ALT) . '  ' $message);
          } elseif (
    $type == 'caution') {
            
    $this->messages[] = array('params' => 'class="messageStackCaution larger"''class' => $class'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNINGDIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' ICON_IMAGE_WARNINGICON_WARNING_ALT) . '  ' $message);
          } else {
            
    $this->messages[] = array('params' => 'class="messageStackError larger"''class' => $class'text' => $message);
          }
        }
      } 
    And I don't know how to get a span there without buggering it up lol
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Add span class to the message stack text

    You could move the image instead, I guess:

    .messageStackSuccess img{vertical-align:middle;}

  3. #3
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: Add span class to the message stack text

    Thank you! I didn't even think of that LOL and it worked like a charm...much better than mucking with the code lol
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

 

 

Similar Threads

  1. v153 Adding a message into the message stack
    By delia in forum General Questions
    Replies: 9
    Last Post: 22 Oct 2014, 05:29 PM
  2. v151 Add an error to the message stack for checkout shipping?
    By delia in forum General Questions
    Replies: 7
    Last Post: 10 Dec 2012, 02:55 PM
  3. message stack - when to use add and add_session?
    By kamion in forum General Questions
    Replies: 2
    Last Post: 16 Jan 2012, 04:30 AM
  4. <span class="OurPrice">Our Price</span>
    By Soniccc in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Mar 2011, 10:41 AM
  5. Message Stack Error - Changing the text
    By rkmoore11 in forum General Questions
    Replies: 2
    Last Post: 16 Sep 2007, 02:09 AM

Posting Permissions

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