Changeset 3624
- Timestamp:
- 12/30/2010 09:29:17 PM (14 years ago)
- Location:
- trunk/bp-themes/bp-default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/css/default.css
r3606 r3624 873 873 } 874 874 875 form.standard-form#signup_form div div.error {875 .standard-form#signup_form div div.error { 876 876 color: #fff; 877 877 background: #e41717; … … 968 968 -------------------------------------------------------------- */ 969 969 970 form.standard-form textarea,971 form.standard-form input[type=text],972 form.standard-form select,973 form.standard-form input[type=password],970 .standard-form textarea, 971 .standard-form input[type=text], 972 .standard-form select, 973 .standard-form input[type=password], 974 974 .dir-search input[type=text] { 975 975 border: 1px inset #ccc; … … 983 983 } 984 984 985 form.standard-form select {985 .standard-form select { 986 986 padding: 3px; 987 987 } 988 988 989 form.standard-form input[type=password] {989 .standard-form input[type=password] { 990 990 margin-bottom: 5px; 991 991 } 992 992 993 form.standard-form label,994 form.standard-form span.label {993 .standard-form label, 994 .standard-form span.label { 995 995 display: block; 996 996 font-weight: bold; … … 998 998 } 999 999 1000 form.standard-form div.checkbox label,1001 form.standard-form div.radio label {1000 .standard-form div.checkbox label, 1001 .standard-form div.radio label { 1002 1002 font-weight: normal; 1003 1003 margin: 5px 0 0 0; … … 1006 1006 } 1007 1007 1008 form.standard-form#sidebar-login-form label {1008 .standard-form#sidebar-login-form label { 1009 1009 margin-top: 5px; 1010 1010 } 1011 1011 1012 form.standard-form input[type=text] {1012 .standard-form input[type=text] { 1013 1013 width: 75%; 1014 1014 } 1015 1015 1016 form.standard-form#sidebar-login-form input[type=text],1017 form.standard-form#sidebar-login-form input[type=password] {1016 .standard-form#sidebar-login-form input[type=text], 1017 .standard-form#sidebar-login-form input[type=password] { 1018 1018 padding: 4px; 1019 1019 width: 95%; 1020 1020 } 1021 1021 1022 form.standard-form #basic-details-section input[type=password],1023 form.standard-form #blog-details-section input#signup_blog_url {1022 .standard-form #basic-details-section input[type=password], 1023 .standard-form #blog-details-section input#signup_blog_url { 1024 1024 width: 35%; 1025 1025 } 1026 1026 1027 form.standard-form#signup_form input[type=text],1028 form.standard-form#signup_form textarea {1027 .standard-form#signup_form input[type=text], 1028 .standard-form#signup_form textarea { 1029 1029 width: 90%; 1030 1030 } 1031 1031 1032 form.standard-form#signup_form div.submit {1032 .standard-form#signup_form div.submit { 1033 1033 float: right; 1034 1034 } … … 1038 1038 } 1039 1039 1040 form.standard-form textarea {1040 .standard-form textarea { 1041 1041 width: 75%; 1042 1042 height: 120px; 1043 1043 } 1044 1044 1045 form.standard-form textarea#message_content {1045 .standard-form textarea#message_content { 1046 1046 height: 200px; 1047 1047 } 1048 1048 1049 form.standard-form#send-reply textarea {1049 .standard-form#send-reply textarea { 1050 1050 width: 97.5%; 1051 1051 } 1052 1052 1053 form.standard-form p.description {1053 .standard-form p.description { 1054 1054 font-size: 11px; 1055 1055 color: #888; … … 1057 1057 } 1058 1058 1059 form.standard-form div.submit {1059 .standard-form div.submit { 1060 1060 padding: 15px 0; 1061 1061 clear: both; 1062 1062 } 1063 1063 1064 form.standard-form div.submit input {1064 .standard-form div.submit input { 1065 1065 margin-right: 15px; 1066 1066 } 1067 1067 1068 form.standard-form div.radio ul {1068 .standard-form div.radio ul { 1069 1069 margin: 10px 0 15px 38px; 1070 1070 list-style: disc; 1071 1071 } 1072 1072 1073 form.standard-form div.radio ul li {1073 .standard-form div.radio ul li { 1074 1074 margin-bottom: 5px; 1075 1075 } 1076 1076 1077 form.standard-form a.clear-value {1077 .standard-form a.clear-value { 1078 1078 display: block; 1079 1079 margin-top: 5px; … … 1081 1081 } 1082 1082 1083 form.standard-form #basic-details-section,1084 form.standard-form #blog-details-section,1085 form.standard-form #profile-details-section {1083 .standard-form #basic-details-section, 1084 .standard-form #blog-details-section, 1085 .standard-form #profile-details-section { 1086 1086 float: left; 1087 1087 width: 48%; 1088 1088 } 1089 1089 1090 form.standard-form #profile-details-section {1090 .standard-form #profile-details-section { 1091 1091 float: right; 1092 1092 } 1093 1093 1094 form.standard-form #blog-details-section {1094 .standard-form #blog-details-section { 1095 1095 clear: left; 1096 1096 } 1097 1097 1098 form.standard-form input:focus,1099 form.standard-form textarea:focus,1100 form.standard-form select:focus {1098 .standard-form input:focus, 1099 .standard-form textarea:focus, 1100 .standard-form select:focus { 1101 1101 background: #fafafa; 1102 1102 color: #555; -
trunk/bp-themes/bp-default/comments.php
r3592 r3624 1 2 if ( post_password_required() ) :3 echo '<h3 class="comments-header">' . __('Password Protected', 'buddypress') . '</h3>';4 echo '<p class="alert password-protected">' . __('Enter the password to view comments.', 'buddypress') . '</p>';5 6 endif;1 <?php 2 if ( post_password_required() ) { 3 echo '<h3 class="comments-header">' . __( 'Password Protected', 'buddypress' ) . '</h3>'; 4 echo '<p class="alert password-protected">' . __( 'Enter the password to view comments.', 'buddypress' ) . '</p>'; 5 return; 6 } 7 7 8 if ( is_page() && !have_comments() && !comments_open() && !pings_open() ) 9 return; 10 ?> 8 if ( is_page() && !have_comments() && !comments_open() && !pings_open() ) 9 return; 11 10 12 <?php if ( have_comments() ) : ?> 11 if ( have_comments() ) : 12 $num_comments = 0; 13 $num_trackbacks = 0; 14 foreach ( (array)$comments as $comment ) { 15 if ( 'comment' != get_comment_type() ) 16 $num_trackbacks++; 17 else 18 $num_comments++; 19 } 20 ?> 21 <div id="comments"> 13 22 14 <div id="comments"> 23 <h3> 24 <?php printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', $num_comments, 'buddypress' ), number_format_i18n( $num_comments ), '<em>' . get_the_title() . '</em>' ) ?> 25 </h3> 15 26 16 <?php 17 // Only include comments 18 $numTrackBacks = 0; $numComments = 0; 19 foreach ( (array)$comments as $comment ) 20 if ( 'comment' != get_comment_type() ) 21 $numTrackBacks++; 22 else 23 $numComments++; 24 ?> 27 <?php do_action( 'bp_before_blog_comment_list' ) ?> 25 28 26 <h3 id="comments"> 27 <?php 28 printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', $numComments, 'buddypress' ), 29 number_format_i18n( $numComments ), '<em>' . get_the_title() . '</em>' ); 30 ?> 31 </h3> 29 <ol class="commentlist"> 30 <?php wp_list_comments( array( 'callback' => 'bp_dtheme_blog_comments' ) ) ?> 31 </ol><!-- .comment-list --> 32 32 33 <?php do_action( 'bp_before_blog_comment_list' ) ?>33 <?php do_action( 'bp_after_blog_comment_list' ) ?> 34 34 35 <ol class="commentlist"> 36 <?php wp_list_comments( array( 'callback' => 'bp_dtheme_blog_comments' ) ); ?> 37 </ol><!-- .comment-list --> 38 39 <?php do_action( 'bp_after_blog_comment_list' ) ?> 40 41 <?php if ( get_option( 'page_comments' ) ) : ?> 42 43 <div class="comment-navigation paged-navigation"> 44 45 <?php paginate_comments_links(); ?> 46 47 </div> 48 49 <?php endif; ?> 50 51 </div><!-- #comments --> 52 53 <?php else : ?> 54 55 <?php if ( pings_open() && !comments_open() && is_single() ) : ?> 56 57 <p class="comments-closed pings-open"> 58 <?php printf( __('Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress'), trackback_url( '0' ) ); ?> 59 </p> 60 61 <?php elseif ( !comments_open() && is_single() ) : ?> 62 63 <p class="comments-closed"> 64 <?php _e('Comments are closed.', 'buddypress'); ?> 65 </p> 66 35 <?php if ( get_option( 'page_comments' ) ) : ?> 36 <div class="comment-navigation paged-navigation"> 37 <?php paginate_comments_links() ?> 38 </div> 67 39 <?php endif; ?> 68 40 41 </div><!-- #comments --> 42 <?php else : ?> 43 44 <?php if ( pings_open() && !comments_open() && is_single() ) : ?> 45 <p class="comments-closed pings-open"> 46 <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress' ), trackback_url( '0' ) ) ?> 47 </p> 48 <?php elseif ( !comments_open() && is_single() ) : ?> 49 <p class="comments-closed"> 50 <?php _e( 'Comments are closed.', 'buddypress' ) ?> 51 </p> 69 52 <?php endif; ?> 70 53 71 <?php if ( comments_open() ) :?>54 <?php endif; ?> 72 55 73 <div id="respond"> 56 <?php if ( comments_open() ) : ?> 57 <div id="respond"> 74 58 75 <div class="comment-avatar-box"> 76 <div class="avb"> 77 <?php if ( bp_loggedin_user_id() ) : ?> 78 <a href="<?php echo bp_loggedin_user_domain() ?>"> 79 <?php echo get_avatar( bp_loggedin_user_id(), 50 ); ?> 80 </a> 81 <?php else : ?> 82 <?php echo get_avatar( 0, 50 ); ?> 83 <?php endif; ?> 84 </div> 59 <div class="comment-avatar-box"> 60 <div class="avb"> 61 <?php if ( bp_loggedin_user_id() ) : ?> 62 <a href="<?php echo bp_loggedin_user_domain() ?>"> 63 <?php echo get_avatar( bp_loggedin_user_id(), 50 ) ?> 64 </a> 65 <?php else : ?> 66 <?php echo get_avatar( 0, 50 ) ?> 67 <?php endif; ?> 85 68 </div> 69 </div> 86 70 87 <div class="comment-content"> 71 <div class="comment-content standard-form"> 72 <?php comment_form() ?> 73 </div><!-- .comment-content --> 88 74 89 <h3 id="reply" class="comments-header"> 90 <?php comment_form_title( __( 'Leave a Reply', 'buddypress' ), __( 'Leave a Reply to %s', 'buddypress' ), true ); ?> 91 </h3> 75 </div><!-- #respond --> 76 <?php endif; ?> 92 77 93 <p id="cancel-comment-reply">94 <?php cancel_comment_reply_link( __( 'Click here to cancel reply.', 'buddypress' ) ); ?>95 </p>78 <?php if ( !empty( $num_trackbacks ) ) : ?> 79 <div id="trackbacks"> 80 <span class="title"><?php the_title() ?></span> 96 81 97 <?php if ( get_option( 'comment_registration' ) && !$user_ID ) : ?> 82 <h3> 83 <?php printf( _n( '%d Trackback', '%d Trackbacks', $num_trackbacks, 'buddypress' ), number_format_i18n( $num_trackbacks ) ) ?> 84 </h3> 98 85 99 <p class="alert"> 100 <?php printf( __('You must be <a href="%1$s" title="Log in">logged in</a> to post a comment.', 'buddypress'), wp_login_url( get_permalink() ) ); ?> 101 </p> 86 <ul id="trackbacklist"> 87 <?php foreach ( (array)$comments as $comment ) : ?> 102 88 103 <?php else : ?> 89 <?php if ( 'comment' != get_comment_type() ) : ?> 90 <li> 91 <h5><?php comment_author_link() ?></h5> 92 <em>on <?php comment_date() ?></em> 93 </li> 94 <?php endif; ?> 104 95 105 <?php do_action( 'bp_before_blog_comment_form' ) ?> 96 <?php endforeach; ?> 97 </ul> 106 98 107 <form action="<?php echo site_url( 'wp-comments-post.php' ) ?>" method="post" id="commentform" class="standard-form"> 108 109 <?php if ( $user_ID ) : ?> 110 111 <p class="log-in-out"> 112 <?php printf( __('Logged in as <a href="%1$s" title="%2$s">%2$s</a>.', 'buddypress'), bp_loggedin_user_domain(), $user_identity ); ?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e('Log out of this account', 'buddypress'); ?>"><?php _e('Log out →', 'buddypress'); ?></a> 113 </p> 114 115 <?php else : ?> 116 117 <?php $req = get_option( 'require_name_email' ); ?> 118 119 <p class="form-author"> 120 <label for="author"><?php _e('Name', 'buddypress'); ?> <?php if ( $req ) : ?><span class="required"><?php _e('*', 'buddypress'); ?></span><?php endif; ?></label> 121 <input type="text" class="text-input" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" /> 122 </p> 123 124 <p class="form-email"> 125 <label for="email"><?php _e('Email', 'buddypress'); ?> <?php if ( $req ) : ?><span class="required"><?php _e('*', 'buddypress'); ?></span><?php endif; ?></label> 126 <input type="text" class="text-input" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" /> 127 </p> 128 129 <p class="form-url"> 130 <label for="url"><?php _e('Website', 'buddypress'); ?></label> 131 <input type="text" class="text-input" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" /> 132 </p> 133 134 <?php endif; ?> 135 136 <p class="form-textarea"> 137 <label for="comment"><?php _e('Comment', 'buddypress'); ?></label> 138 <textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"></textarea> 139 </p> 140 141 <?php do_action( 'bp_blog_comment_form' ) ?> 142 143 <p class="form-submit"> 144 <input class="submit-comment button" name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit', 'buddypress'); ?>" /> 145 <?php comment_id_fields(); ?> 146 </p> 147 148 <div class="comment-action"> 149 <?php do_action( 'comment_form', $post->ID ); ?> 150 </div> 151 152 </form> 153 154 <?php do_action( 'bp_after_blog_comment_form' ) ?> 155 156 <?php endif; ?> 157 158 </div><!-- .comment-content --> 159 </div><!-- #respond --> 160 161 <?php endif; ?> 162 163 <?php if ( isset( $numTrackBacks ) && $numTrackBacks ) : ?> 164 <div id="trackbacks"> 165 166 <span class="title"><?php the_title() ?></span> 167 168 <?php if ( 1 == $numTrackBacks ) : ?> 169 <h3><?php printf( __( '%d Trackback', 'buddypress' ), $numTrackBacks ) ?></h3> 170 <?php else : ?> 171 <h3><?php printf( __( '%d Trackbacks', 'buddypress' ), $numTrackBacks ) ?></h3> 172 <?php endif; ?> 173 174 <ul id="trackbacklist"> 175 <?php foreach ( (array)$comments as $comment ) : ?> 176 177 <?php if ( get_comment_type() != 'comment' ) : ?> 178 <li><h5><?php comment_author_link() ?></h5><em>on <?php comment_date() ?></em></li> 179 <?php endif; ?> 180 <?php endforeach; ?> 181 </ul> 182 </div> 183 <?php endif; ?> 99 </div> 100 <?php endif; ?> -
trunk/bp-themes/bp-default/functions.php
r3614 r3624 478 478 * @since 1.3 479 479 */ 480 function bp_dtheme_main_nav( $args ) { 481 ?> 480 function bp_dtheme_main_nav( $args ) { ?> 482 481 <ul id="nav"> 483 482 <li<?php if ( is_front_page() ) : ?> class="selected"<?php endif; ?>> … … 490 489 <?php 491 490 } 491 492 /** 493 * Applies BuddyPress customisations to the post comment form. 494 * 495 * @global string $user_identity The display name of the user 496 * @param array $default_labels The default options for strings, fields etc in the form 497 * @see comment_form() 498 * @since 1.3 499 */ 500 function bp_dtheme_comment_form( $default_labels ) { 501 global $user_identity; 502 503 $commenter = wp_get_current_commenter(); 504 $req = get_option( 'require_name_email' ); 505 $aria_req = ( $req ? " aria-required='true'" : '' ); 506 $fields = array( 507 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? '<span class="required"> *</span>' : '' ) . '</label> ' . 508 '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 509 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? '<span class="required"> *</span>' : '' ) . '</label> ' . 510 '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 511 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . 512 '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 513 ); 514 515 $new_labels = array( 516 'cancel_reply_link' => '<p id="cancel-comment-reply">' . __( 'Cancel reply', 'buddypress' ) . '</p>', 517 'comment_field' => '<p class="form-textarea"><label for="comment">' . __( 'Comment', 'buddypress' ) . '</label><textarea name="comment" id="comment" cols="60" rows="10" aria-required="true"></textarea></p>', 518 'comment_notes_after' => '', 519 'comment_notes_before' => '', 520 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 521 'logged_in_as' => '<p class="log-in-out">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s">Log out?</a>', 'buddypress' ), bp_loggedin_user_domain(), $user_identity, wp_logout_url( get_permalink() ) ) . '</p>', 522 'must_log_in' => '<p class="alert">' . sprintf( __( 'You must be <a href="%1$s">logged in</a> to post a comment.', 'buddypress' ), wp_login_url( get_permalink() ) ) . '</p>', 523 'title_reply' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply', 'buddypress' ) . '</h3>', 524 'title_reply_to' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply to %s', 'buddypress' ) . '</h3>' 525 ); 526 527 return apply_filters( 'bp_dtheme_comment_form', array_merge( $default_labels, $new_labels ) ); 528 } 529 add_filter( 'comment_form_defaults', 'bp_dtheme_comment_form', 10 ); 530 492 531 493 532 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version. -
trunk/bp-themes/bp-default/rtl.css
r3606 r3624 345 345 -------------------------------------------------------------- */ 346 346 347 form.standard-form#signup_form div.submit {348 float: left; 349 } 350 351 form.standard-form#signup_form div.signup-avatar {347 .standard-form#signup_form div.submit { 348 float: left; 349 } 350 351 .standard-form#signup_form div.signup-avatar { 352 352 margin-left: 15px; 353 353 margin-right: 0; 354 354 } 355 355 356 form.standard-form div.submit input {356 .standard-form div.submit input { 357 357 margin-left: 15px; 358 358 margin-right: 0; 359 359 } 360 360 361 form.standard-form div.radio ul {361 .standard-form div.radio ul { 362 362 margin: 10px 38px 15px 0; 363 363 } 364 364 365 form.standard-form #basic-details-section,366 form.standard-form #blog-details-section,367 form.standard-form #profile-details-section {368 float: right; 369 } 370 371 form.standard-form #profile-details-section {372 float: left; 373 } 374 375 form.standard-form #blog-details-section {365 .standard-form #basic-details-section, 366 .standard-form #blog-details-section, 367 .standard-form #profile-details-section { 368 float: right; 369 } 370 371 .standard-form #profile-details-section { 372 float: left; 373 } 374 375 .standard-form #blog-details-section { 376 376 clear: right; 377 377 }
Note: See TracChangeset
for help on using the changeset viewer.