ultimix
jquery_markup.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 
54  function __construct()
55  {
56  try
57  {
58  $this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
59  }
60  catch( Exception $e )
61  {
62  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
63  }
64  }
65 
88  function compile_accordion_section( &$Settings )
89  {
90  try
91  {
92  $Code = $this->CachedMultyFS->get_template( __FILE__ , 'accordeon_section.tpl' );
93  $Code = str_replace( '{title}' , $Settings->get_setting( 'title' ) , $Code );
94 
95  return( $Code );
96  }
97  catch( Exception $e )
98  {
99  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
100  }
101  }
102 
125  function compile_tab_control( &$Settings )
126  {
127  try
128  {
129  $TabControl = $this->CachedMultyFS->get_template( __FILE__ , 'tab_control.tpl' );
130 
131  $Selector = $Settings->get_setting( 'selector' , md5( microtime( true ) ) );
132  $id = $Settings->get_setting( 'id' , $Selector );
133 
134  return( str_replace( '{id}' , $id , $TabControl ) );
135  }
136  catch( Exception $e )
137  {
138  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
139  }
140  }
141 
164  function compile_add_tab( &$Settings )
165  {
166  try
167  {
168  $Settings->get_setting( 'id' );
169  $Settings->get_setting( 'content_id' );
170 
171  $Settings->set_undefined( 'title' , 'title' );
172  $Settings->set_undefined( 'index' , -1 );
173  $Settings->set_undefined( 'closable' , 'true' );
174 
175  $Tab = $this->CachedMultyFS->get_template( __FILE__ , 'add_tab.tpl' );
176  $Data = $Settings->get_raw_settings();
177 
178  return( $Tab );
179  }
180  catch( Exception $e )
181  {
182  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
183  }
184  }
185 
208  function compile_add_iframe_tab( &$Settings )
209  {
210  try
211  {
212  $Tab = $this->CachedMultyFS->get_template( __FILE__ , 'add_iframe_tab.tpl' );
213  $Selector = $Settings->get_setting( 'selector' , '' );
214  $Tab = str_replace(
215  array( '{id}' , '{url}' , '{title}' , '{index}' , '{height}' , '{closable}' ) ,
216  array(
217  $Settings->get_setting( 'id' , $Selector ) , $Settings->get_setting( 'url' ) ,
218  $Settings->get_setting( 'title' , 'title' ) , $Settings->get_setting( 'index' , -1 ) ,
219  $Settings->get_setting( 'height' , 'auto' ) ,
220  $Settings->get_setting( 'closable' , false ) !== false ? 'true' : 'false'
221  ) , $Tab
222  );
223  return( $Tab );
224  }
225  catch( Exception $e )
226  {
227  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
228  }
229  }
230  }
231 
232 ?>