Changeset 812
- Timestamp:
- 04/20/07 04:25:49 (2 years ago)
- Files:
-
- trunk/bb-includes/template-functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bb-includes/template-functions.php
r806 r812 498 498 $args['class'] .= ' ' . $bb_forums_loop->classes(); 499 499 500 return apply_filters( 'bb_forum_class',alt_class( 'forum', $args['class'] ) );500 echo apply_filters( 'bb_forum_class', get_alt_class( 'forum', $args['class'] ) ); 501 501 } 502 502 … … 1620 1620 1621 1621 function bb_get_forum_dropdown( $args = '' ) { 1622 $defaults = array( 'callback' => false, 'callback_args' => false, 'id' => 'forum_id', 'none' => false, 'selected' => false, 'tab' => 5 );1622 $defaults = array( 'callback' => false, 'callback_args' => false, 'id' => 'forum_id', 'none' => false, 'selected' => false, 'tab' => 5, 'hierarchical' => 1, 'depth' => 0, 'child_of' => 0 ); 1623 1623 if ( $args && is_string($args) && false === strpos($args, '=') ) 1624 1624 $args = array( 'callback' => $args ); … … 1628 1628 extract($args = bb_parse_args( $args, $defaults )); 1629 1629 1630 global $forum_id; 1631 if ( !$forums = get_forums( $callback, $callback_args ) ) 1632 return; 1630 if ( !$forums = bb_forums( $args ) ) 1631 return; 1632 1633 global $forum_id, $forum; 1634 $old_global = $forum; 1633 1635 1634 1636 $id = attribute_escape( $id ); … … 1639 1641 $r .= "\n<option value='0'>" . __('- None -') . "</option>\n"; 1640 1642 1641 foreach ( $forums as $forum) :1643 while ( $depth = bb_forum() ) : 1642 1644 $_selected = ( !$selected && $forum_id == $forum->forum_id || $selected == $forum->forum_id ) ? " selected='selected'" : ''; 1643 $r .= "\n<option value='$forum->forum_id'$_selected>$forum->forum_name</option>\n"; 1644 endforeach; 1645 $r .= "\n<option value='$forum->forum_id'$_selected>" . str_repeat( ' ', $depth - 1 ) . " $forum->forum_name</option>\n"; 1646 endwhile; 1647 $forum = $old_global; 1645 1648 $r .= "</select>\n"; 1646 1649 return $r;