video thumbnails are displayed as slideshow when mouse is over; video widget bugs...
[living-lab-site.git] / application / helpers / message_helper.php
1 <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
3 /**
4  * Called from a controller to show a message page.
5  * 
6  * @param type $controller controller's object; pass $this from controller
7  * @param type $type message type: 'info', 'error'
8  * @param type $msg message text
9  */
10 function show_msg_page($controller, $type, $msg)
11 {
12         $params = array(
13                 'title'=> $controller->lang->line("message_title_{$type}")
14                         .' &ndash; '
15                         . $controller->config->item('site_name'),
16                 //'metas' => array('description'=>'')
17         );
18         $controller->load->library('html_head_params', $params);
19
20         // **
21         // ** LOADING VIEWS
22         // **
23         $controller->load->view('html_begin', $controller->html_head_params);
24         $controller->load->view('header', array());
25
26         $main_params['content'] =
27                 $controller->load->view("message/{$type}_view",
28                         array('msg'=> $msg), TRUE);
29
30         $main_params['side'] = $controller->load->view('side_default', NULL, TRUE);
31         $controller->load->view('main', $main_params);
32
33         $controller->load->view('footer');
34         $controller->load->view('html_end');
35 }
36
37 /**
38  * Called from a controller to show an error message page.
39  * 
40  * @param type $controller controller's object; pass $this from controller
41  * @param type $msg message text
42  */
43 function show_error_msg_page($controller, $msg)
44 {
45         show_msg_page($controller, 'error', $msg);
46 }
47
48 /**
49  * Called from a controller to show an info message page.
50  * 
51  * @param type $controller controller's object; pass $this from controller
52  * @param type $msg message text
53  */
54 function show_info_msg_page($controller, $msg)
55 {
56         show_msg_page($controller, 'info', $msg);
57 }
58
59 /* End of file message_helper.php */
60 /* Location: ./application/helpers/message_helper.php */