| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
| 4 |
* Return a themed breadcrumb trail.
|
| 5 |
*
|
| 6 |
* @param $breadcrumb
|
| 7 |
* An array containing the breadcrumb links.
|
| 8 |
* @return a string containing the breadcrumb output.
|
| 9 |
*/
|
| 10 |
function phptemplate_breadcrumb($breadcrumb) {
|
| 11 |
if (!empty($breadcrumb)) {
|
| 12 |
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
|
| 13 |
}
|
| 14 |
}
|
| 15 |
|
| 16 |
/**
|
| 17 |
* Allow themable wrapping of all comments.
|
| 18 |
*/
|
| 19 |
function phptemplate_comment_wrapper($content, $node) {
|
| 20 |
if (!$content || $node->type == 'forum') {
|
| 21 |
return '<div id="comments">'. $content .'</div>';
|
| 22 |
}
|
| 23 |
else {
|
| 24 |
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
|
| 25 |
}
|
| 26 |
}
|
| 27 |
|
| 28 |
/**
|
| 29 |
* Override or insert PHPTemplate variables into the templates.
|
| 30 |
*/
|
| 31 |
function phptemplate_preprocess_page(&$vars) {
|
| 32 |
$vars['tabs2'] = menu_secondary_local_tasks();
|
| 33 |
}
|
| 34 |
|
| 35 |
/**
|
| 36 |
* Returns the rendered local tasks. The default implementation renders
|
| 37 |
* them as tabs. Overridden to split the secondary tasks.
|
| 38 |
*
|
| 39 |
* @ingroup themeable
|
| 40 |
*/
|
| 41 |
function phptemplate_menu_local_tasks() {
|
| 42 |
return menu_primary_local_tasks();
|
| 43 |
}
|
| 44 |
|
| 45 |
/**
|
| 46 |
* Quick fix for the XHTML validation error: 'ID "edit-submit" already defined'.
|
| 47 |
*
|
| 48 |
*/
|
| 49 |
$elementCountForHack = 0;
|
| 50 |
function phptemplate_submit($element) {
|
| 51 |
global $elementCountForHack;
|
| 52 |
return str_replace('edit-submit', 'edit-submit-' . ++$elementCountForHack, theme('button', $element));
|
| 53 |
}
|