WordPress.org

Making WordPress.org

Changeset 965


Ignore:
Timestamp:
11/07/2014 01:54:49 AM (6 years ago)
Author:
netweb
Message:

WPBBP: bbPress v2.x Theme for International Support Forums

There is more to do here, this gives us a working theme to get going with now and to iterate on further as we go.

Props johnjamesjacoby, netweb. Fixes #376

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums
Files:
18 added
8 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress.php

    r443 r965  
    88get_header(); ?>
    99
    10 <?php while( have_posts() ): the_post(); ?>
     10<div id="pagebody">
     11    <div class="wrapper">
     12        <div class="content">
     13            <div id="lang-guess-wrap" style="margin-bottom: 1em;"></div>
    1114
    12     <?php the_content(); ?>
     15            <?php while ( have_posts() ) : the_post(); ?>
    1316
    14 <?php endwhile; ?>
     17                <?php the_content(); ?>
    1518
    16 <?php get_footer(); ?>
     19            <?php endwhile; ?>
     20
     21        </div>
     22
     23        <?php get_sidebar(); ?>
     24
     25    </div>
     26</div>
     27
     28<?php get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/content-archive-forum.php

    r446 r965  
    1 <?php
    2 /**
    3  * Archive Forum Content Part
    4  *
    5  * @package WPBBP
    6  */
    7 ?>
    8 <header class="masthead">
    9     <hgroup class="hentry wrap wporg-support">
    10         <h5><?php _e('We&rsquo;ve got a variety of resources to help you get the most out of WordPress. Your first stop should be our <a href="http://codex.wordpress.org">documentation</a>, where you&rsquo;ll find information on everything from installing WordPress for the first time to creating your own themes&nbsp;and&nbsp;plugins.', 'wporg'); ?></h5>
    11         <h5><?php _e('If you need help getting started with WordPress, try these articles.', 'wporg'); ?>
    12             <ul>
    13                 <li><?php _e('<a href="http://codex.wordpress.org/Forum_Welcome">Welcome to the WordPress Support Forum</a>', 'wporg'); ?></li>
    14                 <li><?php _e('<a href="http://codex.wordpress.org/New_To_WordPress_-_Where_to_Start">New to WordPress &mdash; Where to Start</a>', 'wporg'); ?></li>
    15                 <li><?php _e('<a href="http://codex.wordpress.org/FAQ_Installation">Frequently Asked Questions about Installing WordPress</a>', 'wporg'); ?></li>
    16                 <li><?php _e('<a href="http://codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>', 'wporg'); ?></li>
    17                 <li><?php _e('<a href="http://codex.wordpress.org/Writing_Posts">Writing Posts</a>', 'wporg'); ?></li>
    18             </ul>
    19         </h5>
    20     </hgroup><!-- .hentry .wrap .wporg-support -->
    21 </header><!-- .masthead -->
    22 <nav class="subhead">
    23     <div class="wrapper">
    24         <form role="search" method="get" action="<?php bbp_search_url(); ?>">
    25             <fieldset>
    26                 <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'wporg' ); ?></label>
    27                 <input type="hidden" name="action" value="bbp-search-request" />
    28                 <label for="forumsearchbox"><?php _e('Search the Support Forums', 'wporg'); ?></label>
    29                 <input type="text" class="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="forumsearchbox" />
    30                 <button type="submit" class="button button-primary"><?php esc_attr_e( 'Search', 'wporg' ); ?></button>
    31             </fieldset>
    32         </form>
    33     </div>
    34 </nav>
    35 <section id="bbpress-forums" class="wporg-support-forumlist">
    36     <div class="wrapper">
    37         <h2 class="section-title"><?php bbp_breadcrumb(); ?></h2>
     1<div id="bbpress-forums">
    382
    39         <article id="forums-id-tags" class="forums-id-tags">
    40             <h2><?php _e('Hot Topics', 'wporg'); ?></h2>
    41             <div class="tag-description">
    42                 <p><?php wp_tag_cloud( array( 'smallest' => 12, 'largest' => 16, 'number' => 16, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?></p>
    43             </div><!-- . -->
    44         </article><!-- .forums-id-tags -->
    45         <article id="forums-id-views" class="forums-id-views">
    46             <h2><?php _e('Views', 'wporg'); ?></h2>
    47             <div class="view-description">
    48                 <ul>
     3    <?php bbp_breadcrumb(); ?>
    494
    50                     <?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
     5    <?php do_action( 'bbp_template_before_forums_index' ); ?>
    516
    52                         <li>
    53                             <p><a href="<?php bbp_view_url( $view ); ?>">- <?php bbp_view_title( $view ); ?> </a></p>
    54                         </li>
     7    <?php if ( bbp_has_forums() ) : ?>
    558
    56                     <?php endforeach; ?>
     9        <?php bbp_get_template_part( 'loop',     'forums'    ); ?>
    5710
    58                 </ul>
    59             </div><!-- . -->
    60         </article><!-- .forums-id-views -->
    61         <?php do_action( 'wporg_support_before_forumlist' ); ?>
     11    <?php else : ?>
    6212
    63         <?php if ( bbp_has_forums() ) : ?>
     13        <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
    6414
    65             <?php bbp_get_template_part( 'loop',     'forums'    ); ?>
     15    <?php endif; ?>
    6616
    67         <?php endif; ?>
     17    <?php do_action( 'bbp_template_after_forums_index' ); ?>
    6818
    69         <?php do_action( 'wporg_support_after_forumlist' ); ?>
    70 
    71     </div><!-- .wrapper -->
    72 </section><!-- #bbpress-forums .wporg-support-forumlist -->
    73 
     19</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/loop-forums.php

    r446 r965  
    1 <?php
    2 /**
    3  * Loop Forums Content Part
    4  *
    5  * @package WPBBP
    6  */
    7 ?>
     1<?php do_action( 'bbp_template_before_forums_loop' ); ?>
    82
    9 <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
     3<ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
    104
    11     <article id="forums-list-<?php bbp_forum_id(); ?>" class="forums-id-<?php bbp_forum_id(); ?> bbp-forums">
     5    <li class="bbp-header">
    126
    13         <?php bbp_get_template_part( 'loop', 'single-forum' ); ?>
     7        <ul class="forum-titles">
     8            <li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>
     9            <li class="bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?></li>
     10            <li class="bbp-forum-reply-count"><?php _e( 'Posts', 'bbpress' ); ?></li>
     11        </ul>
    1412
    15     </article><!-- . -->
     13    </li><!-- .bbp-header -->
    1614
    17 <?php endwhile; ?>
     15    <li class="bbp-body">
     16
     17        <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
     18
     19            <?php bbp_get_template_part( 'loop', 'single-forum' ); ?>
     20
     21        <?php endwhile; ?>
     22
     23    </li><!-- .bbp-body -->
     24
     25    <li class="bbp-footer">
     26
     27        <div class="tr">
     28            <p class="td colspan4">&nbsp;</p>
     29        </div><!-- .tr -->
     30
     31    </li><!-- .bbp-footer -->
     32
     33</ul><!-- .forums-directory -->
     34
     35<?php do_action( 'bbp_template_after_forums_loop' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/loop-single-forum.php

    r446 r965  
    1 <?php
    2 /**
    3  * Single Forum Content Part
    4  *
    5  * @package WPBBP
    6  */
    7 ?>
    8 <h2 id="bbp-forum-<?php bbp_forum_id(); ?>"><a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></h2>
    9     <div class="count-description">
    10         <p>
    11             <span><?php _e( 'Topics: ', 'wporg' ); ?><?php bbp_forum_topic_count(); ?></span>
    12             <span><?php _e( 'Posts: ', 'wporg' ); ?><?php bbp_forum_post_count(); ?></span>
    13         </p>
    14     </div>
    15     <small>
    16         <p class="bbp-forum-content"><?php bbp_forum_content(); ?></p>
    17     </small>
     1<ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
     2    <li class="bbp-forum-info">
     3        <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><?php bbp_forum_title(); ?></a>
     4        <br><?php bbp_forum_content(); ?>
     5    </li>
     6    <li class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></li>
     7    <li class="bbp-forum-reply-count"><?php bbp_forum_post_count(); ?></li>
     8</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php

    r444 r965  
    99 * Enqueue scripts and styles.
    1010 *
    11  * @uses bbp_register_view() To register the view
     11 * Enqueue existing wordpress.org/support stylesheets
    1212 * @link http://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/style
    1313 */
    1414function wporg_support_scripts() {
    15     wp_enqueue_style( 'wporg-support', get_stylesheet_uri() );
    16     wp_enqueue_style( 'dashicons',     get_template_directory_uri() . '/css/dashicons.css' );
    17     wp_enqueue_style( 'wp4-style',     get_template_directory_uri() . '/css/wp4.css'       );
    18     wp_enqueue_style( 'open-sans', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600' );
     15//  wp_enqueue_style( 'wporg-support',       get_stylesheet_uri() );
     16//  wp_enqueue_style( 'wp4-style',           get_template_directory_uri() . '/css/wp4.css'       );
     17//  wp_enqueue_style( 'wp4-rtl-style',       get_template_directory_uri() . '/css/wp4-rtl.css'       );
     18//  wp_enqueue_style( 'iphone-style',        get_template_directory_uri() . '/css/iphone.css'        );
     19    wp_enqueue_style( 'forum-wp4-style',     get_template_directory_uri() . '/css/forum-wp4.css'     );
     20//  wp_enqueue_style( 'forum-wp4-rtl-style', get_template_directory_uri() . '/css/forum-wp4-rtl.css' );
     21//  wp_enqueue_style( 'forum-ie7-style',     get_template_directory_uri() . '/css/forum-ie7.css'     );
     22//  wp_enqueue_style( 'ie-style',            get_template_directory_uri() . '/css/ie.css'            );
     23//  wp_enqueue_style( 'bbpress-style',       get_template_directory_uri() . '/css/bbpress.css'            );
     24//  wp_enqueue_style( 'bbpress-rtl-style',   get_template_directory_uri() . '/css/bbpress-rtl.css'            );
     25//  wp_enqueue_style( 'bbpress-wpbbp-style', get_template_directory_uri() . '/css/bbpress-wpbbp.css'            );
     26//  wp_enqueue_style( 'dashicons',           get_template_directory_uri() . '/css/dashicons.css' );
     27//  wp_enqueue_style( 'open-sans',           '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600' );
    1928}
    2029add_action( 'wp_enqueue_scripts', 'wporg_support_scripts' );
     
    2231/**
    2332 * Customized breadcrumb arguments
    24  *  Root Text: WordPress Support
    25  *  Custom seperator `«` and `»`
     33 * Breadcrumb Root Text: "WordPress Support"
     34 * Custom seperator `«` and `»`
    2635 *
    2736 * @uses bbp_before_get_breadcrumb_parse_args() To parse the custom arguments
     
    8392}
    8493add_filter( 'get_body_class','wporg_support_body_class' );
     94
     95/**
     96 * The Header for our theme.
     97 *
     98 * @package WPBBP
     99 */
     100function wporg_get_global_header() {
     101    $GLOBALS['pagetitle'] = wp_title( '&laquo;', false, 'right' ) . ' ' . get_bloginfo( 'name' );
     102    require WPORGPATH . 'header.php';
     103}
     104
     105/** bb Base *******************************************************************/
     106
     107function bb_base_topic_search_form() {
     108?>
     109
     110    <form role="search" method="get" id="searchform" action="">
     111        <div>
     112            <h3><?php _e( 'Forum Search', 'bbporg'); ?></h3>
     113            <label class="screen-reader-text hidden" for="ts"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     114            <input type="text" value="<?php echo bb_base_topic_search_query(); ?>" name="ts" id="ts" />
     115            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     116        </div>
     117    </form>
     118
     119<?php
     120}
     121
     122function bb_base_reply_search_form() {
     123?>
     124
     125    <form role="search" method="get" id="searchform" action="">
     126        <div>
     127            <h3><?php _e( 'Reply Search', 'bbporg'); ?></h3>
     128            <label class="screen-reader-text hidden" for="rs"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     129            <input type="text" value="<?php echo bb_base_reply_search_query(); ?>" name="rs" id="rs" />
     130            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     131        </div>
     132    </form>
     133
     134<?php
     135}
     136
     137function bb_base_plugin_search_form() {
     138?>
     139   
     140    <form role="search" method="get" id="searchform" action="">
     141        <div>
     142            <h3><?php _e( 'Plugin Search', 'bbporg'); ?></h3>
     143            <label class="screen-reader-text hidden" for="ps"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     144            <input type="text" value="<?php echo bb_base_plugin_search_query(); ?>" name="ps" id="ts" />
     145            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     146        </div>
     147    </form>
     148
     149<?php
     150}
     151
     152function bb_base_topic_search_query( $escaped = true ) {
     153   
     154    if ( empty( $_GET['ts'] ) ) {
     155        return false;
     156    }
     157
     158    $query = apply_filters( 'bb_base_topic_search_query', $_GET['ts'] );
     159    if ( true === $escaped ) {
     160        $query = stripslashes( esc_attr( $query ) );
     161    }
     162
     163    return $query;
     164}
     165
     166function bb_base_reply_search_query( $escaped = true ) {
     167   
     168    if ( empty( $_GET['rs'] ) ) {
     169        return false;
     170    }
     171
     172    $query = apply_filters( 'bb_base_reply_search_query', $_GET['rs'] );
     173    if ( true === $escaped ) {
     174        $query = stripslashes( esc_attr( $query ) );
     175    }
     176
     177    return $query;
     178}
     179
     180function bb_base_plugin_search_query( $escaped = true ) {
     181   
     182    if ( empty( $_GET['ps'] ) ) {
     183        return false;
     184    }
     185
     186    $query = apply_filters( 'bb_base_plugin_search_query', $_GET['ps'] );
     187    if ( true === $escaped ) {
     188        $query = stripslashes( esc_attr( $query ) );
     189    }
     190
     191    return $query;
     192}
     193
     194function bb_base_single_topic_description() {
     195
     196    // Validate topic_id
     197    $topic_id = bbp_get_topic_id();
     198
     199    // Unhook the 'view all' query var adder
     200    remove_filter( 'bbp_get_topic_permalink', 'bbp_add_view_all' );
     201
     202    // Build the topic description
     203    $voice_count = bbp_get_topic_voice_count   ( $topic_id, true );
     204    $reply_count = bbp_get_topic_replies_link  ( $topic_id );
     205    $time_since  = bbp_get_topic_freshness_link( $topic_id );
     206
     207    // Singular/Plural
     208    $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, 'bbpress' ), bbp_number_format( $voice_count ) );
     209    $last_reply  = bbp_get_topic_last_active_id( $topic_id );
     210
     211    ?>
     212
     213    <li class="topic-forum">In: <a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_topic_forum_title(); ?></a></li>
     214    <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_count; ?></li><?php endif; ?>
     215    <?php if ( !empty( $voice_count ) ) : ?><li class="voice-count"><?php echo $voice_count; ?></li><?php endif; ?>
     216    <?php if ( !empty( $last_reply  ) ) : ?>
     217        <li class="topic-freshness-author"><?php printf( __( 'Last reply from: %s', 'bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) ) ); ?></li>
     218    <?php endif; ?>
     219    <?php if ( !empty( $time_since  ) ) : ?><li class="topic-freshness-time"><?php printf( __( 'Last activity: %s', 'bbporg' ), $time_since ); ?></li><?php endif; ?>
     220    <?php if ( is_user_logged_in() ) : ?>
     221        <?php $_topic_id = bbp_is_reply_edit() ? bbp_get_reply_topic_id() : $topic_id; ?>
     222        <li class="topic-subscribe"><?php bbp_topic_subscription_link( array( 'before' => '', 'topic_id' => $_topic_id ) ); ?></li>
     223        <li class="topic-favorite"><?php bbp_topic_favorite_link( array( 'topic_id' => $_topic_id ) ); ?></li>
     224    <?php endif;
     225}
     226
     227function bb_base_single_forum_description() {
     228
     229    // Validate forum_id
     230    $forum_id = bbp_get_forum_id();
     231
     232    // Unhook the 'view all' query var adder
     233    remove_filter( 'bbp_get_forum_permalink', 'bbp_add_view_all' );
     234
     235    // Get some forum data
     236    $topic_count = bbp_get_forum_topic_count( $forum_id, true, true );
     237    $reply_count = bbp_get_forum_reply_count( $forum_id, true, true );
     238    $last_active = bbp_get_forum_last_active_id( $forum_id );
     239
     240    // Has replies
     241    if ( !empty( $reply_count ) ) {
     242        $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, 'bbpress' ), bbp_number_format( $reply_count ) );
     243    }
     244
     245    // Forum has active data
     246    if ( !empty( $last_active ) ) {
     247        $topic_text      = bbp_get_forum_topics_link( $forum_id );
     248        $time_since      = bbp_get_forum_freshness_link( $forum_id );
     249
     250    // Forum has no last active data
     251    } else {
     252        $topic_text      = sprintf( _n( '%s topic', '%s topics', $topic_count, 'bbpress' ), bbp_number_format( $topic_count ) );
     253    }
     254    ?>
     255
     256    <?php if ( bbp_get_forum_parent_id() ) : ?><li class="topic-parent">In: <a href="<?php bbp_forum_permalink( bbp_get_forum_parent_id() ); ?>"><?php bbp_forum_title( bbp_get_forum_parent_id() ); ?></a></li><?php endif; ?>
     257    <?php if ( !empty( $topic_count ) ) : ?><li class="topic-count"><?php echo $topic_text; ?></li><?php endif; ?>
     258    <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_text; ?></li><?php endif; ?>
     259    <?php if ( !empty( $last_active  ) ) : ?>
     260        <li class="forum-freshness-author"><?php printf( __( 'Last post by: %s', 'bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) ) ); ?></li>
     261    <?php endif; ?>
     262    <?php if ( !empty( $time_since  ) ) : ?><li class="forum-freshness-time"><?php printf( __( 'Last activity: %s', 'bbporg' ), $time_since ); ?></li><?php endif; ?>
     263    <?php if ( is_user_logged_in() ) : ?>
     264        <li class="forum-subscribe"><?php bbp_forum_subscription_link( array( 'forum_id' => $forum_id ) ); ?></li>
     265    <?php endif;
     266}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/header.php

    r443 r965  
    1 <?php
    2 /**
    3  * The Header for our theme.
    4  *
    5  * @package WPBBP
    6  */
    7 $GLOBALS['pagetitle'] = wp_title( '&laquo;', false, 'right' ) . ' ' . get_bloginfo( 'name' );
    8 require WPORGPATH . 'header.php';
    9 ?>
     1<?php wporg_get_global_header(); ?>
     2
     3<div id="headline">
     4    <div class="wrapper">
     5        <h2><a href="<?php bbp_forums_url(); ?>">Forums</a></h2>
     6        <p class="login">
     7            <?php if ( is_user_logged_in() ) : ?>
     8                <?php echo sprintf( esc_html__( 'Howdy, %s', 'wporg' ), '<a href="' . bbp_get_user_profile_url( bbp_get_current_user_id() ) . '">' . bbp_get_current_user_name() . '</a>' ); ?>
     9
     10                <small>(
     11                <?php if ( bbp_is_user_keymaster() ) : ?>
     12                    <a href="<?php echo esc_url( admin_url() ); ?>"><?php esc_html_e( 'Admin', 'wporg' ); ?></a> |
     13                <?php endif; ?>
     14                    <a href="<?php bbp_logout_url(); ?>"><?php esc_html_e( 'Sign Out', 'wporg' ); ?></a>
     15                )</small><br>
     16            <?php else : ?>
     17               
     18            <?php endif; ?>
     19        </p>
     20    </div>
     21</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/page-front-support.php

    r446 r965  
    22
    33/**
    4  * Template Name: bbPress - Support (Index) page-front-support.php
     4 * Template Name: Fooooo
    55 *
    6  * @package WPBBP
     6 * @package bbPress
     7 * @subpackage Theme
    78 */
    89
    910get_header(); ?>
    10 <header class="masthead">
    11     <hgroup class="hentry wrap wporg-support">
    12         <h5><?php _e('We&rsquo;ve got a variety of resources to help you get the most out of WordPress. Your first stop should be our <a href="http://codex.wordpress.org">documentation</a>, where you&rsquo;ll find information on everything from installing WordPress for the first time to creating your own themes&nbsp;and&nbsp;plugins.', 'wporg'); ?></h5>
    13         <h5><?php _e('If you need help getting started with WordPress, try these articles.', 'wporg'); ?>
     11
     12<div id="pagebody">
     13    <div class="wrapper">
     14
     15        <?php do_action( 'bbp_before_main_content' ); ?>
     16
     17        <?php do_action( 'bbp_template_notices' ); ?>
     18
     19        <div class="col-6" id="forum-welcome">
     20
     21            <p class="intro"><?php _e('We&rsquo;ve got a variety of resources to help you get the most out of WordPress. Your first stop should be our <a href="http://codex.wordpress.org">documentation</a>, where you&rsquo;ll find information on everything from installing WordPress for the first time to creating your own themes&nbsp;and&nbsp;plugins.', 'wporg'); ?></p>
     22            <h3><?php _e('Getting Started Resources', 'wporg'); ?></h3>
     23            <p><?php _e('If you need help getting started with WordPress, try these articles.', 'wporg'); ?></p>
    1424            <ul>
    15                 <li><?php _e('<a href="http://codex.wordpress.org/Forum_Welcome">Welcome to the WordPress Support Forum</a>', 'wporg'); ?></li>
    16                 <li><?php _e('<a href="http://codex.wordpress.org/New_To_WordPress_-_Where_to_Start">New to WordPress &mdash; Where to Start</a>', 'wporg'); ?></li>
    17                 <li><?php _e('<a href="http://codex.wordpress.org/FAQ_Installation">Frequently Asked Questions about Installing WordPress</a>', 'wporg'); ?></li>
    18                 <li><?php _e('<a href="http://codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>', 'wporg'); ?></li>
    19                 <li><?php _e('<a href="http://codex.wordpress.org/Writing_Posts">Writing Posts</a>', 'wporg'); ?></li>
     25                <li><?php _e('<a href="//codex.wordpress.org/Forum_Welcome">Welcome to the WordPress Support Forum</a>', 'wporg'); ?></li>
     26                <li><?php _e('<a href="//codex.wordpress.org/New_To_WordPress_-_Where_to_Start">New to WordPress &mdash; Where to Start</a>', 'wporg'); ?></li>
     27                <li><?php _e('<a href="//codex.wordpress.org/FAQ_Installation">Frequently Asked Questions about Installing WordPress</a>', 'wporg'); ?></li>
     28                <li><?php _e('<a href="//codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>', 'wporg'); ?></li>
     29                <li><?php _e('<a href="//codex.wordpress.org/Writing_Posts">Writing Posts</a>', 'wporg'); ?></li>
     30                <li><?php _e('<a href="//make.wordpress.org/support/handbook/">Support Handbook</a>', 'wporg'); ?></li>
    2031            </ul>
    21         </h5>
    22     </hgroup><!-- .hentry .wrap .wporg-support -->
    23 </header><!-- .masthead -->
    24 <nav class="subhead">
    25     <div class="wrapper">
    26         <form role="search" method="get" action="<?php bbp_search_url(); ?>">
    27             <fieldset>
    28                 <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'wporg' ); ?></label>
    29                 <input type="hidden" name="action" value="bbp-search-request" />
    30                 <label for="forumsearchbox"><?php _e('Search the Support Forums', 'wporg'); ?></label>
    31                 <input type="text" class="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="forumsearchbox" />
    32                 <button type="submit" class="button button-primary"><?php esc_attr_e( 'Search', 'wporg' ); ?></button>
    33             </fieldset>
    34         </form>
    35     </div>
    36 </nav>
    37 <section id="bbpress-forums" class="wporg-support-forumlist">
    38     <div class="wrapper">
    39         <h2 class="section-title"><?php bbp_breadcrumb(); ?></h2>
     32            <h3><?php _e('Search the Support Forums', 'wporg'); ?></h3>
     33            <p><?php _e('Enter a few words that describe the problem you&rsquo;re having.', 'wporg'); ?></p>
     34            <form id="forumsearch" method="get" action="<?php bbp_search_url(); ?>">
     35                <input name="search" class="text" id="forumsearchbox" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" type="text">
     36                <input id="go" name="go" class="button" value="<?php esc_attr_e( 'Search', 'wporg' ); ?>" type="submit">
     37                <input value="1" name="forums" type="hidden">
     38            </form>
     39            <h3><?php _e('Hot Topics', 'wporg'); ?></h3>
     40            <p class="frontpageheatmap">
     41                <?php wp_tag_cloud( array( 'smallest' => 14, 'largest' => 24, 'number' => 22, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>
     42            </p>
     43        </div><!-- #forum-welcome -->
     44        <div class="col-6">
    4045
    41         <article id="forums-id-tags" class="forums-id-tags">
    42             <h2><?php _e('Hot Topics', 'wporg'); ?></h2>
    43             <div class="tag-description">
    44                 <p><?php wp_tag_cloud( array( 'smallest' => 12, 'largest' => 16, 'number' => 16, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?></p>
    45             </div><!-- . -->
    46         </article><!-- .forums-id-tags -->
    47         <article id="forums-id-views" class="forums-id-views">
    48             <h2><?php _e('Views', 'wporg'); ?></h2>
    49             <div class="view-description">
    50                 <ul>
     46            <div id="bbpress-forums">
     47                <?php bbp_get_template_part( 'loop', 'forums' ); ?>
     48            </div>
    5149
    52                     <?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
     50            <div id="viewdiv">
     51                <ul id="views">
    5352
    54                         <li>
    55                             <p><a href="<?php bbp_view_url( $view ); ?>">- <?php bbp_view_title( $view ); ?> </a></p>
    56                         </li>
     53                    <?php
    5754
    58                     <?php endforeach; ?>
     55                    $view_iterator = 0;
     56                    $topic_views   = array_keys( array_reverse( bbp_get_views() ) );
     57                    $view_count    = count( $topic_views );
     58
     59                    foreach ( $topic_views as $view ) : $view_iterator++; ?>
     60
     61                        <li class="view"><a href="<?php bbp_view_url( $view ); ?>"><?php bbp_view_title( $view ); ?></a></li>
     62
     63                        <?php if ( $view_iterator < $view_count ) : ?>|<?php endif; ?>
     64
     65                    <?php endforeach;
     66
     67                    // Unset variables
     68                    unset( $view_count, $topic_views ); ?>
    5969
    6070                </ul>
    61             </div><!-- . -->
    62         </article><!-- .forums-id-views -->
    63         <?php do_action( 'wporg_support_before_forumlist' ); ?>
     71            </div><!-- #viewdiv -->
     72        </div><!-- #col-6 -->
    6473
    65         <?php if ( bbp_has_forums() ) : ?>
     74        <?php do_action( 'bbp_after_main_content' ); ?>
    6675
    67             <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
     76    </div><!-- #wrapper -->
     77</div><!-- #pagebody -->
    6878
    69                 <article id="forums-list-<?php bbp_forum_id(); ?>" class="forums-id-<?php bbp_forum_id(); ?> bbp-forums">
    70 
    71                     <h2 id="bbp-forum-<?php bbp_forum_id(); ?>"><a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></h2>
    72 
    73                     <div class="count-description">
    74                         <p>
    75                             <span><?php _e( 'Topics: ', 'wporg' ); ?><?php bbp_forum_topic_count(); ?></span>
    76                             <span><?php _e( 'Posts: ', 'wporg' ); ?><?php bbp_forum_post_count(); ?></span>
    77                         </p>
    78                     </div>
    79                     <small>
    80                         <p class="bbp-forum-content"><?php bbp_forum_content(); ?></p>
    81                     </small>
    82 
    83                 </article><!-- . -->
    84 
    85             <?php endwhile; ?>
    86 
    87         <?php endif; ?>
    88 
    89         <?php do_action( 'wporg_support_after_forumlist' ); ?>
    90 
    91     </div><!-- .wrapper -->
    92 </section><!-- #bbpress-forums .wporg-support-forumlist -->
    93 
    94 <?php get_footer(); ?>
     79<?php get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/style.css

    r445 r965  
    1 /*
    2 Theme Name: WPBBP
    3 Theme URI: http://wordpress.org/
    4 Author: The WordPress & bbPress teams
    5 Author URI: http://wordpress.org/
    6 Description: A theme for bbPress v2.x Support Forums on wordpress.org sites
    7 Version: 1.0
    8 License: GNU General Public License v2 or later
    9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
    10 Tags: WordPress, bbPress, Support, Forums
    11 Text Domain: wpbbp
    12 Domain Path: /languages/
     1/**
     2 * Theme Name: WPBBP
     3 * Theme URI: http://wordpress.org/
     4 * Author: The WordPress & bbPress teams
     5 * Author URI: http://wordpress.org/
     6 * Description: A theme for bbPress v2.x Support Forums on wordpress.org sites
     7 * Version: 1.0
     8 * License: GNU General Public License v2 or later
     9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     10 * Tags: WordPress, bbPress, Support, Forums
     11 * Text Domain: wpbbp
     12 * Domain Path: /languages/
     13 */
    1314
    14 This theme, like WordPress, is licensed under the GPL.
    15 Use it to make something cool, have fun, and share what you've learned with others.
    16 */
     15/**
     16 * This theme, like WordPress, is licensed under the GPL.
     17 * Use it to make something cool, have fun, and share what you've learned with others.
     18 */
    1719
    1820html,
    1921body {
    20     background: #efefef;
     22    background: #fff;
     23}
     24
     25#headline {
     26    background: #f7f7f7;
     27    border-bottom: 1px solid #dfdfdf;   
    2128}
    2229
     
    2431* 1.0 Dashicons
    2532*/
    26 
    2733body #headline h2 a:before {
    2834    -webkit-font-smoothing: antialiased;
     
    3339}
    3440body #headline h2 a:before { content: '\f110'; }
    35 
    36 section.wporg-support-forumlist article h2:before {
    37     font-family: 'dashicons';
    38     content: '\f110';
    39     margin-right: 0.4em;
    40     vertical-align: -3px;
    41     font-weight:normal;
    42 }
    43 
    44 section.wporg-support-forumlist article.forums-id-tags  h2:before { content: '\f323'; }
    45 section.wporg-support-forumlist article.forums-id-views h2:before { content: '\f177'; }
    46 section.wporg-support-forumlist article.forums-id-7     h2:before { content: '\f107'; }
    47 section.wporg-support-forumlist article.forums-id-17    h2:before { content: '\f339'; }
    48 section.wporg-support-forumlist article.forums-id-19    h2:before { content: '\f100'; }
    49 section.wporg-support-forumlist article.forums-id-21    h2:before { content: '\f106'; }
    50 section.wporg-support-forumlist article.forums-id-23    h2:before { content: '\f308'; }
    51 section.wporg-support-forumlist article.forums-id-25    h2:before { content: '\f118'; }
    52 section.wporg-support-forumlist article.forums-id-27    h2:before { content: '\f112'; }
    53 section.wporg-support-forumlist article.forums-id-29    h2:before { content: '\f102'; }
    54 section.wporg-support-forumlist article.forums-id-31    h2:before { content: '\f120'; }
    55 section.wporg-support-forumlist article.forums-id-33    h2:before { content: '\f223'; }
    56 section.wporg-support-forumlist article.forums-id-35    h2:before { content: '\f175'; }
    57 section.wporg-support-forumlist article.forums-id-37    h2:before { content: '\f220'; }
    58 section.wporg-support-forumlist article.forums-id-39    h2:before { content: '\f307'; }
    59 section.wporg-support-forumlist article.forums-id-41    h2:before { content: '\f473'; }
    6041
    6142/**
     
    8566    height: 0;
    8667}
    87 .wrapper {
    88     display: inline-block;
    89 }
    90 /* start commented backslash hack \*/
    91 * html .wrapper { height: 1%; }
    92 .wrapper { display: block; }
    93 /* close commented backslash hack */
    9468
    9569/**
    96 * 4.0 header.masthead
    97 */
    98 header.masthead {
    99     clear: both;
    100     background: rgb(1, 116, 162);
    101     border: 1px solid rgb(6, 122, 166);
    102     border-width: 1px 0;
    103     position: relative;
    104     overflow: hidden;
    105 }
     70 * 4.0 Overrides
     71 */
     72@media only screen and (min-width: 960px) {
     73    #bbpress-forums {
     74        margin-left: 20px;
     75    }
    10676
    107 header.masthead > .wrap {
    108     max-width: 950px;
    109     padding: 20px 10px;
    110     margin: 0 auto;
    111     overflow: hidden;
    112     position: relative;
    113     z-index: 1;
    114 }
    115 
    116 header.masthead img {
    117     float: right;
    118     display: block;
    119     border: 3px solid #fff;
    120     box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    121     margin-left: 40px;
    122     max-width: 98%;
    123     max-width: calc( 100% - 6px );
    124     height: auto;
    125 }
    126 
    127 header.masthead h1 {
    128     float: left;
    129     font-size: 24px;
    130     line-height: 1.5;
    131     color: #fff;
    132     font-family: 'Open Sans', sans-serif;
    133     font-weight: 100;
    134     max-width: 48%;
    135     margin: 0;
    136 }
    137 
    138 header.masthead h5 {
    139     float: left;
    140     margin: 0 5px 10px;
    141     font-family: 'Open Sans', sans-serif;
    142     font-weight: 300;
    143     color: #fff;
    144     font-size: 16px;
    145     line-height: 1.5;
    146     width: 450px;
    147     width: calc( 100% / 2 - 10px );
    148 }
    149 
    150 header.masthead ul {
    151     font-size: 14px;
    152     line-height: 1.5;
    153     font-family: 'Open Sans', sans-serif;
    154     font-weight: 100;
    155     padding: 0px 20px;
    156 }
    157 
    158 header.masthead ul li {
    159     margin-right: 10px;
    160 }
    161 
    162 header.masthead ul li a {
    163     color: #fff;
    164     font-weight: 100;
    165 }
    166 
    167 header.masthead ul li a:hover {
    168     opacity: 0.8;
    169 }
    170 
    171 header.masthead ul ul {
    172     display: none;
    173 }
    174 
    175 /**
    176 * 5.0 nav.subhead ===
    177 */
    178 
    179 nav.subhead {
    180     background: rgb(51, 51, 51);
    181     border-top: 1px solid #0a4c6b;
    182     border-bottom: 1px solid #003245;
    183     position: relative;
    184 }
    185 
    186 nav.subhead .nav-menu ul {
    187     float: left;
    188     padding: 5px 0;
    189     margin: 0 auto;
    190     font-family: 'Open Sans', sans-serif;
    191     font-weight: 300;
    192     font-size: 16px;
    193 }
    194 
    195 nav.subhead .nav-menu ul li {
    196     display: inline-block;
    197     margin-right: 10px;
    198 }
    199 
    200 nav.subhead .nav-menu ul li a {
    201     color: #fff;
    202     text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.4);
    203     text-decoration: none;
    204     display: inline-block;
    205     padding: 5px 10px;
    206 }
    207 
    208 nav.subhead .nav-menu ul li a:hover {
    209     opacity: 0.8;
    210 }
    211 
    212 nav.subhead .nav-menu ul ul {
    213     display: none;
    214 }
    215 
    216 nav.subhead form {
    217     float: right;
    218     display: block;
    219     padding: 2px 10px 8px;
    220 }
    221 
    222 nav.subhead form fieldset {
    223     display: block;
    224     height: 23px;
    225     padding-bottom: 9px;
    226 }
    227 
    228 nav.subhead form label {
    229     color: #fff;
    230     display: inline-block;
    231     font-size: 14px;
    232     padding: 9px 5px 0;
    233 }
    234 
    235 nav.subhead input[type=text] {
    236     display: inline-block;
    237     background: rgb(18, 18, 18);
    238     border: 0;
    239     border-bottom: 1px solid rgb(78, 78, 78);
    240     color: #aaa;
    241     padding: 5px;
    242     font-size: 12px;
    243     vertical-align: baseline;
    244 }
    245 
    246 nav.subhead button {
    247     display: inline-block;
    248 }
    249 
    250 /**
    251 * 6.0 section.wporg-support-forumlist
    252 */
    253 
    254 section.wporg-support-forumlist {
    255     padding: 20px 0 60px;
    256 }
    257 
    258 section.wporg-support-forumlist h2 {
    259     font-family: "Open Sans", sans-serif;
    260     font-weight: 600;
    261     padding-bottom: 0.5em;
    262 }
    263 
    264 section.wporg-support-forumlist h2.section-title {
    265     padding: 20px 10px;
    266 }
    267 
    268 section.wporg-support-forumlist article {
    269     margin: 10px;
    270     padding: 20px;
    271     width: 420px;
    272     width: calc( 100% / 2 - 60px );
    273     font-size: 1.5em;
    274     background: #fff;
    275     float: left;
    276     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    277     -webkit-transition: none 0.4s ease;
    278     -moz-transition: none 0.4s ease;
    279     -ms-transition: none 0.4s ease;
    280     -o-transition: none 0.4s ease;
    281     transition: none 0.4s ease;
    282     -webkit-transition-property: background, box-shadow;
    283     -moz-transition-property: background, box-shadow;
    284     -ms-transition-property: background, box-shadow;
    285     -o-transition-property: background, box-shadow;
    286     transition-property: background, box-shadow;
    287 }
    288 
    289 section.wporg-support-forumlist article:hover {
    290     background: #fcfcfc;
    291     box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
    292 }
    293 
    294 section.wporg-support-forumlist article:nth-of-type(odd) {
    295     clear: left;
    296 }
    297 
    298 section.wporg-support-forumlist article h2 a {
    299     font-weight: 600;
    300     color: #444444;
    301 }
    302 
    303 section.wporg-support-forumlist article div.tag-description p,
    304 section.wporg-support-forumlist article div.view-description p {
    305     display: inline;
    306     font-size: 1em;
    307     line-height: 1.5;
    308 }
    309 
    310 section.wporg-support-forumlist article div.count-description p {
    311     display: inline;
    312     font-size: 1em;
    313     line-height: 1.5;
    314 }
    315 
    316 section.wporg-support-forumlist article small {
    317     display: block;
    318     font-size: 0.8em;
    319     font-style: italic;
    320     opacity: 0.5;
    321     padding-top: 0.5em;
    322 }
    323 
    324 section.wporg-support-forumlist article small p {
    325     line-height: 1.5;
    326 }
    327 
    328 @media ( max-width: 960px ) {
    329     section.wporg-support-forumlist article {
    330         width: 43%;
    331         width: calc( 100% / 2 - 60px );
     77    .col-6 #bbpress-forums {
     78        margin-left: 0;
    33279    }
    33380}
    33481
    335 @media ( max-width: 600px ) {
     82#bbpress-forums li.bbp-forum-info {
     83    width: 60%;
     84}
    33685
    337     header.masthead img {
    338         float: none;
    339         margin: 0 auto 10px;
    340     }
     86#bbpress-forums li.bbp-forum-topic-count,
     87#bbpress-forums li.bbp-forum-reply-count {
     88    width: 20%;
     89}
    34190
    342     header.masthead h5 {
    343         width: 90%;
    344         width: calc( 100% - 60px );
    345         float: none;
    346     }
     91#pagebody ul.forum-info,
     92#pagebody ul.forum-feeds,
     93#pagebody ul.topic-info,
     94#pagebody ul.topic-tags,
     95#pagebody ul.topic-views,
     96#pagebody ul.topic-admin-links {
     97    margin-left: 0;
     98}
    34799
    348     nav.subhead ul,
    349     nav.subhead form {
    350         float: none;
    351         text-align: center;
    352     }
    353 
    354     nav.subhead form fieldset {
    355         height: auto;
    356     }
    357 
    358     nav.subhead form label {
    359         display: block;
    360     }
    361 
    362     section.wporg-support-forumlist article {
    363         width: 90%;
    364         width: calc( 100% - 60px );
    365         float: none;
    366     }
     100#pagebody ul a.feed {
     101    background: none;
     102    padding-left: 0;
    367103}
Note: See TracChangeset for help on using the changeset viewer.