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

[eluser]victorche[/eluser]
[quote author="n0xie" date="1286285999"]For the first part of the question: it's not necessary in CodeIgniter to add the _view part when loading a view. The loader will look for the file with or without the _view part.

For the second part I think I found your bug. The validation_errors() array returns 'something' even if there are no errors yet. I updated the Message Library to skip empty messages. Thanks for the bug report![/quote]
Thanks, n0xie!
Anyway... The first part, my config looks like this:
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config['message_prefix']    = ''; // blank, as auth library already ouputs msgs with <p> tag
$config['message_suffix']    = ''; // blank, the same as the prefix
$config['message_folder']    = ''; // blank, our message_view.php is located in the main /views forder
$config['message_view']        = 'message'; // the library is making a check with .'_view', thats why i am adding only 'message' here
$config['wrapper_prefix']    = ''; // blank, we will use a view instead
$config['wrapper_suffix']    = ''; // blank, the same as prefix
I have a file message_view.php in /views folder. And the result is:
Quote:Error
File views/message.php can not be found.
If I make the change (as showed 2 posts above) it works perfectly. Do you mean that this check:
Code:
elseif (file_exists(APPPATH.'views/'.$this->message_folder.$this->message_view.'_view'.EXT))
Will pass, if the name of the file is message_view.php?
I think this way, it will look for message_view_view.php, if in the config I am using:
Code:
$config['message_view']        = 'message_view'; // the library is making a check with .'_view', so i think this will be a problem?


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