Search Results for 'buddypress'
-
AuthorSearch Results
-
October 1, 2013 at 1:59 am #172074
In reply to: Function to update databse fields
xKroniK13x
ParticipantWell if you have access to a database, you can easily change the values. The coding would look something like this, I wrote it but didn’t test it. You’d need BP global enabled to fetch the User ID, and you’d also have to set the field ID to change as you needed it to, or just make a loop that iterates through all the available fields. But this will get you on the right path, I think.
<?php if(isset($_POST['update'])) { $dbhost = 'DB_HOST'; //Host of BuddyPress Database $dbuser = 'DB_USER'; //Username of BuddyPress Database $dbpass = 'DB_PASS'; //Password of BuddyPress Database $dbname = 'DB_NAME'; //Name of BuddyPress Database $field_id = '2'; //ID of the field you are updating $user_id = $bp->loggedin_user->userdata->ID; //Must have $bp global enabled, can probably grab the user ID in a different fashion if needed $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $input = $_POST['input']; //This query will update the field set with the ID set above, you could have easily change it via coding, I just made it static for ease $sql = "UPDATE wp_bp_xprofile_data ". "SET value = $input ". "WHERE field_id = $field_id AND user_id = $user_id" ; mysql_select_db($dbname); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "Updated data successfully\n"; mysql_close($conn); } else { ?> <form method="post" action="<?php $_PHP_SELF ?>"> <table width="400" border="0" cellspacing="1" cellpadding="2"> <tr> <td width="100">Field data:</td> <td><input name="input" type="text" id="input" value="<?php xprofile_get_field_data($field_id); ?>"></td> </tr> <tr> <tr> <td width="100"> </td> <td> </td> </tr> <tr> <td width="100"> </td> <td> <input name="update" type="submit" id="update" value="Update"> </td> </tr> </table> </form> <?php } ?>October 1, 2013 at 1:54 am #172073In reply to: Changing Name of "Groups"
bp-help
Participant@zpenacho
The easiest and update proof way is:
https://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urls/September 30, 2013 at 11:49 pm #172069In reply to: Enable BuddyPress to WordPress profile syncing
Hugo Ashmore
Participantah hmm yes, so I was a little wrong 🙂 should have known this, just goes to show… did some work a while back mapping custom tables across to user tables then matching to bp profiles, probably missed these functions at the time.
September 30, 2013 at 11:35 pm #172068In reply to: Enable BuddyPress to WordPress profile syncing
Henry
MemberSpent the last 30 minutes doing some digging and found an old thread with a detailed explanation from Boone:
https://buddypress.org/support/topic/please-help-me-understand-a-wordpressbp-feature/#post-97470As far as I can tell, two functions perform the ‘syncing’ of data
xprofile_sync_wp_profile()Syncs Xprofile data (nickname, first name and last name) to the standard built in WordPress profile data
xprofile_sync_bp_profile()Syncs the standard built in WordPress profile data to XProfile
That’s about it. Nothing exciting really, just two nice little housekeeping functions
September 30, 2013 at 9:58 pm #172064In reply to: Enable BuddyPress to WordPress profile syncing
Hugo Ashmore
ParticipantIt syncs your MS sites or so I thought, but I may well be wrong.
September 30, 2013 at 9:19 pm #172063In reply to: Enable BuddyPress to WordPress profile syncing
September 30, 2013 at 9:14 pm #172062In reply to: Duplicate Avatars in Activity Stream
Uncle Jimmy
Participant@Shanebp and @mercime [RESOLVED]
The following file was responsible. Comments marked !!!IMPORTANT!!! are where I made changes.
wp-content/plugins/gantry-buddypress/bpt-functions.php
<?php /** * @version 1.3 November 8, 2012 * @author RocketTheme, LLC http://www.rockettheme.com * @copyright Copyright © 2007 - 2012 RocketTheme, LLC * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ // Sets up WordPress theme for BuddyPress support. function gantry_bp_tpack_theme_setup() { global $bp, $gantry_bp_path; // Load the default BuddyPress AJAX functions if it isn't explicitly disabled require_once( $gantry_bp_path . '/_inc/ajax.php' ); if ( !is_admin() ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED MEMBER HEADER DUPLICATE BUTTONS Friends/Public Message/Private Message]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO REDUCED QUADRUPAL MESSAGES/COMMENTS/REPLIES TO DUPLICATES]] ///!!!IMPORTANT!!!/// // Register buttons for the relevant component templates // Friends button //if ( bp_is_active( 'friends' ) ) //add_action( 'bp_member_header_actions', 'bp_add_friend_button' ); // Activity button //if ( bp_is_active( 'activity' ) ) //add_action( 'bp_member_header_actions', 'bp_send_public_message_button' ); // Messages button //if ( bp_is_active( 'messages' ) ) //add_action( 'bp_member_header_actions', 'bp_send_private_message_button' ); // Group buttons if ( bp_is_active( 'groups' ) ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE GROUP BUTTON Join/Leave ]] ///!!!IMPORTANT!!!/// //add_action( 'bp_group_header_actions', 'bp_group_join_button' ); add_action( 'bp_group_header_actions', 'bp_group_new_topic_button' ); add_action( 'bp_directory_groups_actions', 'bp_group_join_button' ); } // Blog button if ( bp_is_active( 'blogs' ) ) add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' ); } } add_action( 'after_setup_theme', 'gantry_bp_tpack_theme_setup', 11 ); // Enqueues BuddyPress JS and related AJAX functions function gantry_bp_enqueue_scripts() { // Enqueue the global JS - Ajax will not work without it wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), bp_get_version() ); // Add words that we need to use in JS to the end of the page so they can be translated and still used. $params = array( 'my_favs' => __( 'My Favorites', 'buddypress' ), 'accepted' => __( 'Accepted', 'buddypress' ), 'rejected' => __( 'Rejected', 'buddypress' ), 'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ), 'show_x_comments' => __( 'Show all %d comments', 'buddypress' ), 'show_all' => __( 'Show all', 'buddypress' ), 'comments' => __( 'comments', 'buddypress' ), 'close' => __( 'Close', 'buddypress' ), 'view' => __( 'View', 'buddypress' ), 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), ); wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params ); // Maybe enqueue comment reply JS if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_scripts'); // Enqueues BuddyPress basic styles function gantry_bp_enqueue_styles() { global $gantry_bp_url; // Do not enqueue CSS if it's disabled if (get_option( 'gantry_bp_disable_css' )) return; // BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) ) { $stylesheet = 'bp.css'; // Bump this when changes are made to bust cache $version = '20110918'; } // Add the wireframe BP page styles wp_enqueue_style( 'bp', $gantry_bp_url . '/' . $stylesheet, array(), $version ); // Enqueue RTL styles for BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() ) wp_enqueue_style( 'bp-rtl', $gantry_bp_url . '/' . 'bp-rtl.css', array( 'bp' ), $version ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_styles'); // Gantry BuddyPress plugin doesn't use bp-default's built-in sidebar login block, // so during no access requests, we need to redirect them to wp-login for // authentication. if (!function_exists('gantry_bp_use_wplogin')) { function gantry_bp_use_wplogin() { // returning 2 will automatically use wp-login return 2; } add_filter('bp_no_access_mode', 'gantry_bp_use_wplogin' ); } // Hooks into the 'bp_get_activity_action_pre_meta' action to add secondary activity avatar support function gantry_bp_activity_secondary_avatars( $action, $activity ) { // sanity check - some older versions of BP do not utilize secondary activity avatars if ( function_exists( 'bp_get_activity_secondary_avatar' ) ) : switch ( $activity->component ) { case 'groups' : case 'friends' : // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, -$position - 2, 0 ); } break; } endif; return $action; } ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE AVTIVITY STREAM AVATARS]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO FIXED DUPLICATE MESSAGES/COMMENTS/REPLIES]] ///!!!IMPORTANT!!!/// //add_filter('bp_get_activity_action_pre_meta', 'gantry_bp_activity_secondary_avatars', 10, 2);Thank you for your time and attention, please let me know if I could’ve done this better.
God Bless
September 30, 2013 at 9:10 pm #172059Sean Infinitee
Participantps-thanks in advance for any advice!!
September 30, 2013 at 9:09 pm #172058Sean Infinitee
Participantbump! anyone?
September 30, 2013 at 8:35 pm #172055In reply to: Groups Directory button issue
GhostPool
ParticipantThanks for a response. I’m not fiddling around with the templates, nor am I trying to adjust the text labels. I’m using a custom theme so naturally BuddyPress is using the theme’s own page.php template. The “Create A Group” button displays just fine on the “Groups” page, but when I actually go to the “Create A Group” page the button is switched.
September 30, 2013 at 6:25 pm #172050In reply to: Buddypress blocks flexslider
fotant
ParticipantNo I use other theme and flexslider isn’t a plugin but jquery… and I believe it is a BuddyPress issue, because I searched through internet and found that others have similar problems with this plugin, but unfortunately I didn’t find a right solution. Any help is appreciated…
September 30, 2013 at 6:19 pm #172049In reply to: Buddypress blocks flexslider
bp-help
Participant@fotant
This is not really a BuddyPress issue! Why not pose this question on the plugins support forum? If memory serves me correct this is a Woo Themes plugin!September 30, 2013 at 6:13 pm #172048In reply to: Facebook Like, site-wide, and server stress
bp-help
Participant@caming
Using a shared server is not a good idea! Typically most shared servers will remove your site if it uses 20% of its resources because its to hard on the CPU! As far as plugins go, a well written plugin doesn’t really bog down a site anymore than BuddyPress itself would!September 30, 2013 at 6:06 pm #172047In reply to: Groups Directory button issue
bp-help
ParticipantWhy would you fiddle around with the templates code when a more simple update proof solution is available?
Please review: https://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urls/September 30, 2013 at 4:12 pm #172040In reply to: Unable to add user to group
wernerk
Participant@elangley: just had a look at the status of this issue: https://bbpress.trac.wordpress.org/ticket/2425
It seems it has been closed there, as it was submitted on the bbPress, rather than Buddypess Trac.I submitted this very issue now to the Buddypress Trac: https://buddypress.trac.wordpress.org/ticket/5187 (rather than ask you to do this, I just copied your original submission)
September 30, 2013 at 2:56 pm #172036In reply to: The Best Cache'ing solution for BP?
hughshields
ParticipantHi Paul,
In the Buddypress Codex there is information last updated 2 years ago by Sarah Gooding that recommends the two above points that I mentioned for caching. Is this information out of date?
Also the codex points to a support thread:https://buddypress.org/support/topic/configuring-w3-total-cache-with-buddypress/
This support thread is also a couple of years old and ends with no solution or resolution to BP caching and a lot of frustrated people.
Is it safe to say that the caching plugins do not provide a good solution for Buddypress? And that a server side caching solution is the best option?
I am self hosted on a VPN so for me this is not good news.
September 30, 2013 at 1:01 pm #172025In reply to: Buddypress Activity Stream Blog Update
jslucas
ParticipantI am wondering if this is the case or is there a solution to this. Thank you very much! ((:
September 30, 2013 at 12:25 pm #172024In reply to: Enable BuddyPress to WordPress profile syncing
Hugo Ashmore
ParticipantIt’s blog posts to stream isn’t it, tracks your sites posts.
September 30, 2013 at 10:32 am #172020In reply to: Bugs between bbpress and Buddypress
seamtv
ParticipantI can now confirm that there are problems between the integration of bbPress 2.4 and buddypress 1.81.
It turns out that there’s a bug in bbPress 2.4 that does not allow the admin to make a Forum ‘private’ or ‘hidden’. At the moment, the only workaround is to use the bulk edit facility to apply the ‘private’ setting to a forum (but, not, sadly the ‘hidden’ attribute as of yet).
In other words, if you go into the forum setting for the individual forum on the back-end and change the attribute there, it won’t stick. The forum comes back again as ‘Public’.
I used the build editor to change my forum to ‘Private’ and that stopped the replies to topic posts from being broadcast to everyone in the buddypress sitewide activity page. Now, I’m waiting for the ability to make the forums ‘hidden’ for extra security. In the meantime, I’ve been using s2member to lock down the content of the bbPress Group forum. This ONLY works for Group forums, because their topics have a forum-specific URI structure (so URI-restrictions can be used; e.g. ‘/group/<name of group>/forum/’)… whereas non-Group forums just have the ‘/topic/’ URI which is sitewide and cannot be restricted by a particular forum name. This is lamentable, as bbPress is very hard to lock-down otherwise.
It’s taken me many hours to track down all of these niggly problems, which is frustrating, since bbPress and buddypress are meant to be integrated now. So, it seems as if the integration is mucky.
Given all the user confusion regarding forum attributes in bbPress and forum security in buddypress, I would really love to see the development teams come up with a simple, unified interface for managing memberships and access restrictions. Otherwise, we’ll all end up chasing settings in different places, without really understanding their interplay.September 30, 2013 at 10:28 am #172019seamtv
ParticipantThis is definitely part of the problem that I’m having. It turns out that there’s a bug in bbPress 2.4 that does not allow the admin to make a Forum ‘private’ or ‘hidden’. At the moment, the only workaround is to use the bulk edit facility to apply the ‘private’ setting to a forum (but, not, sadly the ‘hidden’ attribute as of yet).
In other words, if you go into the forum setting for the individual forum on the back-end and change the attribute there, it won’t stick. The forum comes back again as ‘Public’.
I used the build editor to change my forum to ‘Private’ and that stopped the replies to topic posts from being broadcast to everyone in the buddypress sitewide activity page. Now, I’m waiting for the ability to make the forums ‘hidden’ for extra security. In the meantime, I’ve been using s2member to lock down the content of the bbPress Group forum. This ONLY works for Group forums, because their topics have a forum-specific URI structure (so URI-restrictions can be used; e.g. ‘/group/<name of group>/forum/’)… whereas non-Group forums just have the ‘/topic/’ URI which is sitewide and cannot be restricted by a particular forum name. This is lamentable, as bbPress is very hard to lock-down otherwise.
It’s taken me many hours to track down all of these niggly problems, which is frustrating, since bbPress and buddypress are meant to be integrated now. So, it seems as if the integration is mucky.
Given all the user confusion regarding forum attributes in bbPress and forum security in buddypress, I would really love to see the development teams come up with a simple, unified interface for managing memberships and access restrictions. Otherwise, we’ll all end up chasing settings in different places, without really understanding their interplay.September 30, 2013 at 9:22 am #172018In reply to: Bugs between bbpress and Buddypress
seamtv
ParticipantI tried running the Tools > Forums but it only solved the problem of new topic posts, but not replies to those posts. Here’s my rundown of the situation:
I think the problem has to do with buddypress – bbPress integration.
The bbPress Group Forums appear to be set to ‘Open’ by default, even if they are hidden within buddypress. In fact, I cannot alter this. I tried changing my secret forum to ‘hidden’ within bbPress (2.4) and it won’t save the change – it always comes back as ‘open’.
Therefore, it’s up to buddypress to manage the privacy of the forum. It seems to be doing this with new topic posts (I can confirm that hide_sitewide in the activity stream table is “1” for new posts). The problem is that if someone replies to that post, the hide_sitewide for that reply is set to “0”, even though it’s inside of a ‘hidden’ group forum. To me, this is a serious security breach, as it exposes the forum name, the original topic name, and the contents of the reply in EVERYONE’s Activity stream, whether they are logged in or not, a member of the hidden forum or not.September 30, 2013 at 9:21 am #172017seamtv
ParticipantActually, this problem is not resolved and appears to be pretty bad. Here’s my rundown:
I think the problem has to do with buddypress – bbPress integration.
The bbPress Group Forums appear to be set to ‘Open’ by default, even if they are hidden within buddypress. In fact, I cannot alter this. I tried changing my secret forum to ‘hidden’ within bbPress (2.4) and it won’t save the change – it always comes back as ‘open’.
Therefore, it’s up to buddypress to manage the privacy of the forum. It seems to be doing this with new topic posts (I can confirm that hide_sitewide in the activity stream table is “1” for new posts). The problem is that if someone replies to that post, the hide_sitewide for that reply is set to “0”, even though it’s inside of a ‘hidden’ group forum. To me, this is a serious security breach, as it exposes the forum name, the original topic name, and the contents of the reply in EVERYONE’s Activity stream, whether they are logged in or not, a member of the hidden forum or not.September 30, 2013 at 9:19 am #172016seamtv
ParticipantI think the problem has to do with buddypress – bbPress integration.
The bbPress Group Forums appear to be set to ‘Open’ by default, even if they are hidden within buddypress. In fact, I cannot alter this. I tried changing my secret forum to ‘hidden’ within bbPress (2.4) and it won’t save the change – it always comes back as ‘open’.
Therefore, it’s up to buddypress to manage the privacy of the forum. It seems to be doing this with new topic posts (I can confirm that hide_sitewide in the activity stream table is “1” for new posts). The problem is that if someone replies to that post, the hide_sitewide for that reply is set to “0”, even though it’s inside of a ‘hidden’ group forum. To me, this is a serious security breach, as it exposes the forum name, the original topic name, and the contents of the reply in EVERYONE’s Activity stream, whether they are logged in or not, a member of the hidden forum or not.September 30, 2013 at 9:00 am #172015noizeburger
Participant@bp-help
I don’t think you have to explain someone why you do or don’t do things. As Buddypress is Open Source and as long as people do things for free, I’ll appreciate their work. I don’t think that the guy who developed a paid version of the plugin you do for free has to starve or die because of your work – maybe he has to think about some more advanced functions – so, I would be glad to get a free version of your plugin!Greetings,
noizeburgerSeptember 30, 2013 at 8:00 am #172012In reply to: Upload Avatar on register page.
danbp
Participanthi @ananwebman,
accordingly to what brajesh wrote here 2 weeks ago, his plugin works with bp 1.8 ! So, it doesn’t work should be defined much better, or should be discussed directly with the author.
Despite what you write
this is required to approve accounts and discourage users posting incorrect images
the answer is yes and no.
A signup is approved as soon as the subscriber send back the validdation key received by email.
Now his account exist and is active, ok ?But if you allow any upload during the subscription process, it’s as like you allow a unknow user to upload a unknow document on your server. What about this uploaded picture if you decide to ban or delete that user ?
This is against any security policy, don’t you think so ?
It’s best practice to not allow anything to a user before his account is approved by the site admin and evtl. some security plugins.
-
AuthorSearch Results