Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 18,976 through 19,000 (of 69,109 total)
  • Author
    Search Results
  • #172074
    xKroniK13x
    Participant

    Well 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
    }
    ?>
    #172073
    bp-help
    Participant
    #172069
    Hugo Ashmore
    Participant

    ah 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.

    #172068
    Henry
    Member

    Spent 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-97470

    As 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

    #172064
    Hugo Ashmore
    Participant

    It syncs your MS sites or so I thought, but I may well be wrong.

    #172063
    Henry
    Member

    @hnla – not quite sure I follow…?

    #172062
    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

    Sean Infinitee
    Participant

    ps-thanks in advance for any advice!!

    Sean Infinitee
    Participant

    bump! anyone?

    #172055
    GhostPool
    Participant

    Thanks 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.

    #172050
    fotant
    Participant

    No 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…

    #172049
    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!

    #172048
    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!

    #172047
    bp-help
    Participant

    Why 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/

    #172040
    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)

    #172036
    hughshields
    Participant

    Hi 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.

    #172025
    jslucas
    Participant

    I am wondering if this is the case or is there a solution to this. Thank you very much! ((:

    #172024
    Hugo Ashmore
    Participant

    It’s blog posts to stream isn’t it, tracks your sites posts.

    #172020
    seamtv
    Participant

    I 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.

    #172019
    seamtv
    Participant

    This 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.

    #172018
    seamtv
    Participant

    I 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.

    seamtv
    Participant

    Actually, 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.

    #172016
    seamtv
    Participant

    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.

    noizeburger
    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,
    noizeburger

    #172012
    danbp
    Participant

    hi @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.

Viewing 25 results - 18,976 through 19,000 (of 69,109 total)
Skip to toolbar