Ticket #423: 423.diff

File 423.diff, 4.4 KB (added by mdawaffe, 5 years ago)
  • tags.php

     
    1111if ( $tag_name && $tag ) : 
    1212 
    1313        $topics = get_tagged_topics($tag->tag_id, $page); 
    14         do_action( 'bb_tag-single.php', $tag->tag_id ); 
    1514 
    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 ); 
    1716else : 
    1817 
    19         do_action( 'bb_tags.php', '' ); 
    20  
    2118        bb_load_template( 'tags.php' ); 
    2219endif; 
    2320?> 
  • profile.php

     
    2828$posts = get_recent_user_replies( $user_id ); 
    2929$threads = get_recent_user_threads( $user_id ); 
    3030 
    31 do_action( 'bb_profile.php', $user_id ); 
    32  
    33 bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads') ); 
     31bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads'), $user_id ); 
    3432?> 
  • bb-includes/template-functions.php

     
    11<?php 
    22 
    3 function bb_load_template( $file, $globals = false ) { 
     3function bb_load_template( $file, $globals = false, $action_arg = null ) { 
    44        global $bb, $bbdb, $bb_current_user, $page, $bb_cache, 
    55                $posts, $bb_post, $post_id, $topics, $topic, $topic_id, 
    66                $forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view; 
     
    1919        } 
    2020 
    2121        $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 
    2228        include($template); 
    2329} 
    2430 
  • rss.php

     
    2323        $forum_id = (int) get_path(2); 
    2424 
    2525$bb_db_override = false; 
    26 do_action( 'bb_rss.php_pre_db', '' ); 
     26do_action( 'bb_rss.php_pre_db' ); 
    2727 
    2828if ( !$bb_db_override ) : 
    2929if ( isset($topic_id) ) { 
     
    5555} 
    5656endif; 
    5757 
    58 do_action( 'bb_rss.php', '' ); 
     58do_action( 'bb_rss.php' ); 
    5959 
    6060bb_send_304( $posts[0]->post_time ); 
    6161 
  • index.php

     
    33require('./bb-load.php'); 
    44 
    55$bb_db_override = false; 
    6 do_action( 'bb_index.php_pre_db', '' ); 
     6do_action( 'bb_index.php_pre_db' ); 
    77 
    88if ( isset($_GET['new']) && '1' == $_GET['new'] ) : 
    99        $forums = false; 
     
    1313        $super_stickies = get_sticky_topics(); 
    1414endif; 
    1515 
    16 do_action( 'bb_index.php', '' ); 
    17  
    1816bb_load_template( 'front-page.php', array('bb_db_override', 'super_stickies') ); 
    1917 
    2018?> 
  • view.php

     
    2121        do_action( 'bb_custom_view', $view, $page ); 
    2222endswitch; 
    2323 
    24 do_action( 'bb_view.php', '' ); 
    25  
    2624bb_load_template( 'view.php', array('view_count', 'stickies') ); 
    2725 
    2826?> 
  • topic.php

     
    3838        post_author_cache($posts); 
    3939endif; 
    4040 
    41 do_action( 'bb_topic.php', $topic_id ); 
     41bb_load_template( 'topic.php', array('bb_db_override', 'user_tags', 'other_tags', 'list_start'), $topic_id ); 
    4242 
    43 bb_load_template( 'topic.php', array('bb_db_override', 'user_tags', 'other_tags', 'list_start') ); 
    44  
    4543?> 
  • bb-admin/admin-functions.php

     
    77} 
    88 
    99function bb_get_admin_footer() { 
    10         do_action('bb_admin-footer.php', ''); 
     10        do_action('bb_admin-footer.php'); 
    1111        include('admin-footer.php'); 
    1212} 
    1313 
  • forum.php

     
    1717        $stickies = get_sticky_topics( $forum_id, $page ); 
    1818endif; 
    1919 
    20 do_action( 'bb_forum.php', $forum_id ); 
     20bb_load_template( 'forum.php', array('bb_db_override', 'stickies'), $forum_id ); 
    2121 
    22 bb_load_template( 'forum.php', array('bb_db_override', 'stickies') ); 
    23  
    2422?>