Show
Ignore:
Timestamp:
02/10/09 09:23:02 (3 years ago)
Author:
daris
Message:

portal: rewrited install file and some other small changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/portal_by_daris/panels.php

    r16 r18  
    2929                foreach ($panels as $cur_panel) 
    3030                { 
    31                         if (FORUM_PAGE == 'pages' && $location == 3) 
     31                        if ($left_width == 0 && $location == 0 || $right_width == 0 && $location == 3 || FORUM_PAGE == 'pages' && $location == 3) 
    3232                                continue; 
    3333                         
     
    4242                        if ($cur_panel['file'] != '' && file_exists($file) && is_file($file)) 
    4343                                require_once $file; 
     44 
     45                        // if panel doesn't contain php code just echo it 
     46                        else if (strpos($cur_panel['content'], '<?') === false) 
     47                                echo $cur_panel['content']; 
    4448         
    4549                        // else evaluate panel content 
     
    4751                                eval('?>'.$cur_panel['content']); 
    4852         
    49          
    5053                        $cur_panel['content'] = ob_get_contents(); 
    5154                        ob_end_clean(); 
    52                          
    53                         if (!$cur_panel['content']) 
     55 
     56                        if (!trim($cur_panel['content'])) 
    5457                                continue; 
    5558                 
     
    111114        { 
    112115                $center_width -= 2; 
    113                 #$style_center .= 'margin-left: 1%;'; 
    114                 $left_width .= '%; margin-right: 1'; 
    115         //      $right_width .= '%; margin-left: 1'; 
     116                $left_width .= '%; margin-right: 1'; // 1% 
    116117        } 
    117118        elseif (!count($panels_output[0]) && !count($panels_output[3])) { /* do nothing */ }