Ticket #423: 423.diff
| File 423.diff, 4.4 KB (added by mdawaffe, 5 years ago) |
|---|
-
tags.php
11 11 if ( $tag_name && $tag ) : 12 12 13 13 $topics = get_tagged_topics($tag->tag_id, $page); 14 do_action( 'bb_tag-single.php', $tag->tag_id );15 14 16 bb_load_template( 'tag-single.php', array('tag', 'tag_name', 'topics') );15 bb_load_template( 'tag-single.php', array('tag', 'tag_name', 'topics'), $tag->tag_id ); 17 16 else : 18 17 19 do_action( 'bb_tags.php', '' );20 21 18 bb_load_template( 'tags.php' ); 22 19 endif; 23 20 ?> -
profile.php
28 28 $posts = get_recent_user_replies( $user_id ); 29 29 $threads = get_recent_user_threads( $user_id ); 30 30 31 do_action( 'bb_profile.php', $user_id ); 32 33 bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads') ); 31 bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads'), $user_id ); 34 32 ?> -
bb-includes/template-functions.php
1 1 <?php 2 2 3 function bb_load_template( $file, $globals = false ) {3 function bb_load_template( $file, $globals = false, $action_arg = null ) { 4 4 global $bb, $bbdb, $bb_current_user, $page, $bb_cache, 5 5 $posts, $bb_post, $post_id, $topics, $topic, $topic_id, 6 6 $forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view; … … 19 19 } 20 20 21 21 $template = apply_filters( 'bb_template', $template, $file ); 22 23 if ( !is_null($action_arg) ) 24 do_action( 'bb_' . $template, $action_arg ); 25 else 26 do_action( 'bb_' . $template ); 27 22 28 include($template); 23 29 } 24 30 -
rss.php
23 23 $forum_id = (int) get_path(2); 24 24 25 25 $bb_db_override = false; 26 do_action( 'bb_rss.php_pre_db' , '');26 do_action( 'bb_rss.php_pre_db' ); 27 27 28 28 if ( !$bb_db_override ) : 29 29 if ( isset($topic_id) ) { … … 55 55 } 56 56 endif; 57 57 58 do_action( 'bb_rss.php' , '');58 do_action( 'bb_rss.php' ); 59 59 60 60 bb_send_304( $posts[0]->post_time ); 61 61 -
index.php
3 3 require('./bb-load.php'); 4 4 5 5 $bb_db_override = false; 6 do_action( 'bb_index.php_pre_db' , '');6 do_action( 'bb_index.php_pre_db' ); 7 7 8 8 if ( isset($_GET['new']) && '1' == $_GET['new'] ) : 9 9 $forums = false; … … 13 13 $super_stickies = get_sticky_topics(); 14 14 endif; 15 15 16 do_action( 'bb_index.php', '' );17 18 16 bb_load_template( 'front-page.php', array('bb_db_override', 'super_stickies') ); 19 17 20 18 ?> -
view.php
21 21 do_action( 'bb_custom_view', $view, $page ); 22 22 endswitch; 23 23 24 do_action( 'bb_view.php', '' );25 26 24 bb_load_template( 'view.php', array('view_count', 'stickies') ); 27 25 28 26 ?> -
topic.php
38 38 post_author_cache($posts); 39 39 endif; 40 40 41 do_action( 'bb_topic.php', $topic_id );41 bb_load_template( 'topic.php', array('bb_db_override', 'user_tags', 'other_tags', 'list_start'), $topic_id ); 42 42 43 bb_load_template( 'topic.php', array('bb_db_override', 'user_tags', 'other_tags', 'list_start') );44 45 43 ?> -
bb-admin/admin-functions.php
7 7 } 8 8 9 9 function bb_get_admin_footer() { 10 do_action('bb_admin-footer.php' , '');10 do_action('bb_admin-footer.php'); 11 11 include('admin-footer.php'); 12 12 } 13 13 -
forum.php
17 17 $stickies = get_sticky_topics( $forum_id, $page ); 18 18 endif; 19 19 20 do_action( 'bb_forum.php', $forum_id );20 bb_load_template( 'forum.php', array('bb_db_override', 'stickies'), $forum_id ); 21 21 22 bb_load_template( 'forum.php', array('bb_db_override', 'stickies') );23 24 22 ?>