Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 9,951 through 9,975 (of 69,119 total)
  • Author
    Search Results
  • #255382
    danbp
    Participant

    Hi @simonmnt,

    you should create a correct child-theme to get BP templates customization to work.

    First, you need to declare the child via /your-child/style.css with the correct header information.
    Eg. for a twenty fourteen child

    
    /*
    Theme Name: Fourteen-Child
    Description: My child theme for Twenty Fourteen
    Version: 1.0
    Author: simon
    Template: twentyfourteen
    */
    
    @import url("../twentyfourteen/style.css");

    Once done, you can select this child as site theme.

    Now you can add a /buddypress/ folder to /your-child/

    Inside this folder, you copy any file you need to modify from /bp-legacy/buddypress/

    You copy only the file(not the whole /bp-legacy/buddypress/ folder) you want to change, by respecting eventually the original path. Eg
    .
    /your-child/buddypress/members/single/profile/profile-loop.php

    If you need custom functions for the theme, you add a file called functions.php inside /your-child/functions.php

    If you need custom functions for BuddyPress (like most of the snippets you can find on this forum), you add them to wp-content/plugins/bp-custom.php

    #255381
    oddreal
    Participant

    Resolved an error in Courses:

    Fatal error: Class ‘BP_Groups_Group’ not found in /path-to-project/wp-content/themes/lms/framework/buddypress/metaboxes.php on line 15
    

    A friend of mine – CMS developer – took a look at this and advised to just check User Groups at BuddyPress settings page (http://your.site/wp-admin/admin.php?page=bp-components)

    Have a nice day to all.

    #255374
    r-a-y
    Keymaster

    Thanks for the debug help, @tse11.

    One of your plugins (or yourself) is using this code snippet:
    add_filter( 'bp_use_legacy_activity_query', '__return_true' );

    This made our strict activity permalink access check fail.

    I believe the following patch will fix your problem:
    https://buddypress.trac.wordpress.org/attachment/ticket/7146/7146.01.patch

    Can you confirm?

    r-a-y
    Keymaster

    @metaverso – Can you revert your changes and try my fix?
    https://buddypress.trac.wordpress.org/attachment/ticket/7140/7140.01.patch

    If that doesn’t work for you, can you tell me what BP plugins you are using?

    metaverso
    Participant

    my fix:

    Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 488

    [ soluction ]

    public static function get_group_id() {
    
    		
    	if ( defined( 'WP_NETWORK_ADMIN' ) && bp_is_active('groups')) {   // -----------fix add line 1 
    	echo get_called_class();// -----------fix add line 2                     
    
    	
    		// Usually this will work.
    		$group_id = bp_get_current_group_id();
    
    		// On the admin, get the group id out of the $_GET params.
    		if ( empty( $group_id ) && is_admin() && ( isset( $_GET['page'] ) && ( 'bp-groups' === $_GET['page'] ) ) && ! empty( $_GET['gid'] ) ) {
    			$group_id = (int) $_GET['gid'];
    		}
    
    		// This fallback will only be hit when the create step is very
    		// early.
    		if ( empty( $group_id ) && bp_get_new_group_id() ) {
    			$group_id = bp_get_new_group_id();
    		}
    
    		// On some setups, the group id has to be fetched out of the
    		// $_POST array
    		// @todo Figure out why this is happening during group creation.
    		if ( empty( $group_id ) && isset( $_POST['group_id'] ) ) {
    			$group_id = (int) $_POST['group_id'];
    		}
    
    		return $group_id;
    		}// -----------fix add line 3
    	}
    #255365
    metaverso
    Participant

    [ SOLUCTION ]
    error buddypress /wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-group.php on line 988

    update 988 line:
    if ( ! empty( $r['update_meta_cache'] ) ) {
    to:
    if ( ! empty( $r['update_meta_cache'] && bp_is_active( 'groups' )) ) {

    #255363
    binary10
    Participant

    @r-a-y Yes i am using the latest version of WP. Actually what i am trying is to embed the activity at http://localhost/members/john/activity/2/ in my activity stream at http://localhost/members/binary10/. It doesn’t work. But as i already said i did a separate install for testing and created a buddypress activity with permalink http://localhost/site/members/binary10/activity/2/ then it works. This is what i am trying to say. Any ideas?
    thanks

    #255355
    tse11
    Participant

    Hi, thank you for trying to help.

    This is for all users, it isn’t specific to a particular member type or activity item either.

    A member goes to the activity feed, he wants to click on an activity item, the item redirects to the user’s own activity profile page with a bar across the top (the buddypress notification,) stating, “You do not have access to this activity.”

    I am not using an object cache plugin.

    #255354
    danbp
    Participant

    – BuddyPress pages have all an ID.
    – BP pages are not ordinary static WordPress page, but dynamic pages, a kind of placeholder. They have no content and are only existing to have a slug (and a ID for DB magement) for WP/BP dialog.
    Eg. your-site/activity/ URL is empty when you deactivate BP.

    Let’s continue with the activity page as example.

    This “page” is made of different parts, which are contextually loaded on their own template. Use the activity filter to see what is all coming up on the (url/activity/) page. About 10 items which would be 10 real pages on a WP site without BP ! And that’s just default. Many plugins use also BP’s activity…

    For each component, there is a loop. As long as you are in such a loop, you can call what ever belong to that component from inside this loop. And for almost each loop, you have a template.

    If you want the About page (default WP page) to show up on a profile, you load it on one of the profile templates, but not on the BP member page which is the “page” who host “profiles”, but also the “member director”y. And you don’t want About apearing there, isn’t it ? 😉

    If you read the codex about theme develoment and template hierarchy, you may understand how all this is articulated.

    #255353
    airsid
    Participant

    Like you, i’m not a coder.

    Dan, you’re a star in buddypress world !!

    What would be if i give you some code if you don’t understand a text ?

    I will paste it and use it. If something go wrong i’ll google it and play with it using other same codes…that’s how I managed to have my community website 😉

    Learning to code take so much time and as so many people i’m running after time.
    But you’re right, so ok i’ll read it again and try to learn…

    #255351
    danbp
    Participant

    @airsid

    …but it is a simple code to add a widget !
    Don’t take it wrong, we all started a day to learn. Like you, i’m not a coder. But the widget coding is a WP thing, explained on the codex page i indicated.

    You say you didn’t understand what is written on codex. What would be if i give you some code if you don’t understand a text ? Try again. And while learning step by step, read also BP’s codex about templates.

    Once you feel more confortable, after some experimentation and errors, come back for BuddyPress related questions. 🙂

    #255346
    David Cavins
    Keymaster

    @Earl_D: No. The above snippets are added to a custom version of the buddypress/members/single/messages/compose.php file. Basically, if you add this file to your theme (following the structure buddypress/members/single/messages/), it will be used in preference to the one BuddyPress ships with. Read more about adding custom template parts: https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/

    #255344
    danbp
    Participant
    danbp
    Participant

    Use BuddyPress repair tool to recalculate members.

    BuddyPress Repair Tools Admin Screen

    #255337
    danbp
    Participant

    i want that it should work for activities on the same website? Is it possible?

    BuddyPress features are generally designed to work inside BuddyPress. 😉
    I guess it is possible. Because it was made for !

    Follow Ray’s advice…

    #255336
    danbp
    Participant

    @daltontastic,

    color buttons are TinyMCE tools and not html tags. The only way to get them would be to use the editor toolbar.

    Here a scenario you could use:
    – create a child-theme and add post-form.php to it (copy from bp-templates/bp-legacy/buddyPress/activity/post-form.php).
    Result: your-child-theme/buddypress/activity/post-form.php

    In that file, go to line:40 where textarea start.
    Inser this action hook:

    <?php if ( bp_is_groups_component() ) : ?>
    	<?php do_action( 'blablabla' ); ?>
    <?php endif ?>

    Then add this <?php if ( ! bp_is_groups_component() ) : ?>
    <textarea class="bp-suggestions"......bla...bla...</textarea>
    and add <?php endif ?> after the textarea closing tag.

    This contionnals will show a custom area for the desired group and prevent update area to appear on all other groups home pages.

    So if a user is member of different groups, he will get a texteditor for group_id 13 and the normal update area on all others.

    The custom template is ready. Now the fonctions we need.

    Open bp-custom.php (or create it) and paste in those snippets.

    Adding the texteditor:

    function bpfr_whats_new_tiny_editor() {
    	// deactivation of the visual tab, so user can't play with style tools
    //add_filter ( 'user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 );
    
    $content = "";
    
    	// building the what's new textarea
    	if ( isset( $_GET['r'] ) ) :
    	$content = esc_textarea( $_GET['r'] ); 
    	endif;
    
    	// adding tinymce tools
    	$editor_id = 'whats-new';
    
    	$settings = array( 
    			'textarea_name' => 'whats-new', 
    			'teeny' => false, 
    			'media_buttons' => true, 
    			'drag_drop_upload' => true, 
    			'quicktags' => array(
    			'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'
    		));	 
    	
    	// get the editor	
    	wp_editor( $content, $editor_id, $settings );
    }
    add_action( 'whats_new_textarea', 'bpfr_whats_new_tiny_editor' );

    A simple function who add the original textarea for users who are group members, but not allowed to rich edit.

    function my_textarea() { ?>
    			<textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
    				<?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?>
    			><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>
    <?php
    }

    And the last one, where you set up the group allowed to publish updates using edit tools.

    function trotro() {
    
    if ( bp_is_groups_component() ) :
    
    $check = groups_is_user_member( bp_loggedin_user_id(), bp_get_group_id() );
    $check_group = bp_get_group_id(); 
    
    	if ($check != 0 && $check_group == 21 && 'leon' == bp_current_item() ){
    		echo 'Wow! You can rich edit in this group.';
    			bpfr_whats_new_tiny_editor();
    	} else {
    		echo 'Sorry, you cannot rich edit in this group';
    		my_textarea();
    	}
    
    endif;
    }
    add_action( 'blablabla', 'trotro' );

    Now, any member which is part of the group leon, group id 23 can publish updates and use the color picker and all other things which are on the edit bar.

    Only thing you have to do is to adjust leon and id to your rules.

    Successfully tested on 2.6 and 2016.

    May this help you to go further with your BuddyPress project. 🙂

    #255335
    r-a-y
    Keymaster

    @binary10 – Are you using some custom code to restrict access to your BuddyPress site or certain parts of your site like member profiles?

    If you are, then it isn’t possible for the oEmbed code to return properly.

    #255326
    oddreal
    Participant

    Hi,

    I’ve faced the same problem. The patch https://buddypress.trac.wordpress.org/attachment/ticket/7140/7140.01.patch releaved me from the initial problem but now I have another one error message at the same place – Courses Group widget (it doesn’t allow to edit Courses):
    Fatal error: Class ‘BP_Groups_Group’ not found in /path-to-project/wp-content/themes/lms/framework/buddypress/metaboxes.php on line 15

    Please advise.

    #255324
    noyearslost
    Participant

    Upon further reading, my issue was occurring with the BuddyBoss Reorder Tabs plugin.

    I have contacted the developer. My apologies for bothering you @r-a-y

    #255323
    binary10
    Participant

    @danbp so it works if i copy the permalink of an activity on some other buddypress installation but i want that it should work for activities on the same website? Is it possible?
    thanks

    #255312
    shanebp
    Moderator

    You can open a ticket here. Use the same user name and password that you use for this forum.

    #255310
    Pulse North
    Participant

    P.S I am running the latest versions of both WordPress and Buddypress.

    #255306
    danbp
    Participant

    While doing this, you’ll see a quoted page title, not the whole page content. So guess it is standard behave.

    Example

    Share Profile?

    Question related to third party plugin should be asked on plugin support. That said, it’s a known bug who remain unanswered since 7 mounth…

    https://wordpress.org/support/topic/conflict-with-bp-24-cover-photo

    #255304

    In reply to: Share Profile?

    danbp
    Participant

    Is not built-in, but seems to be possible with this plugin.

    Another one, Super Socializer is BP compatible. No idea if it share BP profiles out of the box. You have to test and eventually ask for help on plugin support.

    #255302
    Bharat
    Participant

    I have found solutions for html email text
    there is some changes in bp_core files :
    You can change content type given below path:
    \wp-content\plugins\buddypress\bp-core\bp-core-functions.php line number 2962

    put content_html text instead content_plaintext:
    content_plaintext should be send plain text email and content_html should be

    send html email:
    $email->get( ‘content_plaintext’, ‘replace-tokens’ )

    $email->get( ‘content_html’, ‘replace-tokens’ )

    I would like to give suggestions, if buddypress team should be given backend options like select content type (1)HTML email (2)Plain text
    because buddypress have not given any hook for changes content type text

Viewing 25 results - 9,951 through 9,975 (of 69,119 total)
Skip to toolbar