includes/output.php
changeset 867 fc4e242995d4
parent 801 eb8b23f11744
child 1038 6a04793ae13c
equal deleted inserted replaced
866:0a691138a1e5 867:fc4e242995d4
   161     echo $content;
   161     echo $content;
   162     echo $this->before_footer;
   162     echo $this->before_footer;
   163     echo $template->getFooter();
   163     echo $template->getFooter();
   164     echo $this->after_footer;
   164     echo $this->after_footer;
   165     
   165     
       
   166     global $aggressive_optimize_html;
       
   167     if ( $aggressive_optimize_html )
       
   168     {
       
   169       $content = ob_get_contents();
       
   170       ob_end_clean();
       
   171       
       
   172       ob_start();
       
   173       echo aggressive_optimize_html($content);
       
   174     }
       
   175     else
       
   176     {
       
   177       $content = ob_get_contents();
       
   178       ob_end_clean();
       
   179       
       
   180       ob_start();
       
   181       echo preg_replace('~</?enano:no-opt>~', '', $content);
       
   182     }
       
   183     
   166   }
   184   }
   167   
   185   
   168   public function set_title($title)
   186   public function set_title($title)
   169   {
   187   {
   170     global $template;
   188     global $template;
   171     $template->assign_vars(array(
   189     $template->assign_vars(array(
   172         'PAGE_NAME' => $title
   190         'PAGE_NAME' => $title
   173       ));
   191       ));
       
   192   }
       
   193 }
       
   194 
       
   195 /**
       
   196  * Same as HTML, except uses simple-header and simple-footer.
       
   197  */
       
   198 
       
   199 class Output_HTML_Simple extends Output_HTML
       
   200 {
       
   201   public function footer()
       
   202   {
       
   203     global $template;
       
   204     if ( !$this->headers_sent )
       
   205       return;
       
   206     
       
   207     $this->headers_sent = false;
       
   208     $content = ob_get_contents();
       
   209     ob_end_clean();
       
   210     
       
   211     ob_start();
       
   212     echo $this->before_header;
       
   213     echo $template->getHeader(true);
       
   214     echo $this->after_header;
       
   215     echo $content;
       
   216     echo $this->before_footer;
       
   217     echo $template->getFooter(true);
       
   218     echo $this->after_footer;
       
   219     
       
   220     global $aggressive_optimize_html;
       
   221     if ( $aggressive_optimize_html )
       
   222     {
       
   223       $content = ob_get_contents();
       
   224       ob_end_clean();
       
   225       
       
   226       ob_start();
       
   227       echo aggressive_optimize_html($content);
       
   228     }
       
   229     else
       
   230     {
       
   231       $content = ob_get_contents();
       
   232       ob_end_clean();
       
   233       
       
   234       ob_start();
       
   235       echo preg_replace('~</?enano:no-opt>~', '', $content);
       
   236     }
   174   }
   237   }
   175 }
   238 }
   176 
   239 
   177 /**
   240 /**
   178  * Outputter that bypasses $template->header() and $template->footer(), but still shows HTML added via {before,after}_{header,footer}.
   241  * Outputter that bypasses $template->header() and $template->footer(), but still shows HTML added via {before,after}_{header,footer}.