| 1 |
<?php |
<?php |
| 2 |
// $Id: columns.php,v 1.15 2007/08/07 01:04:34 agentken Exp $ |
// $Id: columns.php,v 1.16 2007/08/26 19:38:51 agentken Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 6 |
* A simple two-column page layout file for MySite. Optional. |
* A simple two-column page layout file for MySite. 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_columns_layout($content) { |
function theme_mysite_columns_layout($content) { |
| 15 |
// break the array into pieces |
// break the array into pieces |
| 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 |
$output .= '<div class="mysite-sortable mysite-half-width" id="mysite-sort'. $col .'">'; |
$output .= '<div class="mysite-sortable mysite-half-width" id="mysite-sort'. $col .'">'; |
| 30 |
foreach ($set as $key => $value) { |
foreach ($set as $key => $value) { |
| 31 |
if ($value['mid'] && !$value['locked']) { |
if ($value['mid'] && !$value['locked']) { |
| 32 |
$output .= '<div class="mysite-group collapsible sortable-item" id="m'. $value['mid'] .'">'; |
$output .= '<div class="mysite-group collapsible sortable-item" id="m'. $value['mid'] .'">'; |
| 34 |
else { |
else { |
| 35 |
$output .= '<div class="mysite-group collapsible">'; |
$output .= '<div class="mysite-group collapsible">'; |
| 36 |
} |
} |
| 37 |
$output .= '<span class="mysite-header">'. $value['title'] .'</span>'; |
$output .= '<span class="mysite-header">'. $value['title'] .'</span>'; |
| 38 |
$output .= '<div class="mysite-content">'; |
$output .= '<div class="mysite-content">'; |
| 39 |
if (!empty($value['output'])) { |
if (!empty($value['output'])) { |
| 40 |
if (!empty($value['output']['image'])) { |
if (!empty($value['output']['image'])) { |
| 41 |
$output .= $value['output']['image']; |
$output .= $value['output']['image']; |
| 42 |
} |
} |
| 43 |
$output .= theme('mysite_'. $value['format'] .'_item', $value['output']['items']); |
$output .= theme('mysite_'. $value['format'] .'_item', $value['output']['items']); |
| 44 |
} |
} |
| 45 |
else { |
else { |
| 51 |
$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>'; |
| 52 |
} |
} |
| 53 |
$output .= ' <div class="mysite-footer-right">'. $value['actions'] .'</div> '; |
$output .= ' <div class="mysite-footer-right">'. $value['actions'] .'</div> '; |
| 54 |
$output .= '</div>'; |
$output .= '</div>'; |
| 55 |
$output .= '</div>'; |
$output .= '</div>'; |
| 56 |
} |
} |
| 57 |
$output .= '</div>'; |
$output .= '</div>'; |
| 58 |
} |
} |
| 59 |
print theme('page', $output, variable_get('mysite_fullscreen', 1)); |
print theme('page', $output, variable_get('mysite_fullscreen', 1)); |
| 68 |
$data['regions'] = array('0' => t('Left'), '1' => t('Right')); |
$data['regions'] = array('0' => t('Left'), '1' => t('Right')); |
| 69 |
$data['count'] = count($data['regions']); |
$data['count'] = count($data['regions']); |
| 70 |
$data['name'] = t('Two column'); |
$data['name'] = t('Two column'); |
| 71 |
$data['description'] = t('Two equal-width columns.'); |
$data['description'] = t('Two equal-width columns.'); |
| 72 |
$data['image'] = 'columns.png'; |
$data['image'] = 'columns.png'; |
| 73 |
return $data; |
return $data; |
| 74 |
} |
} |