Search Results for 'wordpress'
-
AuthorSearch Results
-
June 10, 2013 at 4:21 pm #165701
Emily Barney
ParticipantI have been having the same issue and it looks like I might have a solution – I’ll at least post what steps I’ve taken and what documentation I based them on. I am running WordPress 3.5.1 as a multisite subdirectory installation on a WIMP server.
I read over this page of documentation that seems to apply to the situation, and I added the
define ( ‘BP_ROOT_BLOG’, # ) line to the wp-config.php file in the root directory.
https://codex.buddypress.org/user/install-buddypress-on-a-secondary-blog/That didn’t solve it, so I went back to read over this page:
https://codex.buddypress.org/developer/customizing/changing-internal-configuration-settings/
I find the references to WPMU kind of confusing, since that hasn’t been used since before 3.0, I thought. And when I looked for the “bp-custom.php” file, I don’t see it anywhere in the recent installation. I found some of the same lines in the bp-loader.php file, but changes to that file didn’t change anything, since it seemed to be looking for a multiblog setting fist.So I went to this page and read through it:
https://codex.buddypress.org/bp_enable_multiblog/
That lead me to add this line to my wp-config.php file:
define ( ‘BP_ENABLE_MULTIBLOG’, true );I removed the changes I’d made to the bp-loader.php file to be sure there wouldn’t be problems later.
With both lines added to the wp-config.php file, I was finally able to go to this page and see the pages that belonged to the subsite rather than the root blog: {websiteurl}wp-admin/admin.php?page=bp-page-settings. I will need to check to see what changes this makes to the rest of my blogs, but at least we have a test site running Buddypress now.
Also, is there any chance these codex pages could get updated? There are all kinds of references to multisite or network or WMPU that are not entirely clear and, as I mention above, there are instructions to open files in the buddypress install that don’t exist by those names anymore.
June 10, 2013 at 6:51 am #165682In reply to: How to deal with registration
bp-help
Participant@ldjautobody
You can use the procedures from this tutorial:
http://wpmu.org/how-to-build-a-facebook-style-members-only-wordpress-buddypress-site/
You could have a different logged out menu in which you could include the register link.June 10, 2013 at 3:47 am #165678In reply to: video plugin wp 3.5.1
bp-help
Participant@jimahrens
These two plugins handle video different so make sure to read the descriptions and choose the one that best fits your requirement.
https://wordpress.org/plugins/buddypress-media/
https://wordpress.org/plugins/buddypress-activity-plus/June 9, 2013 at 10:37 am #165654In reply to: Add Custom Setting to Buddypress Settings
P
ParticipantThe problem is I need to modify the core files and add a plugin at the same time so a user can change the Throttling settings in his WordPress backend.
I really tried to simple write a plugin and skip the core files modifications, but it’s just not working out. Maybe you can help out here, I will post the 3 core file functions which I modified as well as the plugin code which I wrote. If you can figure out a way for me to not modify the core files and still get Throttling to work, share your code.
Modified files:
1- bp-activity\bp-activity-functions.php
function bp_activity_post_update( $args = '' ) { global $bp; $defaults = array( 'content' => false, 'user_id' => bp_loggedin_user_id() ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); if ( empty( $content ) || !strlen( trim( $content ) ) ) return false; if ( bp_is_user_inactive( $user_id ) ) return false; <strong>$floodTest = bp_core_check_for_flood ($user_id); if (!$floodTest) return "flood";</strong> // Record this on the user's profile $from_user_link = bp_core_get_userlink( $user_id ); $activity_action = sprintf( __( '%s posted an update', 'buddypress' ), $from_user_link ); $activity_content = $content; $primary_link = bp_core_get_userlink( $user_id, false, true ); // Now write the values $activity_id = bp_activity_add( array( 'user_id' => $user_id, 'action' => apply_filters( 'bp_activity_new_update_action', $activity_action ), 'content' => apply_filters( 'bp_activity_new_update_content', $activity_content ), 'primary_link' => apply_filters( 'bp_activity_new_update_primary_link', $primary_link ), 'component' => $bp->activity->id, 'type' => 'activity_update' ) ); $activity_content = apply_filters( 'bp_activity_latest_update_content', $content ); // Add this update to the "latest update" usermeta so it can be fetched anywhere. bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $content ) ); do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id ); return $activity_id; }2- bp-core\bp-core-moderation.php
function bp_core_check_for_flood( $user_id = 0 ) { <strong>// Option disabled. No flood checks. if ( !$throttle_time = bp_get_option( 'bt_activity_time' ) ) return false; // Bail if no user ID passed if ( !$user_id ) return false; $last_posted = get_user_meta( $user_id, '_bp_last_posted', true ); if ( !$last_posted ) { $last_posted = time(); add_user_meta( $user_id, '_bp_last_posted', $last_posted); return true; } else { if ( ( time() < ( $last_posted + $throttle_time ) ) && !current_user_can( 'throttle' ) ) { update_user_meta($user_id,'_bp_last_posted',time()); return false; } else { update_user_meta($user_id,'_bp_last_posted',time()); return true; } }</strong> }3- bp-themes\bp-default\_inc\ajax.php
function bp_dtheme_post_update() { // Bail if not a POST action if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) return; // Check the nonce check_admin_referer( 'post_update', '_wpnonce_post_update' ); if ( ! is_user_logged_in() ) exit( '-1' ); if ( empty( $_POST['content'] ) ) exit( '-1<div id="message" class="error"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' ); $activity_id = 0; if ( empty( $_POST['object'] ) && bp_is_active( 'activity' ) ) { $activity_id = bp_activity_post_update( array( 'content' => $_POST['content'] ) ); } elseif ( $_POST['object'] == 'groups' ) { if ( ! empty( $_POST['item_id'] ) && bp_is_active( 'groups' ) ) $activity_id = groups_post_update( array( 'content' => $_POST['content'], 'group_id' => $_POST['item_id'] ) ); } else { $activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] ); } if ($activity_id == "flood") { $bt_activity_throttle_time = bp_get_option ('bt_activity_time'); $bt_activity_message = bp_get_option( "bt_activity_message" ); $msg = ( $bt_activity_message ) ? $bt_activity_message : "You have to wait to post again"; exit( '-1<div id="message" class="error"><p>' . __( $msg, 'buddypress' ) . '</p></div>' ); } if ( empty( $activity_id ) ) exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update, please try again.', 'buddypress' ) . '</p></div>' ); if ( bp_has_activities ( 'include=' . $activity_id ) ) { while ( bp_activities() ) { bp_the_activity(); locate_template( array( 'activity/entry.php' ), true ); } } exit; }4- The Buddypress Throttling Plugin Code
<?php add_action( 'admin_menu', 'plugin_menu' ); function plugin_menu() { // add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function); add_options_page( 'Buddypress Throttling | Settings', 'Buddypress Throttling', 'manage_options', 'buddypress_throttling', 'buddypress_throttling_options' ); } function buddypress_throttling_options() { //must check that the user has the required capability if (!current_user_can('manage_options')) { WP_die( __('You do not have sufficient permissions to access this page.') ); } // variables for the field and option names $hidden_field_name = 'submit_hidden'; // See if the user has posted us some information // If they did, this hidden field will be set to 'Y' if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) { // Activity $bp_activity_time_val = ( intval($_POST["bt_activity_time"]) <= 0 ) ? 0 : $_POST ["bt_activity_time"]; update_option( "bt_activity_time", $bp_activity_time_val ); $bp_activity_message_val = ( isset($_POST["bt_activity_message"]) && $_POST["bt_activity_message"] != "" ) ? $_POST["bt_activity_message"] : "Please wait before posting again"; update_option( "bt_activity_message", $bp_activity_message_val ); ?> <div class="updated"><p><strong><?php _e('Settings saved.', 'menu-test' ); ?></strong></p></div> <?php } // Activity read values $bt_activity_time = get_option( "bt_activity_time" ); $bt_activity_time = (intval($bt_activity_time) <= 0) ? 0 : $bt_activity_time; $bt_activity_message = get_option( "bt_activity_message" ); $bt_activity_message = ($bt_activity_message) ? $bt_activity_message : "Please wait before posting again"; echo '<div class="wrap">'; echo "<h2>" . __( 'Buddypress Throttling Settings', 'menu-test' ) . "</h2>"; ?> <form name="form1" method="post" action=""> <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y"> <div class="bt-plugin"> <style> .bt-plugin span { display: inline-block; width: 120px; margin-left: 20px } .bt-plugin textarea {width: 400px} </style> <h3><?php _e("On Activity Page: ", 'menu-test' ); ?></h3> <p><span>Throttling Time:</span><input type="text" name="bt_activity_time" value="<?php echo $bt_activity_time; ?>" size="20"> (in seconds)</p> <p><span>Message:</span><textarea name="bt_activity_message" rows="3"><?php echo $bt_activity_message; ?></textarea></p> </div> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> </p> </form> </div> <?php }Test it out locally, just replace the specified functions in these files with the functions I wrote, add the plugin code in a php file and save it under your Plugins directory (and activate it in the backend). The Plugin code will allow you to set the number of seconds for throttling as well as the message the user will see when he’s flooding.
Put this puzzle pieces together and you got Flooding control (for the activity page for now), which can easily be done for friend requests @bphelp).
June 8, 2013 at 11:55 pm #165629In reply to: How to Hide Members Page But Not Disable It?
@mercime
ParticipantMembers page is not visible in the top menu bar
@waterfiend check out http://wpmu.org/how-to-build-a-facebook-style-members-only-wordpress-buddypress-site/ or have a look at different solutions posted for a private BP site at https://buddypress.org/support/topic/protecting-buddypress-pages-from-non-logged-in-users/June 8, 2013 at 11:31 pm #165626In reply to: Adding a container to the profiles?
@mercime
Participant@tudmak This is the file you should be adding the HTML/CSS to https://buddypress.trac.wordpress.org/browser/tags/1.7.2/bp-templates/bp-legacy/buddypress/members/single/member-header.php
or you can use bp_before_member_header() or bp_after_member_header() to add the HTML and position the item where you want it in your stylesheetJune 8, 2013 at 7:06 pm #165604In reply to: Idea: Stopping Spammers with Sandbox
bp-help
Participant@synaptic
BuddyPress Registration Options is similar to this idea but it only allows a user to fill out their profile and upload an avatar until the admin approves their account. It doesn’t allow posting to the activity stream however. IMHO if a user doesn’t take the time to fill out their profile then it is a good indicator that they are a spammer but I can see the value in your idea and would I would like to see this functionality in a plugin.
https://wordpress.org/plugins/bp-registration-options/June 7, 2013 at 10:11 pm #165574In reply to: Remove profile links
Yukon Cornelius
ParticipantI was having the same problem, and it wouldn’t work for me with any of the suggested hacks in bp-custom.php
I found a thread in the WordPress forum on the same topic which worked. Just put:
remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9);in your theme functions.php
Hope that helps.
June 7, 2013 at 9:12 pm #165572In reply to: Error in saving profile but data is saved
devrap
ParticipantI’m having this same issue, but on a newer version of BP (1.7.1). I’ve submitted a ticket to report this bug, https://buddypress.trac.wordpress.org/ticket/5046#ticket. The error doesn’t occur if *all* fields of the extended profile are filled out.
June 7, 2013 at 6:43 pm #165564In reply to: Add Custom Setting to Buddypress Settings
modemlooper
ModeratorYou shouldn’t edit those files. You can add settings with a plugin. If you want that as a core feature then post on http://buddypress.trac.wordpress.org then submit a patch of working code.
June 7, 2013 at 8:05 am #165527In reply to: BP-Default fonts
@mercime
ParticipantJune 7, 2013 at 5:43 am #165523In reply to: Registration Emails Not Received
@mercime
Participant@thecrow72 basically, BuddyPress uses the WP email functions for its registration process. Deactivate BuddyPress, bbPress and other plugins then check your WP registration/activation emails, etc. If it’s not working, then please resolve your issue at https://wordpress.org/support/forum/how-to-and-troubleshooting
Before activating BuddyPress, read https://codex.buddypress.org/user/before-installing/
Good luck!
June 7, 2013 at 4:37 am #165517In reply to: problem sidebars theme Nebraska
@mercime
Participantthe plugin is “breaking” the layout because its using different content tags
@millo it’s more like your theme is using proprietary templating system. BuddyPress is compatible with nearly all of the WordPress themes in the market.BuddyPress uses the page.php file to render BP components. Open up your theme’s page.php file and Save As > buddypress.php and ask your theme developer to change the respective proprietary tags to show the_title and the_content in source.
After that’s done, upload buddypress.php file into your theme folder in server.
June 7, 2013 at 2:55 am #165506In reply to: [Resolved] Buddypress and BBPress, same avatar?
@mercime
Participant@adamfratino Thank you for posting back about the cause of the bbPress avatar issue. Please post at plugin’s support forums about the bbPress avatars issue when BuddyPress and Social Login are activated. https://wordpress.org/support/plugin/oa-social-login
@mercime
ParticipantJune 7, 2013 at 1:09 am #165498In reply to: [Resolved] Buddypress and BBPress, same avatar?
adamfratino
ParticipantWordpress 3.5.1, Buddypress 1.7.2, using Bonpress free theme from WPZOOM. I just realized there might be a conflict with WordPress Social Login, which is pulling avatar data from Facebook/Twitter when registering new members, or just when logging them back in with the social options.
When I shut off WordPress Social Login, the Buddypress avatars show up in BBPress. When I turn social login back on, the original avatars from when the user signed up take over the BBPress avatars.
June 6, 2013 at 11:04 pm #165490In reply to: [Resolved] Ajax?
Cidade Sonho
ParticipantSorry but the logout of admin bar don´t do this issue.
Only the logout of sidebar make this issue.
I remove the logout button on sidebar in my two domain and now it´s working!
sorry about the english
cheers from Brazil, love BuddyPress. Keep Going on Excelent Work of WordPress
June 6, 2013 at 5:30 pm #165468In reply to: Notify group members doesn't work.
Famous
ParticipantThank you for making it a little more clear.
Is there a place to read about how buddypress is supposed to function, or its intended use for each module, kinda like JetPack information?
Are there any intentions to make the groups (notify group members of site activity) interactive in the near future?
If not any time soon what is your best (weekly digest plugin or a post notification plugin for wordpress) recommendation?June 6, 2013 at 4:59 pm #165466In reply to: Call specific User profile fields to a page.
Kingrammer
Participantsome more details if they will help,
It’s a brand new install of wordpress and buddypress. a multisite install, subdomains.
The only other plugin is Theme My Login. Custom Community Theme being used at the mo.
Would someone give me a nudge? Thank you so much to anyone with suggestions. Learning Buddypress and reading through the Ofcom radio broadcasting guides at the same time are pickling my brain!1
June 6, 2013 at 11:29 am #165453In reply to: Action for Removing Member from group
ravibarnwal
Participantgroups_remove_member how to used in my plugin I am not able to used it.
Please explain .
I want to remove member from a group when new user registered.
I have received group_id and user_id from database. then I want to remove all member from that group without group admin.
I used function ‘groups_remove_member’ in my own plugin .
I am new in wordpress and buddypress coding.
My code is
if (!function_exists(‘auto_join’)) {
function update_auto_join_status($user_id) {
global $wpdb, $bp;// get list of groups to auto-join.
$group_list = $wpdb->get_results(“SELECT * FROM {$bp->groups->table_name} WHERE auto_join = 1″);foreach ($group_list as $group_auto_join) {
$members_count = groups_get_groupmeta( $group_auto_join->id, ‘total_member_count’ );
if($members_count < 5)
{
groups_accept_invite( $user_id, $group_auto_join->id );
}
else
{
group_auto_join_hidden_group($user_id, $group_auto_join->id);
}
}
$wpdb->query(“UPDATE {$wpdb->users} SET auto_join_complete = 1 WHERE ID = {$user_id}”);
}add_action( ‘user_register’, ‘auto_join’);
}function group_auto_join_hidden_group($user_id, $group_id)
{global $wpdb, $bp;
$utn = $wpdb->users; // Create a shortcut variable for wordpress users table.
$gmtn = $bp->groups->table_name . “_members”; // Create a shortcut variable for buddypress groups_members table.$mysql = “SELECT user_id FROM $gmtn WHERE group_id=$group_id”;
$results = $wpdb->get_results( $mysql);
foreach ( $results as $user) {
groups_remove_member($user->user_id, $group_id);}
}
my auto join working well but I am not able to remove member
Please help me what is wrong?June 6, 2013 at 8:57 am #165449darkintruder
Participant@shiftyRZA i saw that u posted the issue here https://buddypress.trac.wordpress.org/ticket/4586#comment:7 again. Thanks! Boone answered and changed the milestone from 1.7 to 1.8. Does that mean, that the BP-Team is looking for the template-loading-delay solution and tries to come up with a fix until 1.8 is released?
If so, is there any “dirty code” that might fix the problem locally until then? My problem is, that i’m close to releasing a business-site which can’t afford such phenomena in the admin area. So if the BP-Team is working on a fix, i’ll wait with my release until then. If there won’t be a fix in the next months, i’ll have to find other solutions for the features i wanna offer :-S
Thanks again for your time … Much appreciated!
June 6, 2013 at 8:25 am #165447marcoarena
ParticipantSorry, I just found a ticket is open here: https://bbpress.trac.wordpress.org/ticket/2279
June 6, 2013 at 7:37 am #165445In reply to: How to limit the characters of the profile bio.
Carvill
ParticipantHas anyone been able to come up with a simple method for this?
Really need a solution, I have discovered https://wordpress.org/plugins/limit-bio/ and about to test, but I am assuming it wont work!
June 6, 2013 at 12:29 am #165434In reply to: Best setup for this kind of site
Biggerplay
ParticipantJune 5, 2013 at 10:20 pm #165430In reply to: Warning Empty Delimiter on line 864
aces
ParticipantAccording to https://buddypress.org/support/topic/buddypress-1-7-is-now-available-2/page/2/#post-161513 a similar error message was caused by an un-updated plugin: https://wordpress.org/extend/plugins/buddypress-followers/ ?
-
AuthorSearch Results