/[drupal]/contributions/modules/mysite/plugins/layouts/left.php
ViewVC logotype

Diff of /contributions/modules/mysite/plugins/layouts/left.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Wed Oct 24 01:39:39 2007 UTC revision 1.6, Sun Apr 6 23:08:27 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: left.php,v 1.4 2007/08/26 19:38:51 agentken Exp $  // $Id: left.php,v 1.5 2007/10/24 01:39:39 agentken Exp $
3    
4  /**  /**
5   * @file   * @file
6   * A two-column page layout file for MySite with one narrow rail.  Optional.   * A two-column page layout file for MySite with one narrow rail.  Optional.
7     *
8     * @ingroup mysite_plugins
9   */   */
10    
11  /**  /**
12   * Implements theme_mysite_hook_layout()   * Implements theme_mysite_hook_layout()
  *  
  * @ingroup themes  
13   */   */
14  function theme_mysite_left_layout($content) {  function theme_mysite_left_layout($content) {
15    // break the array into pieces    // break the array into pieces
# Line 23  function theme_mysite_left_layout($conte Line 23  function theme_mysite_left_layout($conte
23      $output = '<div class="messages">'.  $header .'</div>';      $output = '<div class="messages">'.  $header .'</div>';
24    }    }
25    // ajax-generated message class    // ajax-generated message class
26    $output .= '<div class="mysite-ajax"></div>';    $output .= '<div class="mysite-ajax"></div>';
27    // cycle through the data sets and make columns    // cycle through the data sets and make columns
28    foreach ($data as $col => $set) {    foreach ($data as $col => $set) {
29      if ($col == 0) {      if ($col == 0) {
30        $output .= '<div class="mysite-sortable mysite-single-width" id="mysite-sort'. $col .'">';        $output .= '<div class="mysite-sortable mysite-single-width" id="mysite-sort'. $col .'">';
31      }      }
32      else {      else {
33        $output .= '<div class="mysite-sortable mysite-quadruple-width" id="mysite-sort'. $col .'">';        $output .= '<div class="mysite-sortable mysite-quadruple-width" id="mysite-sort'. $col .'">';
34      }      }
35      foreach ($set as $key => $value) {      foreach ($set as $key => $value) {
36      if ($value['mid'] && !$value['locked']) {      if ($value['mid'] && !$value['locked']) {
# Line 39  function theme_mysite_left_layout($conte Line 39  function theme_mysite_left_layout($conte
39        else {        else {
40          $output .= '<div class="mysite-group collapsible">';          $output .= '<div class="mysite-group collapsible">';
41        }        }
42         $output .= '<span class="mysite-header">'. $value['title'] .'</span>';        $output .= '<span class="mysite-header">'. $value['title'] .'</span>';
43         $output .= '<div class="mysite-content">';        $output .= '<div class="mysite-content">';
44        if (!empty($value['output'])) {        if (!empty($value['output'])) {
45          if (!empty($value['output']['image'])) {          if (!empty($value['output']['image'])) {
46            $output .= $value['output']['image'];            $output .= $value['output']['image'];
47          }          }
48          $output .= theme('mysite_'. $value['format'] .'_item', $value['output']['items']);          $output .= theme('mysite_'. $value['format'] .'_item', $value['output']['items']);
49        }        }
50        else {        else {
# Line 56  function theme_mysite_left_layout($conte Line 56  function theme_mysite_left_layout($conte
56          $output .= '<div class="mysite-footer-left">'. l(t('Read more'), $value['output']['base']) .'</div>';          $output .= '<div class="mysite-footer-left">'. l(t('Read more'), $value['output']['base']) .'</div>';
57        }        }
58        $output .= ' <div class="mysite-footer-right">'. $value['actions'] .'</div> ';        $output .= ' <div class="mysite-footer-right">'. $value['actions'] .'</div> ';
59        $output .= '</div>';        $output .= '</div>';
60        $output .= '</div>';        $output .= '</div>';
61      }      }
62      $output .= '</div>';      $output .= '</div>';
63    }    }
64    print theme('page', $output, variable_get('mysite_fullscreen', 1));    print theme('page', $output, variable_get('mysite_fullscreen', 1));
# Line 73  function mysite_layout_left() { Line 73  function mysite_layout_left() {
73    $data['regions'] = array('0' => t('Sidebar'), '1' => t('Main'));    $data['regions'] = array('0' => t('Sidebar'), '1' => t('Main'));
74    $data['count'] = count($data['regions']);    $data['count'] = count($data['regions']);
75    $data['name'] = t('Left sidebar');    $data['name'] = t('Left sidebar');
76    $data['description'] = t('A large main area with left sidebar.');    $data['description'] = t('A large main area with left sidebar.');
77    $data['image'] = 'left.png';    $data['image'] = 'left.png';
78    return $data;    return $data;
79  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2