ultimix
colorbox.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27 
38  var $CachedMultyFS = false;
39  var $PageCSS = false;
40  var $PageJS = false;
41 
56  function __construct()
57  {
58  try
59  {
60  $this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
61  $this->PageCSS = get_package( 'page::page_css' , 'last' , __FILE__ );
62  $this->PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
63  }
64  catch( Exception $e )
65  {
66  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
67  }
68  }
69 
88  function pre_generation( $Options )
89  {
90  try
91  {
92  $PackagePath = '{http_host}/'._get_package_relative_path_ex( 'gui::colorbox' , '1.0.0' );
93  $this->PageJS->add_javascript( "$PackagePath/include/js/jquery.colorbox-min.js" );
94  $this->PageCSS->add_stylesheet( "$PackagePath/res/css/colorbox.css" );
95  }
96  catch( Exception $e )
97  {
98  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
99  }
100  }
101 
120  function view( $Options )
121  {
122  try
123  {
124  return( '' );
125  }
126  catch( Exception $e )
127  {
128  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
129  }
130  }
131 
154  function compile_colorbox( &$Settings )
155  {
156  try
157  {
158  $Code = $this->CachedMultyFS->get_template( __FILE__ , 'colorbox.tpl' );
159 
160  $Selector = $Settings->get_setting( 'selector' );
161  $Code = str_replace( '{selector}' , $Selector , $Code );
162 
163  return( $Code );
164  }
165  catch( Exception $e )
166  {
167  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
168  }
169  }
170  }
171 
172 ?>