Welcome Guest, Not a member yet? Register   Sign In
Which message library to use?
#8

[eluser]victorche[/eluser]
By the way, there is a small error, I think... After line 163:
Code:
// does a default view partial exist?
            elseif (file_exists(APPPATH.'views/'.$this->message_folder.$this->message_view.'_view'.EXT))
            {
                $output .= $this->CI->load->view($this->message_folder.$this->message_view, array('messages'=>$messages), TRUE);
            }
Should be:
Code:
// does a default view partial exist?
            elseif (file_exists(APPPATH.'views/'.$this->message_folder.$this->message_view.'_view'.EXT))
            {
                $output .= $this->CI->load->view($this->message_folder.$this->message_view.'_view', array('messages'=>$messages), TRUE);
            }
@n0xie, my last question is like this... For example, with form validation, I can have more than one error. Like:
Quote:The email field is required.
The password field is required.
In this case I have to do like:
Code:
$message[] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
As $message in this case is an array. If i don't do it, the message div is displayed correctly, but only the last error is displayed. But if I do it like an array, I get all the errors, but the message div is always displayed Sad
Maybe because ... Even an empty array makes the div visible? I think (I am a newbie in programming) there should be a check if the array is empty, or ... what?

Can you give me one last hint about this? Thanks in advance!


Messages In This Thread
Which message library to use? - by El Forum - 10-02-2010, 01:12 AM
Which message library to use? - by El Forum - 10-02-2010, 05:29 AM
Which message library to use? - by El Forum - 10-02-2010, 05:53 AM
Which message library to use? - by El Forum - 10-02-2010, 06:38 AM
Which message library to use? - by El Forum - 10-03-2010, 12:30 AM
Which message library to use? - by El Forum - 10-03-2010, 05:24 PM
Which message library to use? - by El Forum - 10-04-2010, 05:44 AM
Which message library to use? - by El Forum - 10-05-2010, 12:35 AM
Which message library to use? - by El Forum - 10-05-2010, 02:39 AM
Which message library to use? - by El Forum - 10-05-2010, 02:56 AM
Which message library to use? - by El Forum - 10-05-2010, 05:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB