Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sb_print_filter_line ($id, $results, $filter, $display, $max_num = 7, $translate_book = FALSE) {
- global $sermon_domain, $more_applied;
- if ($id != 'book') { $translate_book = FALSE; }
- if ($translate_book) {
- $translated_books = array_combine(sb_get_default('eng_bible_books'), sb_get_default('bible_books'));
- }
- echo "<div id = \"{$id}\" class=\"filter\">\r<span class=\"filter-heading\">".ucwords($id).":</span> \r";
- $i = 1;
- $more = FALSE;
- foreach ($results as $result) {
- if ($i == $max_num) {
- echo "<span id=\"{$id}-more\">";
- $more = TRUE;
- $more_applied[] = $id;
- }
- if ($i != 1)
- echo ", \r";
- if ($translate_book) {
- echo '<a href="'.sb_build_url(array($id => $result->$filter)).'">'.$translated_books[stripslashes($result->$display)].'</a> ('.$result->count.')';
- }
- else {
- echo '<a href="'.sb_build_url(array($id => $result->$filter)).'">'.stripslashes($result->$display).'</a> ('.$result->count.')';
- }
- $i++;
- }
- echo ".";
- if ($more)
- echo "</span>\r<span id=\"{$id}-more-link\" style=\"display:none\">… (<a id=\"{$id}-toggle\" href=\"#\"><strong>".($i-$max_num).' '.__('more', $sermon_domain).'</strong></a>)</span>';
- echo '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement