| 1 |
<?php
|
| 2 |
|
| 3 |
function phptemplate_wrap_content($text) {
|
| 4 |
$text = preg_replace('!<pre>!i', '<div class="pre"><pre>', $text);
|
| 5 |
$text = preg_replace('!</pre>!i', '</pre></div>', $text);
|
| 6 |
return $text;
|
| 7 |
}
|
| 8 |
function phptemplate_wrap_links($link, $n) {
|
| 9 |
$classes = array("lw1", "lw2");
|
| 10 |
$before = $after = "";
|
| 11 |
foreach ($classes as $c) {
|
| 12 |
$before .= '<span class="'. $c .'">';
|
| 13 |
$after .= '</span>';
|
| 14 |
}
|
| 15 |
$link = preg_replace('!<a[^>]*>!i', '\0'. $before, $link);
|
| 16 |
$link = preg_replace('!</a[^>]*>!i', $after . '\0', $link);
|
| 17 |
return $link;
|
| 18 |
}
|
| 19 |
|
| 20 |
function phptemplate_links($links, $delimiter = " – ") {
|
| 21 |
return implode($delimiter, $links);
|
| 22 |
}
|
| 23 |
|
| 24 |
function phptemplate_menu_item_link($item, $link_item) {
|
| 25 |
/* Wrapper span */
|
| 26 |
return l('<span class="lw1">'. check_plain($item['title']) .'</span>', $link_item['path'], array_key_exists('description', $item) ? array('title' => $items['description']) : array(), NULL, NULL, FALSE, TRUE);
|
| 27 |
}
|
| 28 |
|
| 29 |
function phptemplate_comment_thread_collapsed($comment) {
|
| 30 |
if ($comment->depth) {
|
| 31 |
$output = '<div style="padding-left:'. ($comment->depth * 25) ."px;\">\n";
|
| 32 |
$output .= theme('comment_view', $comment, '', 0);
|
| 33 |
$output .= "</div>\n";
|
| 34 |
}
|
| 35 |
else {
|
| 36 |
$output .= theme('comment_view', $comment, '', 0);
|
| 37 |
}
|
| 38 |
return $output;
|
| 39 |
}
|
| 40 |
|
| 41 |
function phptemplate_comment_thread_expanded($comment) {
|
| 42 |
$output = '';
|
| 43 |
if ($comment->depth) {
|
| 44 |
$output .= '<div style="padding-left:'. ($comment->depth * 25) ."px;\">\n";
|
| 45 |
}
|
| 46 |
|
| 47 |
$output .= theme('comment_view', $comment, module_invoke_all('link', 'comment', $comment, 0));
|
| 48 |
|
| 49 |
if ($comment->depth) {
|
| 50 |
$output .= "</div>\n";
|
| 51 |
}
|
| 52 |
return $output;
|
| 53 |
}
|
| 54 |
|