Skip to:
Content

bbPress.org

Ticket #1705: 1705.diff

File 1705.diff, 28.8 KB (added by johnjamesjacoby, 10 years ago)
  • bb-templates/kakumei/404.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Page not found!'); ?></div>
  • bb-templates/kakumei/edit-form.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<?php if ( !bb_get_user( get_post_author_id() ) ) : ?>
    24
    35        <?php bb_load_template( 'post-form-anonymous.php' ); ?>
    46
    57<?php endif; ?>
    68
    7 <?php if ( $topic_title ) : ?>
     9<?php if ( !empty( $topic_title ) ) : ?>
    810<p role="main">
    911        <label for="topic"><?php _e( 'Topic:' ); ?><br />
    1012                <input name="topic" type="text" id="topic" size="50" maxlength="80" tabindex="31" value="<?php echo esc_attr( get_topic_title() ); ?>" />
  • bb-templates/kakumei/edit-post.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Post'); ?></div>
    34
  • bb-templates/kakumei/favorites.php

     
     1<?php if ( !defined( 'BB_PATH' ) || empty( $user_id ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php user_profile_link( $user_id ); ?>"><?php echo get_user_display_name( $user_id ); ?></a> &raquo; <?php _e('Favorites'); ?></div>
    45
    5 <h2 id="userlogin" role="main"><?php echo get_user_display_name( $user->ID ); ?> <small>(<?php echo get_user_name( $user->ID ); ?>)</small> <?php _e( 'favorites' ); ?><?php if ( $topics ) printf( __( ' - %d' ), $favorites_total ); ?></h2>
     6<h2 id="userlogin" role="main"><?php echo get_user_display_name( $user->ID ); ?> <small>(<?php echo get_user_name( $user->ID ); ?>)</small> <?php _e( 'favorites' ); ?><?php if ( !empty( $topics ) ) printf( __( ' - %d' ), $favorites_total ); ?></h2>
    67
    78<p><?php _e( 'Favorites allow members to create a custom <abbr title="Really Simple Syndication">RSS</abbr> feed which pulls recent replies to the topics they specify.' ); ?></p>
    89<?php if ( bb_current_user_can( 'edit_favorites_of', $user_id ) ) : ?>
    910<p><?php _e( 'To add topics to your list of favorites, just click the "Add to Favorites" link found on that topic&#8217;s page.' ); ?></p>
    1011<?php endif; ?>
    1112
    12 <?php if ( $topics ) : ?>
     13<?php if ( !empty( $topics ) ) : ?>
    1314
    1415<table id="favorites">
    1516<tr>
  • bb-templates/kakumei/footer.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13                </div>
    24        </div>
    35        <div id="footer" role="contentinfo">
     
    57
    68                <!-- If you like showing off the fact that your server rocks -->
    79                <!-- <p class="showoff">
    8 <?php
    9 global $bbdb;
    10 printf(
    11 __( 'This page generated in %s seconds, using %d queries.' ),
    12 bb_number_format_i18n( bb_timer_stop(), 2 ),
    13 bb_number_format_i18n( $bbdb->num_queries )
    14 );
    15 ?>
     10                        <?php
     11                        global $bbdb;
     12                        if ( !empty( $bbdb->num_queries ) ) :
     13                                printf(
     14                                        __( 'This page generated in %s seconds, using %d queries.' ),
     15                                        bb_number_format_i18n( bb_timer_stop(), 2 ),
     16                                        bb_number_format_i18n( $bbdb->num_queries )
     17                                );
     18                        endif;
     19                        ?>
    1620                </p> -->
    1721        </div>
    1822
  • bb-templates/kakumei/forum.php

     
     1<?php if ( !defined( 'BB_PATH' ) ||empty( $forum_id ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a><?php bb_forum_bread_crumb(); ?></div>
    45
    5 <?php if ( $topics || $stickies ) : ?>
     6<?php if ( !empty( $topics ) || !empty( $stickies ) ) : ?>
    67
    78<table id="latest" role="main">
    89<tr>
     
    1314        <th><?php _e('Freshness'); ?></th>
    1415</tr>
    1516
    16 <?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
     17<?php if ( !empty( $stickies ) ) : foreach ( $stickies as $topic ) : ?>
    1718<tr<?php topic_class(); ?>>
    1819        <td><?php bb_topic_labels(); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big><?php topic_page_links(); ?></td>
    1920        <td class="num"><?php topic_posts(); ?></td>
     
    2324</tr>
    2425<?php endforeach; endif; ?>
    2526
    26 <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
     27<?php if ( !empty( $topics ) ) : foreach ( $topics as $topic ) : ?>
    2728<tr<?php topic_class(); ?>>
    2829        <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?></td>
    2930        <td class="num"><?php topic_posts(); ?></td>
  • bb-templates/kakumei/front-page.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    3 <?php if ( $forums ) : ?>
     4<?php if ( !empty( $forums ) ) : ?>
    45
    56<div id="hottags" role="main">
    67<h2><?php _e('Hot Tags'); ?></h2>
     
    89</div>
    910
    1011<div id="discussions">
    11 <?php if ( $topics || $super_stickies ) : ?>
     12<?php if ( !empty( $topics ) || !empty( $super_stickies ) ) : ?>
    1213
    1314<h2><?php _e('Latest Discussions'); ?></h2>
    1415
     
    2122        <th><?php _e('Freshness'); ?></th>
    2223</tr>
    2324
    24 <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
     25<?php if ( !empty( $super_stickies ) ) : foreach ( $super_stickies as $topic ) : ?>
    2526<tr<?php topic_class(); ?>>
    2627        <td><?php bb_topic_labels(); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big><?php topic_page_links(); ?></td>
    2728        <td class="num"><?php topic_posts(); ?></td>
     
    3132</tr>
    3233<?php endforeach; endif; // $super_stickies ?>
    3334
    34 <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
     35<?php if ( !empty( $topics ) ) : foreach ( $topics as $topic ) : ?>
    3536<tr<?php topic_class(); ?>>
    3637        <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?></td>
    3738        <td class="num"><?php topic_posts(); ?></td>
  • bb-templates/kakumei/functions.php

     
    11<?php
     2
     3if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' );
     4
    25/* Functions for Kakumei Theme */
    36
    47/* The below actions are removed because we add our own checkbox (check post-form.php and edit-form.php) */
  • bb-templates/kakumei/header.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<?php
    24$_head_profile_attr = '';
    35if ( bb_is_profile() ) {
  • bb-templates/kakumei/logged-in.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<p class="login">
    24        <?php printf(__('Welcome, %1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
    35        <?php bb_admin_link( 'before= | ' );?>
  • bb-templates/kakumei/login-form.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<form class="login" method="post" action="<?php bb_uri( 'bb-login.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_USER_FORMS ); ?>">
    24        <p>
    35                <?php
     
    1820                        <?php _e( 'Password' ); ?><br />
    1921                        <input name="pwd" type="password" id="quick_password" size="13" maxlength="40" tabindex="11" />
    2022                </label>
    21                 <input name="redirect_to" type="hidden" value="<?php echo $re; ?>" />
     23                <input name="redirect_to" type="hidden" value="<?php if ( !empty( $re ) ) echo $re; ?>" />
    2224                <?php wp_referer_field(); ?>
    2325
    2426                <input type="submit" name="Submit" class="submit" value="<?php echo esc_attr__( 'Log in &raquo;' ); ?>" tabindex="13" />
    2527        </div>
    2628        <div class="remember">
    2729                <label>
    28                         <input name="rememberme" type="checkbox" id="quick_remember" value="1" tabindex="12"<?php echo $remember_checked; ?> />
    29  No newline at end of file
     30                        <input name="rememberme" type="checkbox" id="quick_remember" value="1" tabindex="12"<?php if ( !empty( $remember_checked ) ) echo $remember_checked; ?> />
     31 No newline at end of file
    3032                        <?php _e('Remember me'); ?>
    3133
  • bb-templates/kakumei/login.php

     		</label>
     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></div>
     
    1213        $user_email_error = $bb_login_error->get_error_message( 'user_email' );
    1314        $user_password_error = $bb_login_error->get_error_message( 'password' );
    1415?>
    15         <tr valign="top" class="form-field <?php if ( $user_login_error || $user_email_error ) echo ' form-invalid error'; ?>">
     16        <tr valign="top" class="form-field <?php if ( !empty( $user_login_error ) || !empty( $user_email_error ) ) echo ' form-invalid error'; ?>">
    1617                <th scope="row">
    1718                        <label for="user_login"><?php _e('Username'); ?></label>
    18                         <?php if ( $user_login_error ) echo "<em>$user_login_error</em>"; ?>
    19                         <?php if ( $user_email_error ) echo "<em>$user_email_error</em>"; ?>
     19                        <?php if ( !empty( $user_login_error ) ) echo "<em>$user_login_error</em>"; ?>
     20                        <?php if ( !empty( $user_email_error ) ) echo "<em>$user_email_error</em>"; ?>
    2021                </th>
    2122                <td>
    22                         <input name="log" id="user_login" type="text" value="<?php echo $user_login; ?>" />
     23                        <input name="log" id="user_login" type="text" value="<?php if ( !empty( $user_login ) ) echo $user_login; ?>" />
    2324                </td>
    2425        </tr>
    25         <tr valign="top" class="form-field <?php if ( $user_password_error ) echo 'form-invalid error'; ?>">
     26        <tr valign="top" class="form-field <?php if ( !empty( $user_password_error ) ) echo 'form-invalid error'; ?>">
    2627                <th scope="row">
    2728                        <label for="password"><?php _e('Password'); ?></label>
    28                         <?php if ( $user_password_error ) echo "<em>$user_password_error</em>"; ?>
     29                        <?php if ( !empty( $user_password_error ) ) echo "<em>$user_password_error</em>"; ?>
    2930                </th>
    3031                <td>
    3132                        <input name="pwd" id="password" type="password" />
     
    3435
    3536        <tr valign="top" class="form-field">
    3637                <th scope="row"><label for="remember"><?php _e('Remember me'); ?></label></th>
    37                 <td><input name="rememberme" type="checkbox" id="remember" value="1"<?php echo $remember_checked; ?> /></td>
     38                <td><input name="rememberme" type="checkbox" id="remember" value="1"<?php if ( !empty( $remember_checked ) ) echo $remember_checked; ?> /></td>
    3839        </tr>
    3940        <tr>
    4041                <th scope="row">&nbsp;</th>
    4142                <td>
    42                         <input name="redirect_to" type="hidden" value="<?php echo $redirect_to; ?>" />
     43                        <input name="redirect_to" type="hidden" value="<?php if ( !empty( $redirect_to ) ) echo $redirect_to; ?>" />
    4344                        <input type="submit" value="<?php echo esc_attr( !empty( $user_login ) ? __( 'Try Again &raquo;' ): __( 'Log in &raquo;' ) ); ?>" />
    4445                        <?php wp_referer_field(); ?>
    4546                </td>
     
    5960                                <label for="user_login_reset_password"><?php _e( 'Username' ); ?></label>
    6061                        </th>
    6162                        <td>
    62                                 <input name="user_login" id="user_login_reset_password" type="text" value="<?php echo $user_login; ?>" />
     63                                <input name="user_login" id="user_login_reset_password" type="text" value="<?php if ( !empty( $user_login ) ) echo $user_login; ?>" />
    6364                        </td>
    6465                </tr>
    6566                <tr valign="top">
  • bb-templates/kakumei/password-reset.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Log in'); ?></div>
    45
    56<h2 role="main"><?php _e('Password Reset'); ?></h2>
    67
    7 <?php if ( $error ) : ?>
     8<?php if ( !empty( $error ) ) : ?>
    89<p class="notice error"><?php echo $error; ?></p>
    910<?php else : ?>
     11<?php if ( !empty( $action ) ) : ?>
    1012<?php switch ( $action ) : ?>
    1113<?php case ( 'send_key' ) : ?>
    1214<p class="notice"><?php _e('An email has been sent to the address we have on file for you. If you don&#8217;t get anything within a few minutes, or your email has changed, you may want to get in touch with the webmaster or forum administrator here.'); ?></p>
     
    1618<?php break; ?>
    1719<?php endswitch; ?>
    1820<?php endif; ?>
     21<?php endif; ?>
    1922
    2023<?php bb_get_footer(); ?>
  • bb-templates/kakumei/post-form-anonymous.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<?php
    2                 // Setup $current_poster varaible on post edit
    3                 if ( bb_is_topic_edit() ) :
    4                         foreach( array( 'post_author', 'post_email', 'post_url' ) as $post_author_meta )
    5                                 $current_poster[$post_author_meta] = bb_get_post_meta( $post_author_meta, $post_id );
     4        // Setup $current_poster varaible on post edit
     5        if ( bb_is_topic_edit() ) :
     6                foreach( array( 'post_author', 'post_email', 'post_url' ) as $post_author_meta )
     7                        $current_poster[$post_author_meta] = bb_get_post_meta( $post_author_meta, $post_id );
    68
    7                 // Shift $current_poster values from cookie
    8                 else :
    9                         $current_poster               = bb_get_current_poster();
    10                         $current_poster['post_email'] = $current_poster['post_author_email'];
    11                         $current_poster['post_url']   = $current_poster['post_author_url'];
    12                 endif;
     9        // Shift $current_poster values from cookie
     10        else :
     11                $current_poster               = bb_get_current_poster();
     12                $current_poster['post_email'] = $current_poster['post_author_email'];
     13                $current_poster['post_url']   = $current_poster['post_author_url'];
     14        endif;
    1315?>
    1416
    1517        <p id="post-form-author-container">
  • bb-templates/kakumei/post-form.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php if ( !bb_is_topic() ) : ?>
    23<p id="post-form-title-container">
    34        <label for="topic"><?php _e( 'Title' ); ?>
  • bb-templates/kakumei/post.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
     3 No newline at end of file
    14                <div id="position-<?php post_position(); ?>">
    25                        <div class="threadauthor">
    36                                <?php post_author_avatar_link(); ?>
  • bb-templates/kakumei/profile-base.php

     
     1<?php if ( !defined( 'BB_PATH' ) || empty( $user_id ) || empty( $user ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    3 <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php user_profile_link( $user_id ); ?>"><?php echo get_user_display_name( $user_id ); ?></a> &raquo; <?php echo $profile_page_title; ?></div>
     4<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php user_profile_link( $user_id ); ?>"><?php echo get_user_display_name( $user_id ); ?></a> &raquo; <?php if ( !empty( $profile_page_title ) ) echo $profile_page_title; ?></div>
    45<h2 role="main"><?php echo get_user_name( $user->ID ); ?></h2>
    56
    67<?php bb_profile_base_content(); ?>
  • bb-templates/kakumei/profile-edit.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb">
  • bb-templates/kakumei/profile.php

     
     1<?php if ( !defined( 'BB_PATH' ) || empty( $user_id ) || empty( $user ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php user_profile_link( $user_id ); ?>"><?php echo get_user_display_name( $user_id ); ?></a> &raquo; <?php _e('Profile') ?></div>
     
    910<?php unset($avatar); endif; ?>
    1011<h2 id="userlogin"><span class="fn"><?php echo get_user_display_name( $user->ID ); ?></span> <small>(<span class="nickname"><?php echo get_user_name( $user->ID ); ?></span>)</small></h2>
    1112
    12 <?php if ( $updated ) : ?>
     13<?php if ( !empty( $updated ) ) : ?>
    1314<div class="notice">
    1415<p><?php _e('Profile updated'); ?>. <a href="<?php profile_tab_link( $user_id, 'edit' ); ?>"><?php _e('Edit again &raquo;'); ?></a></p>
    1516</div>
     
    3435<h3 id="useractivity"><?php _e('User Activity') ?></h3>
    3536
    3637<div id="user-replies" class="user-recent"><h4><?php _e('Recent Replies'); ?></h4>
    37 <?php if ( $posts ) : ?>
     38<?php if ( !empty( $posts ) ) : ?>
    3839<ol>
    3940<?php foreach ($posts as $bb_post) : $topic = get_topic( $bb_post->topic_id ) ?>
    4041<li<?php alt_class('replies'); ?>>
     
    5051</li>
    5152<?php endforeach; ?>
    5253</ol>
    53 <?php else : if ( $page ) : ?>
     54<?php else : if ( !empty( $page ) ) : ?>
    5455<p><?php _e('No more replies.') ?></p>
    5556<?php else : ?>
    5657<p><?php _e('No replies yet.') ?></p>
     
    5960
    6061<div id="user-threads" class="user-recent">
    6162<h4><?php _e('Topics Started') ?></h4>
    62 <?php if ( $topics ) : ?>
     63<?php if ( !empty( $topics ) ) : ?>
    6364<ol>
    6465<?php foreach ($topics as $topic) : ?>
    6566<li<?php alt_class('topics'); ?>>
     
    7576</li>
    7677<?php endforeach; ?>
    7778</ol>
    78 <?php else : if ( $page ) : ?>
     79<?php else : if ( !empty( $page ) ) : ?>
    7980<p><?php _e('No more topics posted.') ?></p>
    8081<?php else : ?>
    8182<p><?php _e('No topics posted yet.') ?></p>
  • bb-templates/kakumei/register-success.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></div>
  • bb-templates/kakumei/register.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Register'); ?></div>
     
    1516
    1617<?php
    1718
    18 $user_login_error = $bb_register_error->get_error_message( 'user_login' );
     19if ( !empty( $bb_register_error ) ) :
     20        $user_login_error = $bb_register_error->get_error_message( 'user_login' ); ?>
    1921
    20 ?>
    21 
    2222<table width="100%">
    23         <tr class="form-field form-required required<?php if ( $user_login_error ) echo ' form-invalid error'; ?>">
     23        <tr class="form-field form-required required<?php if ( !empty( $user_login_error ) ) echo ' form-invalid error'; ?>">
    2424                <th scope="row">
    2525                        <label for="user_login"><?php _e('Username'); ?></label>
    26                         <?php if ( $user_login_error ) echo "<em>$user_login_error</em>"; ?>
     26                        <?php if ( !empty( $user_login_error ) ) echo "<em>$user_login_error</em>"; ?>
    2727                </th>
    2828                <td>
    29                         <input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php echo $user_login; ?>" />
     29                        <input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php if ( !empty( $user_login ) ) echo $user_login; ?>" />
    3030                </td>
    3131        </tr>
    3232
    3333<?php
     34endif;
    3435
    35 if ( is_array($profile_info_keys) ) :
     36if ( !empty( $profile_info_keys ) && is_array( $profile_info_keys ) ) :
    3637        foreach ( $profile_info_keys as $key => $label ) :
    3738                $class = 'form-field';
    38                 if ( $label[0] ) {
     39                if ( !empty( $label[0] ) ) {
    3940                        $class .= ' form-required required';
    4041                }
    41                 if ( $profile_info_key_error = $bb_register_error->get_error_message( $key ) )
     42                if ( !empty( $bb_register_error ) && ( $profile_info_key_error = $bb_register_error->get_error_message( $key ) ) )
    4243                        $class .= ' form-invalid error';
    4344
    4445?>
     
    4647        <tr class="<?php echo $class; ?>">
    4748                <th scope="row">
    4849                        <label for="<?php echo $key; ?>"><?php echo $label[1]; ?></label>
    49                         <?php if ( $profile_info_key_error ) echo "<em>$profile_info_key_error</em>"; ?>
     50                        <?php if ( !empty( $profile_info_key_error ) ) echo "<em>$profile_info_key_error</em>"; ?>
    5051                </th>
    5152                <td>
    5253                        <input name="<?php echo $key; ?>" type="text" id="<?php echo $key; ?>" size="30" maxlength="140" value="<?php echo $$key; ?>" />
  • bb-templates/kakumei/rss2.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php
    23header( 'Content-Type: text/xml; charset=UTF-8' );
    34echo '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "\n";
     
    1011        <?php do_action( 'bb_rss2_ns'); ?>
    1112        >
    1213        <channel>
    13                 <title><?php echo $title; ?></title>
    14                 <link><?php echo $link; ?></link>
    15                 <description><?php echo $description; ?></description>
     14                <title><?php if ( !empty( $title ) ) echo $title; ?></title>
     15                <link><?php if ( !empty( $link ) ) echo $link; ?></link>
     16                <description><?php if ( !empty( $description ) ) echo $description; ?></description>
    1617                <language><?php echo esc_html( bb_get_option( 'language' ) ); ?></language>
    1718                <pubDate><?php echo gmdate( 'D, d M Y H:i:s +0000' ); ?></pubDate>
    1819                <?php bb_generator( 'rss2' ); ?>
    1920                <?php do_action( 'bb_rss2_head' ); ?>
    20                 <atom:link href="<?php echo $link_self; ?>" rel="self" type="application/rss+xml" />
     21                <atom:link href="<?php if ( !empty( $link_self ) ) echo $link_self; ?>" rel="self" type="application/rss+xml" />
    2122
     23<?php if ( !empty( $posts ) ) : ?>
    2224<?php foreach ( (array) $posts as $bb_post ) : ?>
    2325                <item>
    2426                        <title><?php post_author(); ?> <?php _e( 'on' ); ?> "<?php topic_title( $bb_post->topic_id ); ?>"</title>
     
    3032                        <?php do_action( 'bb_rss2_item' ); ?>
    3133                </item>
    3234<?php endforeach; ?>
     35<?php endif; ?>
    3336
    3437        </channel>
    3538</rss>
  • bb-templates/kakumei/search-form.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
     2
    13<form class="search-form" role="search" action="<?php bb_uri('search.php', null, BB_URI_CONTEXT_FORM_ACTION); ?>" method="get">
    24        <p>
    35                <label class="hidden" for="q"><?php _e('Search:'); ?></label>
  • bb-templates/kakumei/search.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Search')?></div>
    45<?php bb_topic_search_form(); ?>
    56
    6 <?php if ( !empty ( $q ) ) : ?>
     7<?php if ( !empty( $q ) ) : ?>
    78<h3 id="search-for"><?php printf( __( 'Search for %s' ), '&#8220;' . esc_html( $q ) . '&#8221;' ); ?></h3>
    8 <?php endif; ?>
    99
    10 <?php if ( $recent ) : ?>
     10<?php else : $q = ''; endif; ?>
     11
     12<?php if ( !empty( $recent ) ) : ?>
    1113<div id="results-recent" class="search-results">
    1214        <h4><?php _e( 'Recent Posts' )?></h4>
    1315        <ol>
     
    2224</div>
    2325<?php endif; ?>
    2426
    25 <?php if ( $relevant ) : ?>
     27<?php if ( !empty( $relevant ) ) : ?>
    2628<div id="results-relevant" class="search-results">
    2729        <h4><?php _e( 'Relevant Topics' )?></h4>
    2830        <ol>
     
    4042
    4143<?php bb_search_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?>
    4244
    43 <?php if ( $q && !$recent && !$relevant ) : ?>
    44  No newline at end of file
     45<?php if ( !empty( $q ) && empty( $recent ) && empty( $relevant ) ) : ?>
     46 No newline at end of file
    4547<p><?php printf( __( 'Your search %s did not return any results. Here are some suggestions:' ), '&#8220;<em>' . esc_html( $q ) . '</em>&#8221;' ); ?></p>
    4648<ul id="search-suggestions">
  • bb-templates/kakumei/stats.php

     	<li><?php _e( 'Make sure all words are spelled correctly' ); ?></li>
     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option( 'name' ); ?></a> &raquo; <?php _e( 'Statistics' ); ?></div>
     
    1112</dl>
    1213
    1314<div class="right">
    14 <?php if ( $popular ) : ?>
     15<?php if ( !empty( $popular ) ) : ?>
    1516        <h3><?php _e( 'Most Popular Topics' ); ?></h3>
    1617        <ol>
    1718<?php foreach ( $popular as $topic ) : ?>
  • bb-templates/kakumei/tag-single.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <a href="<?php bb_tag_page_link(); ?>"><?php _e('Tags'); ?></a> &raquo; <?php bb_tag_name(); ?></div>
    45
    56<?php do_action('tag_above_table'); ?>
    67
    7 <?php if ( $topics ) : ?>
     8<?php if ( !empty( $topics ) ) : ?>
    89
    910<table id="latest" role="main">
    1011<tr>
  • bb-templates/kakumei/tags.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Tags'); ?></div>
  • bb-templates/kakumei/topic-tags.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<div id="topic-tags">
    23<p><?php _e('Tags:'); ?></p>
    34
  • bb-templates/kakumei/topic.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a><?php bb_forum_bread_crumb(); ?></div>
     
    1516        <li><?php printf(__('<a href="%1$s">Latest reply</a> from %2$s'), esc_attr( get_topic_last_post_link() ), get_topic_last_poster()) ?></li>
    1617<?php endif; ?>
    1718<?php if ( bb_is_user_logged_in() ) : ?>
    18         <li<?php echo $class;?> id="favorite-toggle"><?php user_favorites_link(); ?></li>
     19        <li<?php if ( !empty( $class ) ) echo $class; ?> id="favorite-toggle"><?php user_favorites_link(); ?></li>
    1920<?php endif; do_action('topicmeta'); ?>
    2021</ul>
    2122</div>
     
    2526<div style="clear:both;"></div>
    2627</div>
    2728<?php do_action('under_title'); ?>
    28 <?php if ($posts) : ?>
     29<?php if ( !empty( $posts ) ) : ?>
    2930<?php topic_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?>
    3031<div id="ajax-response"></div>
    3132<ol id="thread" class="list:post">
  • bb-templates/kakumei/view.php

     
     1<?php if ( !defined( 'BB_PATH' ) ) die( 'This file cannot be called directly.' ); ?>
    12<?php bb_get_header(); ?>
    23
    34<div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php view_name(); ?></div>