XPressME Integration Kit

Trac


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/xpress_render.php

    r26 r1  
    3535} 
    3636 
    37 // get sidebar rendaring  
    38 function get_sidebar_rander($name = null) 
    39 { 
    40         $templates = array(); 
    41         if ( isset($name) ) 
    42                 $templates[] = "sidebar-{$name}.php"; 
    43  
    44         $templates[] = "sidebar.php"; 
    45  
    46         $link= locate_template($templates, false); 
    47         if ('' == $link) 
    48                 $link =  get_theme_root() . '/default/sidebar.php'; 
    49  
    50         ob_start(); 
    51                 require($link); 
    52                 $sidebar = ob_get_contents(); 
    53         ob_end_clean(); 
    54         return $sidebar; 
    55 } 
    56  
    5737// < body > tag is pulled out from the header of html contents.  
    5838function get_body($contents) 
    5939{ 
    60         $xpess_config = new XPressME_Class(); 
    6140        $pattern = "<body[^>]*?>(.*)<\/body>"; 
    6241        preg_match("/".$pattern."/s",  $contents, $body_matches); 
    6342        $body = $body_matches[1]; 
    64  
    65         if (!$xpess_config->is_theme_sidebar_disp){ 
    66                 $side_panel = get_sidebar_rander(); 
    67                         $body = str_replace($side_panel,'',$body); 
    68         } 
    6943        return $body; 
    7044} 
Note: See TracChangeset for help on using the changeset viewer.