Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,476 through 1,500 (of 3,787 total)
  • @danbp

    Participant

    Yes ! Exactly like the 3 other BP pages are blank.

    @danbp

    Participant

    Have you tried with Twenty Fifteen ?

    @danbp

    Participant

    To get all fields on the same tab, you simply add them to the Base tab. Users can then fill in anything from one tab and profile will show only one tab.

    This will spare you a lot of time to tweak the original form.

    First topic mention: So the user can edit and save all fields without clicking through serveral tabs.
    If, as site owner, you create profile field group it is probably because you want some structurized output.

    Now, before hacking, you have to ask yourself about what you want: structure or UX. And IMHO in this case, the user comes in second position.
    Another point of view, if it so “complicated” for user to fill in several tabs, consider your work first and justify why you have so many fields, that your user consider it is a mess to fill them… 😉

    @danbp

    Participant

    See here:

    Filters & Constants Reference

    About bp_get_displayed_user_nav_ As you see, there is a a final undescore
    This is a dynamic function name which need to be completed, depending the place you want it to be modified.
    bp_get_displayed_user_nav_<css_id>.

    bp_get_displayed_user_nav_<css_id>

    See a working example here, to understand how to use it
    https://buddypress.org/support/topic/how-to-remove-sub-nav-only-for-displayed-user/#post-234852

    @danbp

    Participant

    @prangesco,

    though you found the answer yourself ! […] using my own group ID number.
    If the function is still in your bp-custom with the modified group ID, it continue to be applied to that group despite you changed the fields status. The group ID is still the same.

    But you say you removed the function ? So there is no reason that a group stays under influence of an unexisting function. Do you use a cache plugin ? Clear it or unsure your browser doesn’t store an old cookie. Refresh it (F5) You could also check the existing field settings.

    @danbp

    Participant

    Activate debug mode in wp-config and deactivate all plugins and use 2015 theme. All this is explained on the page i indicated….

    @danbp

    Participant

    Yep ! Glad yo got it. Thank you for feedback. 😉

    @danbp

    Participant

    See this plugin:
    https://wordpress.org/plugins/invite-anyone/

    or this one (experimental, by @imath)
    https://github.com/imath/workmates

    @danbp

    Participant

    @patrickasd1

    It is working.
    Are you sure you copied correctly the snippet to your theme functions.php file ?
    Triple check what you paste. A missing tag or semi colon can lead to blank page due to a php error.

    @danbp

    Participant

    Hi,

    you need to track down the issue,perhaps a JS conflict in backend. Or have you the same problem on front end too ?

    Follow instructions from here:

    Troubleshooting

    @danbp

    Participant

    @danbp

    Participant

    To check you’re on the right “page” in BuddyPress, use the appropriate function
    Groups: bp_is_groups_component

    Activity: bp_is_activity_component

    Member: bp_is_members_component

    @danbp

    Participant

    BuddyPress use 3 pages by default: members, groups and activity and a small bunch of templates depending the context.
    These 3 pages are not used as ordinary WP pages, and exist for internal usage with WordPress, as slug placeholder only. These pages must stay empty and independant of any template or model.

    The best way to add featured images, is to hook into an existing function/filter or action. There’s no need for a static page.

    For more complex addition, you can use plugin.php template file which exist in /single/ directory of members and groups component template.

    See get_posts and get_the_post_thumbnail on WP Codex
    Post type of featured image is attachement

    Read also about BuddyPress:

    Post Types Activities

    Template Overload from a Plugin


    or a working example similar to what you try to do (if i understand you correctly).
    https://buddypress.org/support/topic/my-contributions-tab-with-subtabs/#post-244609

    @danbp

    Participant

    Hi,

    you could try MediaPress plugin.

    @danbp

    Participant

    Please give me proper solution as early as possible

    The urgency is gone. The impossible is being done. For miracles, we require 24 hours delay.

    Solution is to not double click. Or to learn about JS.
    http://www.w3schools.com/js/

    In reply to: menu logged out list

    @danbp

    Participant

    @danbp

    Participant

    Here it is, some general idea.

    // building navigation tabs
    function bpfr_post_profile_setup_nav() {
    	global $bp;
    	$parent_slug = 'contributions';
    	$child_slug = 'posts';	
    	
    	// main nav
    	bp_core_new_nav_item( array(
    	'name' => __( 'Contributions' ),
    	'slug' => $parent_slug,
    	'screen_function' => 'bpfr_profile_post_screen',
    	'position' => 40,
    	'default_subnav_slug' => $child_slug 
    	) );
    	
    	// Add subnav item 1
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'My posts' ), 
    	'slug' => $child_slug, 
    	'parent_url' => $bp->displayed_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_post_screen'
    	) );
    
    	// Add subnav item 2
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'My Pictures' ), 
    	'slug' => 'pics', 
    	'parent_url' => $bp->displayed_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_picture_screen'
    	) );
    
    	// Add subnav item 3
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'My Videos' ), 
    	'slug' => 'vids', 
    	'parent_url' => $bp->displayed_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_video_screen'
    	) );
    }
    
    	// calling templates
    	function bpfr_profile_post_screen() {	
    		add_action( 'bp_template_content', 'bpfr_profile_post_screen_content' );
    		bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    
    	function bpfr_profile_picture_screen() {
    		add_action( 'bp_template_content', 'bpfr_profile_picture_screen_content' );
    		bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    
    	function bpfr_profile_video_screen() {
    		add_action( 'bp_template_content', 'bpfr_profile_video_screen_content' );
    		bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    
    	// adding action hooks to template
    	function bpfr_profile_post_screen_content() {
    		do_action( my_profile_post);
    	}
    
    	function bpfr_profile_picture_screen_content() {
    		do_action( my_profile_pictures);
    	}
    
    	function bpfr_profile_video_screen_content() {
    		do_action( my_profile_videos);
    	}
    add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );
    
    // fetching content
    function bpfr_get_post() {
    	
    	$myposts = get_posts(  array(
    	'posts_per_page' => 6, // set the number of post to show
    	'author'         => bp_displayed_user_id(), // show only this member post
    	'post_type'      => 'post',
    	'orderby'          => 'post_date',
    	'order'            => 'DESC',
    	'post_status'      => 'publish'
    	));
    	
    	if( ! empty( $myposts ) ) { 
    		
    		foreach($myposts as $post) {
    			setup_postdata( $post );
    			$post_object = get_post( $post );			
    			
    		echo '<div>
    		<div class="tab-item-thumbnail" style="float:left;padding-right:5px;"><a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, array( 25, 25) ) . '</a></div>
    			<div class="tab-item-inner group">
    			<p><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></p>
    			</div>
    		</div>';			
    		}		
    		wp_reset_postdata();
    
    	} else { 		
    		echo '<div class="info" id="message">No post.</div>';
    	}
    }
    add_action ( 'my_profile_post', 'bpfr_get_post' );
    
    function bpfr_get_pictures() {
    
    	$myposts = get_posts(  array(
    	'posts_per_page' => 6,
    	'author'         => bp_displayed_user_id(),
    	'post_type'      => 'post', // post_type key
    	'orderby'          => 'post_date',
    	'order'            => 'DESC',
    	'post_status'      => 'publish'
    	));
    	
    	if( ! empty( $myposts ) ) { 
    	
    	foreach($myposts as $post) {
    		setup_postdata( $post );			
    	/* here we catch  featured image attached to each post 
    	*  using get_the_post_thumbnail()
    	*/
    	echo '<div class="tab-item-thumbnail" style="float:left;padding-right:5px;"><a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, array( 150, 150) ) . '</a></div>';			
    	}		
    	wp_reset_postdata();
    
    	} else { 		
    		echo '<div class="info" id="message">No picture.</div>';
    	}
    }
    add_action ( 'my_profile_pictures', 'bpfr_get_pictures' );
    
    function bpfr_get_videos() {
    
    echo 'Page is empty, add your content !';
    
    }
    add_action ( 'my_profile_videos', 'bpfr_get_videos' );

    @danbp

    Participant

    You’re welcome ! 😉

    @danbp

    Participant

    @johnzhel,

    no, that is not possible. Users are not allowed to add form elements or any other core content. It’s to the site owner to do that.

    If you use a multiselect box with a list of job names, they select some from it. If their job is not in the list, they could add one or more into a textarea; call it “Other job” for example.

    UX obligate me to say that, the more choice you give to users, the more you will run into trouble and it’s most probable the “other” list will became much longer as your pre-buid one. In matter of form usage, the best is the enemy of the good mostly !

    Imagine you use Maid in your list. Somebody comes in and consider that it is not her job, and prefer to enter Floor surface engineer. Huh, weird isn’t it ?
    But you’re the boss ! 😉

    @danbp

    Participant

    Hi @3t_mj,

    this can be done CSS, using :after pseudo selector. All labels containing (required) have a for attribute which let you select them individually. You can also apply a rule by field type.
    As the string (required) is in translation, remove it from there and use & nbsp;(without space after & ) in place of.

    Here a working example, with both technique.

    /* Register bp section */
    #profile-details-section .field_type_textbox label:after {
      content: " *";
      color: red;
      position: relative;
    }
    
    /* Register WP section */
    #basic-details-section label[for="signup_username"]:after {
      content: " *";
      color: red;
      position: relative;
    }

    @danbp

    Participant

    Hi @qurgh,

    use bp_loggedin_user_domain function and wp_nav_menu_items filter to add the item to an existing menu, like this: bp_loggedin_user_domain( 'kag/ship/' )

    See here for a working example:
    https://buddypress.org/support/topic/url-for-menu-to-logged-in-users-profile-page/

    WordPress reference:

    wp_nav_menu_items


    https://codex.wordpress.org/Navigation_Menus

    BuddyPress reference

    bp_loggedin_user_domain

    @danbp

    Participant

    – which is especially torturous on mobile devices..

    hahahaha, but in return, you have very thumb muscled mobile devices users. 💪

    Googled for buddypress reverse messages order and found this:
    https://gist.github.com/bappi-d-great/be10c2e096f0e6936b43

    Untested and waiting now for feedback. 👂 🙂

    @danbp

    Participant

    @djsteveb

    i wrote: To make it work with BP, you add a copy of the original page.php of 2014 and rename it buddypress.php. And you add the condition into that copy.

    I’m not a 2014 specialist and never liked that theme with BuddyPress. The’re so many other out to discover, easy to use and configure, that i wouldn’t loose my (at least) time with it.
    2015 is already avaible and 2016 too, though 2014 is a dynosaur now. Beat’em ! 😉

    @danbp

    Participant

    A child theme contain usually
    style.css
    functions.php

    To make it work with BP, you add a copy of the original page.php of 2014 and rename it buddypress.php

    2014 comes also with a full-width template which is in page-templates folder.
    If you compare both files, you will see that the only difference is at line 40 of page.php
    get_sidebar( 'content' );

    To get what you want, you simply add a conditionnal to this part.

    if( !bp_is_groups_component() ) { 
       get_sidebar( 'content' );
    }

    That said, i think it’s not necessary, as with or without this hack, BP’s content comes full-width on 2014. At least and by default, in the whole white zone, right of the left black sidebar. Also remind that 2014 is a left aligned theme, which can let think that you have a lot of space on the right, specially on a large desktop screen.

    With 2012, it’s a bit different, as this theme use a class called full-width, directly in the html. To use the same technique, we have to echo the div to get the condition to work properly.
    And 2013 doesn’t use a full-width template.

    <?php if( !bp_is_groups_component() ) { 
           echo '<div id="content" role="main">';
     } else { 
    echo '<div id="content" class="full-width" role="main">';
     } ?>

    @danbp

    Participant

    Give feedback here if it worked for you.

Viewing 25 replies - 1,476 through 1,500 (of 3,787 total)
Skip to toolbar