Forum Replies Created
-
Author
-
chazzzzyParticipant
OK.. I solved this..
Grab the file in the main theme folder kleo/bbpress/form-search.php
Copy it to your child theme kleo-child/bbress/form-search.php
And change the following:
On line 16, change from:
COPY CODE<input tabindex="<?php bbp_tab_index(); ?>" type="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" />
to:
COPY CODE<input tabindex="<?php bbp_tab_index(); ?>" type="text" placeholder="<?php _e( 'Search Forums...', 'bbpress' ); ?>" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" />
You guys might want to change this file in the theme so that there is consistency in the looks.
Thanks!
Charles
October 29, 2014 at 18:35 in reply to: Link to READ a notification marks it as READ, doesn't open it #33475chazzzzyParticipantOf course I will try out your plugin!
I didn’t know what to do with the function above, so I just commented out the whole Actions areas on buddypress/members/single/notifications/notifications-loop.php
COPY CODE<table class="notifications"> <thead> <tr> <th class="icon"></th> <th class="title"><?php _e( 'Notification', 'buddypress' ); ?></th> <th class="date"><?php _e( 'Date Received', 'buddypress' ); ?></th> <!-- <th class="actions"><?php _e( 'Actions', 'buddypress' ); ?></th> --> </tr> </thead> <tbody> <?php while ( bp_the_notifications() ) : bp_the_notification(); ?> <tr> <td></td> <td class="notify-text"><?php bp_the_notification_description(); ?></td> <td class="notify-date"><?php bp_the_notification_time_since(); ?></td> <!-- <td class="notify-actions"><?php bp_the_notification_action_links(); ?></td> --> </tr> <?php endwhile; ?> </tbody> </table>
Thanks!
CharleschazzzzyParticipantOK.. I fixed it… I added :gt(0) to the links.. to get the following code:
COPY CODE/* Buddypress profile - scroll page below when clicking navigation */ add_action('wp_footer', 'kleo_bp_add_link_nav'); function kleo_bp_add_link_nav() { echo '<script>jQuery(document).ready(function() { ' . "\n\t" . 'jQuery("#item-nav .item-list-tabs a:gt(0), #item-body #subnav a:gt(0)").each(function() {' . "\n\t\t" . 'jQuery(this).attr("href",jQuery(this).attr("href")+"#item-nav");' . "\n\t" . '}); ' . "\n" . '});</script>' . "\n"; }
October 25, 2014 at 23:40 in reply to: Users on LAPTOPS using the Buddypress area think site is broken #33073chazzzzyParticipantOK.. I found the following to address the Sub Nav items… I took your code and added the subnav items.. resulting in the following longer code. You replaced bp_get_displayed_user_nav() with my_bp_get_displayed_user_nav()
I also replaced bp_get_options_nav() with my_bp_get_options_nav()
And I then had to copy over all the php files in buddypress/members/single over to my child theme.
And I replaced all instances of bp_get_options_nav() with my_bp_get_options_nav()
It required me to change around 12 pages.. which is a pain!
Here is the code I also added to my functions.php after your code:
COPY CODEfunction my_bp_get_options_nav() { global $bp; // If we are looking at a member profile, then the we can use the current component as an // index. Otherwise we need to use the component's root_slug $component_index = !empty( $bp->displayed_user ) ? bp_current_component() : bp_get_root_slug( bp_current_component() ); if ( !bp_is_single_item() ) { if ( !isset( $bp->bp_options_nav[$component_index] ) || count( $bp->bp_options_nav[$component_index] ) < 1 ) { return false; } else { $the_index = $component_index; } } else { if ( !isset( $bp->bp_options_nav[bp_current_item()] ) || count( $bp->bp_options_nav[bp_current_item()] ) < 1 ) { return false; } else { $the_index = bp_current_item(); } } // Loop through each navigation item foreach ( (array) $bp->bp_options_nav[$the_index] as $subnav_item ) { if ( !$subnav_item['user_has_access'] ) continue; // If the current action or an action variable matches the nav item id, then add a highlight CSS class. if ( $subnav_item['slug'] == bp_current_action() ) { $selected = ' class="current selected"'; } else { $selected = ''; } // List type depends on our current component $list_type = bp_is_group() ? 'groups' : 'personal'; // echo out the final list item echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="' . $subnav_item['css_id'] . '-' . $list_type . '-li" ' . $selected . '><a id="' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '#item-body" rel="nofollow">' . $subnav_item['name'] . '</a></li>', $subnav_item ); } }
I’m sure there is an easier way to change this stuff.. as it doesn’t work on the Group navigation items within the Group pages.. buy hey.. at lease I won’t have people yelling at me that the site doesn’t work when they are on a laptop!
Thanks again sharmstr!
Attachments:
You must be logged in to view attached files.October 22, 2014 at 22:12 in reply to: Attachment and Post Buttons for "What's new posts" on groups were hidden #32642chazzzzyParticipantsharmstr, you are the MAN! (If you are a man.) Works like a charm!
I updated it a little to fix it on the Activity Page as well:
COPY CODEadd_action( 'wp_enqueue_scripts', 'load_buddypress_js' ); function load_buddypress_js () { if (bp_is_group() || is_page( 'activity' )) { wp_enqueue_script('buddypress_query',plugins_url() . '/buddypress/bp-core/js/jquery-query.min.js',array("jquery")); wp_enqueue_script('buddypress_members',plugins_url() . '/buddypress/bp-core/js/widget-members.min.js',array("jquery")); wp_enqueue_script('buddypress_cookie',plugins_url() . '/buddypress/bp-core/js/jquery-cookie.min.js',array("jquery")); wp_enqueue_script('buddypress_scroll',plugins_url() . '/buddypress/bp-core/deprecated/js/jquery-scroll-to.min.js',array("jquery")); wp_enqueue_script('buddypress_js',get_template_directory_uri() . '/buddypress/js/buddypress.min.js',array("jquery")); } }
By the way.. I LOVE street art.. always doing stuff with it over here are Underground Network. Shoot me an email at the contact on my website as I’d like to have your contact info.
@Dave.. you too as well..October 22, 2014 at 19:47 in reply to: Attachment and Post Buttons for "What's new posts" on groups were hidden #32623chazzzzyParticipantsharmstr.. slight typo in your code.. should be ‘/buddypress…’ the / before buddypress.
I added the code.. then it of course breaks things.. the comments below the text box won’t load and I get the following error when looking at the console:
COPY CODE[Error] TypeError: undefined is not a function (evaluating 'jq.cookie("bp-activity-oldestpage",1,{path:"/"})') bp_init_activity (buddypress.min.js, line 1) (anonymous function) (buddypress.min.js, line 1) j (jquery.js, line 2) fireWith (jquery.js, line 2) ready (jquery.js, line 2) J (jquery.js, line 2)
-
AuthorPosts