Changeset 5 for branches/portal_by_daris/panels.php
- Timestamp:
- 02/07/09 08:33:30 (3 years ago)
- Files:
-
- 1 modified
-
branches/portal_by_daris/panels.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/portal_by_daris/panels.php
r2 r5 2 2 /*********************************************************************** 3 3 4 FluxBB extension4 PunBB extension 5 5 Portal 6 6 Daris <daris91@gmail.com> … … 25 25 ); 26 26 27 foreach ($forum_panels as $ side=> $panels)27 foreach ($forum_panels as $location => $panels) 28 28 { 29 foreach ($panels as $ panel)29 foreach ($panels as $cur_panel) 30 30 { 31 31 ob_start(); 32 32 33 $content_class = 'panel-content'; 33 // default class for content element, panels can change it 34 $cur_panel['class'] = 'panel-content'; 34 35 35 $file = FORUM_ROOT.'extensions/'.$ panel['file'];36 $file = FORUM_ROOT.'extensions/'.$cur_panel['file']; 36 37 37 38 // if panel file exists require it 38 if ($ panel['file'] != '' && file_exists($file) && is_file($file))39 if ($cur_panel['file'] != '' && file_exists($file) && is_file($file)) 39 40 require_once $file; 40 41 41 42 // else evaluate panel content 42 43 else 43 eval('?>'.$ panel['content']);44 eval('?>'.$cur_panel['content']); 44 45 45 46 46 $c ontent= ob_get_contents();47 $cur_panel['content'] = ob_get_contents(); 47 48 ob_end_clean(); 48 49 49 if ( $content == '')50 if (!$cur_panel['content']) 50 51 continue; 51 52 … … 54 55 55 56 <div class="main-head"> 56 <h2 class="hn"><span><?php echo $ panel['title'] ?></span></h2>57 <h2 class="hn"><span><?php echo $cur_panel['name'] ?></span></h2> 57 58 </div> 58 59 59 <div class="main-content <?php echo $c ontent_class?>">60 <?php echo $c ontent?>60 <div class="main-content <?php echo $cur_panel['class'] ?>"> 61 <?php echo $cur_panel['content'] ?> 61 62 62 63 </div> … … 66 67 67 68 // insert panel html to specified side 68 $panels_output[$ side][] = ob_get_contents();69 $panels_output[$location][] = ob_get_contents(); 69 70 70 71 ob_end_clean();