Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/02/2011 08:52:58 AM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at introducing forums directory, single forum, and single topic views. This is mostly copy/paste from groups component with some rough logic in place to display the proper screens. More to do here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-screens.php

    r4010 r4012  
    6161add_action( 'bp_screens', 'bp_forums_directory_forums_setup' );
    6262
    63 function bp_forums_screen_topics() {
     63function bp_member_forums_screen_topics() {
    6464    global $bp;
    6565
    66     do_action( 'bp_forums_screen_topics' );
     66    do_action( 'bp_member_forums_screen_topics' );
    6767
    6868    bp_core_load_template( apply_filters( 'bp_forums_screen_topics', 'members/single/home' ) );
    6969}
    7070
    71 function bp_forums_screen_replies() {
     71function bp_member_forums_screen_replies() {
     72    global $bp;
     73
     74    do_action( 'bp_member_forums_screen_replies' );
     75
     76    bp_core_load_template( apply_filters( 'bp_member_forums_screen_replies', 'members/single/home' ) );
     77}
     78
     79function bp_member_forums_screen_favorites() {
     80    global $bp;
     81
     82    do_action( 'bp_member_forums_screen_favorites' );
     83
     84    bp_core_load_template( apply_filters( 'bp_member_forums_screen_favorites', 'members/single/home' ) );
     85}
     86
     87function bp_forums_screen_single_forum() {
     88    global $bp;
     89
     90    if ( !bp_is_forums_component() || !bp_is_current_action( 'forum' ) || empty( $bp->action_variables[0] ) )
     91        return false;
     92
     93    do_action( 'bp_forums_screen_single_forum' );
     94
     95    bp_core_load_template( apply_filters( 'bp_forums_screen_single_forum', 'forums/single/forum' ) );
     96}
     97add_action( 'bp_screens', 'bp_forums_screen_single_forum' );
     98
     99function bp_forums_screen_single_topic() {
    72100    global $bp;
    73101
     
    75103        return false;
    76104
    77     do_action( 'bp_forums_screen_replies' );
     105    do_action( 'bp_forums_screen_single_topic' );
    78106
    79     bp_core_load_template( apply_filters( 'bp_forums_screen_replies', 'forums/single/topic' ) );
     107    bp_core_load_template( apply_filters( 'bp_forums_screen_single_topic', 'forums/single/topic' ) );
    80108}
    81 add_action( 'bp_screens', 'bp_forums_screen_replies' );
    82 
    83 function bp_forums_screen_favorites() {
    84     global $bp;
    85 
    86     do_action( 'bp_forums_screen_favorites' );
    87 
    88     bp_core_load_template( apply_filters( 'bp_forums_screen_favorites', 'members/single/home' ) );
    89 }
     109add_action( 'bp_screens', 'bp_forums_screen_single_topic' );
    90110
    91111?>
Note: See TracChangeset for help on using the changeset viewer.