Skip to:
Content

BuddyPress.org

Changeset 4458


Ignore:
Timestamp:
06/05/2011 10:18:53 AM (13 years ago)
Author:
djpaul
Message:

Fix broken images on the Setup 'theme' screen.
Update options and improve descriptive text.
Add missing i18n gettext calls.
Fixes #3054

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-update.php

    r4437 r4458  
    590590            }
    591591        }
     592
     593        // Get theme screenshot
     594        $current_theme = get_current_theme();
     595        $screenshot    = '';
     596        $themes        = get_themes();
     597
     598        if ( !empty( $themes[$current_theme]['Screenshot'] ) )
     599            $screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $themes[$current_theme]['Screenshot'];
    592600    ?>
    593601
     
    600608        </script>
    601609
    602         <p><?php _e( "BuddyPress introduces a whole range of new screens to display content. To display these screens you will need to decide how you want to handle them in your active theme. There are a few different options, please choose the option that best suits your demands and needs.", 'buddypress' ); ?></p>
     610        <p><?php _e( "BuddyPress introduces a whole range of new screens to display content. To display these screens, you need to decide how you want to handle them in your current theme.", 'buddypress' ); ?></p>
    603611
    604612        <table class="form-table">
    605613            <tr>
    606614                <th>
    607                     <h5><?php _e( 'Use the Default Theme', 'buddypress' ); ?></h5>
    608                     <img src="<?php echo plugins_url( '/buddypress/bp-core/images/default.jpg' ); ?>" alt="bp-default" />
     615                    <h5><?php _e( 'Use BuddyPress Default', 'buddypress' ); ?></h5>
     616                    <img src="<?php echo plugins_url( '/buddypress/bp-core/images/default.jpg' ); ?>" alt="<?php _e( 'BuddyPress Default', 'buddypress' ); ?>" />
    609617                </th>
    610618                <td>
    611                     <p><?php _e( 'The default theme contains everything you need to get up and running out of the box. It supports all features and is highly customizable.', 'buddypress' ); ?></p>
    612                     <p><strong><?php _e( 'This is the best choice if you do not have an existing WordPress theme or want to create a child theme from a solid starting point.', 'buddypress' ); ?></strong></p>
    613                     <p><label><input type="radio" name="theme" value="bp_default" checked="checked" /> <?php _e( 'Choose this option', 'buddypress' ); ?></label></p>
     619                    <p><?php _e( 'BuddyPress Default contains everything you need to get up and running out of the box. It supports all features and is highly customizable.', 'buddypress' ); ?></p>
     620                    <p><strong><?php _e( 'This is the best choice if you do not have an existing WordPress theme, or want to start using BuddyPress immediately.', 'buddypress' ); ?></strong></p>
     621                    <p><label><input type="radio" name="theme" value="bp_default" checked="checked" /> <?php _e( 'Yes, please!', 'buddypress' ); ?></label></p>
    614622                </td>
    615623            </tr>
    616624
     625            <?php if ( $bp_theme_installed ) : ?>
     626                <tr>
     627                    <th>
     628                        <h5><?php _e( 'Other themes', 'buddypress' ); ?></h5>
     629                        <img src="<?php echo plugins_url( '/buddypress/bp-core/images/find.jpg' ); ?>" alt="<?php _e( 'A BuddyPress theme', 'buddypress' ); ?>" />
     630                    </th>
     631                    <td>
     632                        <p><?php _e( "We've found that you already have some other BuddyPress-compatible themes available. To use one of those, pick it from this list.", 'buddypress' ); ?></p>
     633                        <p>
     634                            <label>
     635                                <input type="radio" name="theme" value="3rd_party" /> <?php _e( 'Use this theme', 'buddypress' ); ?>
     636                            </label>
     637                            <select name="3rd_party_theme">
     638
     639                                <?php foreach( (array) $bp_themes as $theme ) : ?>
     640                                    <option value="<?php echo $theme['Template'] . ',' . $theme['Stylesheet']; ?>"><?php echo $theme['Name']; ?></option>
     641                                <?php endforeach; ?>
     642
     643                            </select>
     644                        </p>
     645                    </td>
     646                </tr>
     647            <?php endif; ?>
     648
    617649            <tr>
    618650                <th>
    619                     <h5><?php _e( 'Manually Update My WordPress Theme', 'buddypress' ); ?>'</h5>
    620                     <img src="<?php echo plugins_url( '/buddypress/bp-core/images/manual_theme.jpg' ); ?>" alt="bp-default" />
     651                    <h5><?php _e( 'Manually update current theme', 'buddypress' ); ?></h5>
     652                    <?php if ( !empty( $screenshot ) ) : ?>
     653                        <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php _e( 'Your existing theme', 'buddypress' ); ?>" />
     654                    <?php endif; ?>
    621655                </th>
    622656                <td>
    623                     <p><?php _e( 'The BuddyPress Template Pack plugin will run you through the process of manually upgrading your existing WordPress theme. This usually involves following the step by step instructions and copying the BuddyPress template files into your theme then tweaking the HTML to match.', 'buddypress' ); ?></p>
    624                     <p><strong><?php _e( 'This is the best choice if you have an existing WordPress theme and want complete control over template layout and design.', 'buddypress' ); ?></strong></p>
     657                    <p><?php _e( 'The BuddyPress Template Pack plugin will guide you through the process of manually upgrading your existing WordPress theme. This usually involves following the step-by-step instructions and copying the BuddyPress template files into your theme. This option requires a working knowledge of CSS and HTML, as you will need to tweak the new templates to match your existing theme.', 'buddypress' ); ?></p>
    625658
    626659                    <?php if ( empty( $template_pack_installed ) ) : ?>
    627660
    628                         <p><label><input type="radio" name="theme" value="manual_wp" disabled="disabled" /> <?php _e( 'You must first install the BuddyPress Template Pack before choosing this option', 'buddypress' ); ?></label></p>
    629                         <p><a id="bp-template-pack" class="thickbox onclick button" href="<?php echo network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=bp-template-pack&TB_iframe=true&width=640&height=500' ); ?>"><?php _e( 'Install Now', 'buddypress' ); ?></a></p>
     661                        <p><a id="bp-template-pack" class="thickbox onclick button" href="<?php echo network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=bp-template-pack&TB_iframe=true&width=640&height=500' ); ?>"><?php _e( 'Install BuddyPress Template Pack', 'buddypress' ); ?></a></p>
    630662
    631663                    <?php else : ?>
     
    641673            <tr>
    642674                <th>
    643                     <h5><?php _e( 'Find a BuddyPress Theme', 'buddypress' ); ?></h5>
    644                     <img src="<?php echo plugins_url( '/buddypress/bp-core/images/find.jpg' ); ?>" alt="bp-default" />
     675                    <h5><?php _e( 'Do not change theme', 'buddypress' ) ?></h5>
    645676                </th>
    646677                <td>
    647                     <p><?php _e( "There's growing number of BuddyPress themes available for you to download and use. Browse through the list of available themes to see if there is one that matches your needs.", 'buddypress' ); ?></p>
    648                     <p><strong><?php _e( 'This is the best choice if want to use a theme other than the default and get started straight out of the box.', 'buddypress' ); ?></strong></p>
    649 
    650                     <?php if ( empty( $bp_theme_installed ) ) : ?>
    651 
    652                         <p><label><input type="radio" name="theme" value="third_party" disabled="disabled" /> <?php _e( 'You must first install at least one BuddyPress theme before choosing this option', 'buddypress' ); ?></label></p>
    653                         <p><a id="bp-themes" class="thickbox onclick button" href="<?php echo network_admin_url( 'theme-install.php?type=tag&s=buddypress&tab=search' ); ?>&TB_iframe=true&width=860&height=500"><?php _e( 'Add Themes', 'buddypress' ); ?></a></p>
    654 
    655                     <?php else : ?>
    656 
    657                         <p><label>
    658                                 <input type="radio" name="theme" value="3rd_party" /> <?php _e( 'Choose this option and use the theme:', 'buddypress' ); ?>
    659                             </label>
    660                             <select name="3rd_party_theme">
    661 
    662                                 <?php foreach( (array)$bp_themes as $theme ) : ?>
    663 
    664                                     <option value="<?php echo $theme['Template'] . ',' . $theme['Stylesheet']; ?>"><?php echo $theme['Name']; ?></option>
    665 
    666                                 <?php endforeach; ?>
    667 
    668                             </select>
    669                         </p>
    670 
    671                     <?php endif; ?>
    672 
    673                 </td>
    674             </tr>
    675 
    676             <tr>
    677                 <th>
    678                     <h5><?php _e( 'Do Not Change Theme', 'buddypress' ) ?></h5>
    679                     <img src="<?php echo plugins_url( '/buddypress/bp-core/images/existing.jpg' ) ?>" alt="bp-default" />
    680                 </th>
    681                 <td>
    682                     <p><?php _e( "You are happy with your current theme and plan on changing it later.", 'buddypress' ) ?></p>
    683                     <p><strong><?php _e( 'This is the best choice if you have a highly customized theme on your site already, and want to manually integrate BuddyPress into your site over time.', 'buddypress' ) ?></strong></p>
    684 
    685                     <p><label><input type="radio" name="theme" value="do_not_change" /> <?php _e( 'Choose this option', 'buddypress' ) ?></label></p>
     678                    <p><?php _e( "You are happy with your current theme and plan on changing it later.", 'buddypress' ); ?></p>
     679                    <p><strong><?php _e( 'This is the best choice if you have a highly customized theme on your site already, and want to later manually integrate BuddyPress into your site.', 'buddypress' ); ?></strong></p>
     680
     681                    <p><label><input type="radio" name="theme" value="do_not_change" /> <?php _e( "Don't change my current theme", 'buddypress' ); ?></label></p>
    686682
    687683                </td>
  • trunk/bp-core/css/admin.dev.css

    r4161 r4458  
    112112div#bp-admin table.form-table th {
    113113    border-right: 1px solid #eee;
    114     width: 208px;
    115114    padding: 15px 25px 15px 0;
    116115    color: #555;
     
    129128    div#bp-admin table.form-table th img {
    130129        margin-top: 5px;
     130        width: 215px;
    131131    }
    132132
Note: See TracChangeset for help on using the changeset viewer.